From 5ecaca4598273722643df1c9a2ebe244ee64517b Mon Sep 17 00:00:00 2001 From: aeneasr Date: Fri, 26 Apr 2019 09:49:42 +0200 Subject: [PATCH] sdk: Make clear that refresh tokens are introspectable Closes #1250 Signed-off-by: aeneasr --- docs/api.swagger.json | 277 +- oauth2/doc.go | 4 +- .../introspect_o_auth2_token_parameters.go | 4 +- sdk/go/hydra/models/authentication_request.go | 2 +- sdk/go/hydra/models/authentication_session.go | 3 +- sdk/go/hydra/models/client.go | 4 +- sdk/go/hydra/models/consent_request.go | 2 +- .../models/consent_request_session_data.go | 2 +- sdk/go/hydra/models/empty_response.go | 4 +- sdk/go/hydra/models/generic_error.go | 4 +- .../models/handled_authentication_request.go | 2 +- .../hydra/models/handled_consent_request.go | 2 +- sdk/go/hydra/models/handled_login_request.go | 2 +- sdk/go/hydra/models/introspection.go | 2 +- sdk/go/hydra/models/login_request.go | 2 +- sdk/go/hydra/models/logout_request.go | 2 +- .../hydra/models/open_id_connect_context.go | 2 +- .../hydra/models/previous_consent_session.go | 2 +- .../hydra/models/request_handler_response.go | 2 +- .../swagger_flush_inactive_access_tokens.go | 4 +- .../models/swagger_json_web_key_query.go | 6 +- sdk/go/hydra/models/swagger_jwk_create_set.go | 2 +- sdk/go/hydra/models/swagger_jwk_set_query.go | 2 +- sdk/go/hydra/models/swagger_jwk_update_set.go | 2 +- .../models/swagger_jwk_update_set_key.go | 2 +- .../swagger_o_auth_introspection_request.go | 4 +- ...swagger_revoke_o_auth2_token_parameters.go | 4 +- .../models/swaggeroauth2_token_parameters.go | 4 +- sdk/go/hydra/models/well_known.go | 2 +- .../.swagger-codegen/VERSION | 2 +- sdk/java/hydra-client-resttemplate/README.md | 37 +- .../hydra-client-resttemplate/build.gradle | 6 +- .../docs/AdminApi.md | 4 +- .../docs/AuthenticationSession.md | 2 +- .../hydra-client-resttemplate/docs/Client.md | 4 +- .../docs/FlushInactiveOAuth2TokensRequest.md | 2 +- .../docs/OAuth2Client.md | 4 +- .../docs/PreviousConsentSession.md | 2 +- .../hydra-client-resttemplate/git_push.sh | 2 +- sdk/java/hydra-client-resttemplate/pom.xml | 477 +- .../java/com/github/ory/hydra/ApiClient.java | 33 +- .../ory/hydra/CustomInstantDeserializer.java | 232 - .../com/github/ory/hydra/api/AdminApi.java | 4 +- .../com/github/ory/hydra/api/HealthApi.java | 2 +- .../com/github/ory/hydra/api/PublicApi.java | 2 +- .../com/github/ory/hydra/api/VersionApi.java | 2 +- .../com/github/ory/hydra/auth/ApiKeyAuth.java | 2 +- .../github/ory/hydra/auth/HttpBasicAuth.java | 2 +- .../java/com/github/ory/hydra/auth/OAuth.java | 2 +- .../ory/hydra/model/AcceptConsentRequest.java | 7 +- .../ory/hydra/model/AcceptLoginRequest.java | 7 +- .../hydra/model/AuthenticationRequest.java | 7 +- .../hydra/model/AuthenticationSession.java | 23 +- .../com/github/ory/hydra/model/Client.java | 27 +- .../ory/hydra/model/CompletedRequest.java | 5 +- .../ory/hydra/model/ConsentRequest.java | 7 +- .../hydra/model/ConsentRequestSession.java | 5 +- .../model/ConsentRequestSessionData.java | 5 +- .../github/ory/hydra/model/CreateRequest.java | 5 +- .../github/ory/hydra/model/EmptyResponse.java | 9 +- .../FlushInactiveOAuth2TokensRequest.java | 15 +- .../github/ory/hydra/model/GenericError.java | 5 +- .../model/HandledAuthenticationRequest.java | 7 +- .../hydra/model/HandledConsentRequest.java | 7 +- .../ory/hydra/model/HandledLoginRequest.java | 7 +- .../ory/hydra/model/HealthNotReadyStatus.java | 5 +- .../github/ory/hydra/model/HealthStatus.java | 5 +- .../github/ory/hydra/model/Introspection.java | 7 +- .../github/ory/hydra/model/JSONWebKey.java | 5 +- .../github/ory/hydra/model/JSONWebKeySet.java | 5 +- .../model/JsonWebKeySetGeneratorRequest.java | 5 +- .../github/ory/hydra/model/LoginRequest.java | 7 +- .../github/ory/hydra/model/LogoutRequest.java | 7 +- .../github/ory/hydra/model/OAuth2Client.java | 27 +- .../hydra/model/OAuth2TokenIntrospection.java | 7 +- .../ory/hydra/model/Oauth2TokenResponse.java | 5 +- .../ory/hydra/model/OauthTokenResponse.java | 5 +- .../ory/hydra/model/OpenIDConnectContext.java | 5 +- .../hydra/model/PreviousConsentSession.java | 21 +- .../github/ory/hydra/model/RejectRequest.java | 5 +- .../ory/hydra/model/RequestDeniedError.java | 5 +- .../hydra/model/RequestHandlerResponse.java | 5 +- .../SwaggerFlushInactiveAccessTokens.java | 8 +- .../ory/hydra/model/SwaggerHealthStatus.java | 5 +- .../ory/hydra/model/SwaggerJSONWebKey.java | 5 +- .../ory/hydra/model/SwaggerJSONWebKeySet.java | 5 +- .../hydra/model/SwaggerJsonWebKeyQuery.java | 5 +- .../ory/hydra/model/SwaggerJwkCreateSet.java | 5 +- .../ory/hydra/model/SwaggerJwkSetQuery.java | 5 +- .../ory/hydra/model/SwaggerJwkUpdateSet.java | 5 +- .../hydra/model/SwaggerJwkUpdateSetKey.java | 5 +- .../hydra/model/SwaggerNotReadyStatus.java | 5 +- .../SwaggerOAuthIntrospectionRequest.java | 8 +- .../model/SwaggerOAuthTokenResponse.java | 5 +- .../SwaggerRevokeOAuth2TokenParameters.java | 8 +- .../ory/hydra/model/SwaggerVersion.java | 5 +- .../model/Swaggeroauth2TokenParameters.java | 8 +- .../model/Swaggeroauth2TokenResponse.java | 5 +- .../model/SwaggeruserinfoResponsePayload.java | 9 +- .../ory/hydra/model/UserinfoResponse.java | 9 +- .../com/github/ory/hydra/model/Version.java | 5 +- .../com/github/ory/hydra/model/WellKnown.java | 21 +- sdk/js/swagger/.swagger-codegen/VERSION | 2 +- sdk/js/swagger/README.md | 1 - sdk/js/swagger/docs/AdminApi.md | 4 +- sdk/js/swagger/docs/AuthenticationSession.md | 2 +- sdk/js/swagger/docs/PreviousConsentSession.md | 2 +- sdk/js/swagger/src/ApiClient.js | 34 +- sdk/js/swagger/src/api/AdminApi.js | 136 +- sdk/js/swagger/src/api/HealthApi.js | 12 +- sdk/js/swagger/src/api/PublicApi.js | 32 +- sdk/js/swagger/src/api/VersionApi.js | 8 +- sdk/js/swagger/src/index.js | 13 +- .../swagger/src/model/AcceptConsentRequest.js | 2 +- .../swagger/src/model/AcceptLoginRequest.js | 2 +- .../src/model/AuthenticationRequest.js | 2 +- .../src/model/AuthenticationSession.js | 6 +- sdk/js/swagger/src/model/Client.js | 2 +- sdk/js/swagger/src/model/CompletedRequest.js | 2 +- sdk/js/swagger/src/model/ConsentRequest.js | 2 +- .../src/model/ConsentRequestSession.js | 2 +- .../src/model/ConsentRequestSessionData.js | 2 +- sdk/js/swagger/src/model/CreateRequest.js | 2 +- sdk/js/swagger/src/model/EmptyResponse.js | 4 +- .../model/FlushInactiveOAuth2TokensRequest.js | 2 +- sdk/js/swagger/src/model/GenericError.js | 2 +- .../src/model/HandledAuthenticationRequest.js | 2 +- .../src/model/HandledConsentRequest.js | 2 +- .../swagger/src/model/HandledLoginRequest.js | 2 +- .../swagger/src/model/HealthNotReadyStatus.js | 2 +- sdk/js/swagger/src/model/HealthStatus.js | 2 +- sdk/js/swagger/src/model/Introspection.js | 2 +- sdk/js/swagger/src/model/JSONWebKey.js | 2 +- sdk/js/swagger/src/model/JSONWebKeySet.js | 2 +- .../model/JsonWebKeySetGeneratorRequest.js | 2 +- sdk/js/swagger/src/model/LoginRequest.js | 2 +- sdk/js/swagger/src/model/LogoutRequest.js | 2 +- sdk/js/swagger/src/model/OAuth2Client.js | 2 +- .../src/model/OAuth2TokenIntrospection.js | 2 +- .../swagger/src/model/Oauth2TokenResponse.js | 2 +- .../swagger/src/model/OauthTokenResponse.js | 2 +- .../swagger/src/model/OpenIDConnectContext.js | 2 +- .../src/model/PreviousConsentSession.js | 16 +- sdk/js/swagger/src/model/RejectRequest.js | 2 +- .../swagger/src/model/RequestDeniedError.js | 2 +- .../src/model/RequestHandlerResponse.js | 2 +- .../model/SwaggerFlushInactiveAccessTokens.js | 3 +- .../swagger/src/model/SwaggerHealthStatus.js | 2 +- sdk/js/swagger/src/model/SwaggerJSONWebKey.js | 2 +- .../swagger/src/model/SwaggerJSONWebKeySet.js | 2 +- .../src/model/SwaggerJsonWebKeyQuery.js | 2 +- .../swagger/src/model/SwaggerJwkCreateSet.js | 2 +- .../swagger/src/model/SwaggerJwkSetQuery.js | 2 +- .../swagger/src/model/SwaggerJwkUpdateSet.js | 2 +- .../src/model/SwaggerJwkUpdateSetKey.js | 2 +- .../src/model/SwaggerNotReadyStatus.js | 2 +- .../model/SwaggerOAuthIntrospectionRequest.js | 3 +- .../src/model/SwaggerOAuthTokenResponse.js | 2 +- .../SwaggerRevokeOAuth2TokenParameters.js | 3 +- sdk/js/swagger/src/model/SwaggerVersion.js | 2 +- .../src/model/Swaggeroauth2TokenParameters.js | 3 +- .../src/model/Swaggeroauth2TokenResponse.js | 2 +- .../model/SwaggeruserinfoResponsePayload.js | 2 +- sdk/js/swagger/src/model/UserinfoResponse.js | 2 +- sdk/js/swagger/src/model/Version.js | 2 +- sdk/js/swagger/src/model/WellKnown.js | 2 +- sdk/php/.swagger-codegen/VERSION | 2 +- sdk/php/swagger/.php_cs | 33 +- sdk/php/swagger/README.md | 19 +- sdk/php/swagger/autoload.php | 54 + sdk/php/swagger/docs/Api/AdminApi.md | 345 +- sdk/php/swagger/docs/Api/HealthApi.md | 26 +- sdk/php/swagger/docs/Api/PublicApi.md | 99 +- sdk/php/swagger/docs/Api/VersionApi.md | 14 +- .../docs/Model/AcceptConsentRequest.md | 2 +- .../docs/Model/AuthenticationRequest.md | 4 +- .../docs/Model/AuthenticationSession.md | 2 +- sdk/php/swagger/docs/Model/Client.md | 2 +- sdk/php/swagger/docs/Model/ConsentRequest.md | 4 +- .../docs/Model/HandledConsentRequest.md | 2 +- sdk/php/swagger/docs/Model/JSONWebKeySet.md | 2 +- sdk/php/swagger/docs/Model/LoginRequest.md | 4 +- sdk/php/swagger/docs/Model/OAuth2Client.md | 2 +- .../docs/Model/PreviousConsentSession.md | 4 +- .../Model/SwaggerFlushInactiveAccessTokens.md | 2 +- .../docs/Model/SwaggerJSONWebKeySet.md | 2 +- .../swagger/docs/Model/SwaggerJwkCreateSet.md | 2 +- .../swagger/docs/Model/SwaggerJwkUpdateSet.md | 2 +- .../docs/Model/SwaggerJwkUpdateSetKey.md | 2 +- sdk/php/swagger/git_push.sh | 4 +- sdk/php/swagger/lib/Api/AdminApi.php | 7907 ++++------------- sdk/php/swagger/lib/Api/HealthApi.php | 601 +- sdk/php/swagger/lib/Api/PublicApi.php | 2000 +---- sdk/php/swagger/lib/Api/VersionApi.php | 340 +- sdk/php/swagger/lib/ApiClient.php | 371 + sdk/php/swagger/lib/ApiException.php | 20 +- sdk/php/swagger/lib/Configuration.php | 366 +- sdk/php/swagger/lib/HeaderSelector.php | 109 - .../lib/Model/AcceptConsentRequest.php | 129 +- .../swagger/lib/Model/AcceptLoginRequest.php | 131 +- .../lib/Model/AuthenticationRequest.php | 147 +- .../lib/Model/AuthenticationSession.php | 121 +- sdk/php/swagger/lib/Model/Client.php | 212 +- .../swagger/lib/Model/CompletedRequest.php | 111 +- sdk/php/swagger/lib/Model/ConsentRequest.php | 156 +- .../lib/Model/ConsentRequestSession.php | 114 +- .../lib/Model/ConsentRequestSessionData.php | 114 +- sdk/php/swagger/lib/Model/CreateRequest.php | 132 +- sdk/php/swagger/lib/Model/EmptyResponse.php | 110 +- .../FlushInactiveOAuth2TokensRequest.php | 111 +- sdk/php/swagger/lib/Model/GenericError.php | 125 +- .../Model/HandledAuthenticationRequest.php | 128 +- .../lib/Model/HandledConsentRequest.php | 129 +- .../swagger/lib/Model/HandledLoginRequest.php | 131 +- .../lib/Model/HealthNotReadyStatus.php | 111 +- sdk/php/swagger/lib/Model/HealthStatus.php | 111 +- sdk/php/swagger/lib/Model/Introspection.php | 152 +- sdk/php/swagger/lib/Model/JSONWebKey.php | 203 +- sdk/php/swagger/lib/Model/JSONWebKeySet.php | 117 +- .../Model/JsonWebKeySetGeneratorRequest.php | 132 +- sdk/php/swagger/lib/Model/LoginRequest.php | 147 +- sdk/php/swagger/lib/Model/LogoutRequest.php | 120 +- sdk/php/swagger/lib/Model/ModelInterface.php | 96 - sdk/php/swagger/lib/Model/OAuth2Client.php | 212 +- .../lib/Model/OAuth2TokenIntrospection.php | 152 +- .../swagger/lib/Model/Oauth2TokenResponse.php | 128 +- .../swagger/lib/Model/OauthTokenResponse.php | 126 +- .../lib/Model/OpenIDConnectContext.php | 123 +- .../lib/Model/PreviousConsentSession.php | 140 +- sdk/php/swagger/lib/Model/RejectRequest.php | 133 +- .../swagger/lib/Model/RequestDeniedError.php | 123 +- .../lib/Model/RequestHandlerResponse.php | 111 +- .../SwaggerFlushInactiveAccessTokens.php | 118 +- .../swagger/lib/Model/SwaggerHealthStatus.php | 111 +- .../swagger/lib/Model/SwaggerJSONWebKey.php | 179 +- .../lib/Model/SwaggerJSONWebKeySet.php | 117 +- .../lib/Model/SwaggerJsonWebKeyQuery.php | 124 +- .../swagger/lib/Model/SwaggerJwkCreateSet.php | 125 +- .../swagger/lib/Model/SwaggerJwkSetQuery.php | 116 +- .../swagger/lib/Model/SwaggerJwkUpdateSet.php | 125 +- .../lib/Model/SwaggerJwkUpdateSetKey.php | 133 +- .../lib/Model/SwaggerNotReadyStatus.php | 111 +- .../SwaggerOAuthIntrospectionRequest.php | 120 +- .../lib/Model/SwaggerOAuthTokenResponse.php | 126 +- .../SwaggerRevokeOAuth2TokenParameters.php | 117 +- sdk/php/swagger/lib/Model/SwaggerVersion.php | 111 +- .../Model/Swaggeroauth2TokenParameters.php | 126 +- .../lib/Model/Swaggeroauth2TokenResponse.php | 120 +- .../Model/SwaggeruserinfoResponsePayload.php | 165 +- .../swagger/lib/Model/UserinfoResponse.php | 165 +- sdk/php/swagger/lib/Model/Version.php | 111 +- sdk/php/swagger/lib/Model/WellKnown.php | 218 +- sdk/php/swagger/lib/ObjectSerializer.php | 53 +- 253 files changed, 5375 insertions(+), 16172 deletions(-) delete mode 100644 sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/CustomInstantDeserializer.java create mode 100644 sdk/php/swagger/autoload.php create mode 100644 sdk/php/swagger/lib/ApiClient.php delete mode 100644 sdk/php/swagger/lib/HeaderSelector.php delete mode 100644 sdk/php/swagger/lib/Model/ModelInterface.php diff --git a/docs/api.swagger.json b/docs/api.swagger.json index d956dcd35d..e357a76339 100644 --- a/docs/api.swagger.json +++ b/docs/api.swagger.json @@ -1583,7 +1583,7 @@ { "type": "string", "x-go-name": "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 [RFC6749], Section 5.1.\nThis endpoint DOES NOT accept refresh tokens for validation.", + "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.", "name": "token", "in": "formData", "required": true @@ -1811,7 +1811,7 @@ "definitions": { "AuthenticationRequest": { "type": "object", - "title": "AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest Contains information on an ongoing login request.", + "title": "AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest Contains information on an ongoing login request.", "properties": { "challenge": { "description": "Challenge is the identifier (\"authentication challenge\") of the consent authentication request. It is used to\nidentify the session.", @@ -1864,11 +1864,11 @@ "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "AuthenticationSession": { - "description": "AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session", + "description": "AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session", "type": "object", "properties": { "AuthenticatedAt": { - "description": "authenticated at\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time", + "description": "authenticated at\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time\nFormat: date-time", "type": "string", "format": "date-time" }, @@ -2075,7 +2075,7 @@ }, "ConsentRequest": { "type": "object", - "title": "ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest Contains information on an ongoing consent request.", + "title": "ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest Contains information on an ongoing consent request.", "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.", @@ -2147,7 +2147,7 @@ }, "ConsentRequestSessionData": { "type": "object", - "title": "ConsentRequestSessionData ConsentRequestSessionData Used to pass session data to a consent request.", + "title": "ConsentRequestSessionData Used to pass session data to a consent request.", "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!", @@ -2168,11 +2168,6 @@ }, "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, - "EmptyResponse": { - "description": "EmptyResponse EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201.", - "type": "object", - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, "FlushInactiveOAuth2TokensRequest": { "description": "FlushInactiveOAuth2TokensRequest flush inactive o auth2 tokens request", "type": "object", @@ -2186,41 +2181,9 @@ }, "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, - "GenericError": { - "description": "Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.", - "type": "object", - "title": "GenericError GenericError Error response", - "required": [ - "error" - ], - "properties": { - "error": { - "description": "Name is the error name.", - "type": "string", - "x-go-name": "Name" - }, - "error_code": { - "description": "Code represents the error status code (404, 403, 401, ...).", - "type": "integer", - "format": "int64", - "x-go-name": "Code" - }, - "error_debug": { - "description": "Debug contains debug information. This is usually not available and has to be enabled.", - "type": "string", - "x-go-name": "Debug" - }, - "error_hint": { - "description": "Hint contains further information on the nature of the error.", - "type": "string", - "x-go-name": "Hint" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, "HandledAuthenticationRequest": { "type": "object", - "title": "HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest The request payload used to accept a login request.", + "title": "HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest The request payload used to accept a login request.", "required": [ "subject" ], @@ -2256,7 +2219,7 @@ }, "HandledConsentRequest": { "type": "object", - "title": "HandledConsentRequest The request payload used to accept a consent request.", + "title": "HandledConsentRequest HandledConsentRequest The request payload used to accept a consent request.", "properties": { "grant_access_token_audience": { "description": "GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.", @@ -2293,7 +2256,7 @@ }, "HandledLoginRequest": { "type": "object", - "title": "HandledLoginRequest HandledLoginRequest HandledLoginRequest is the request payload used to accept a login request.", + "title": "HandledLoginRequest HandledLoginRequest HandledLoginRequest HandledLoginRequest is the request payload used to accept a login request.", "required": [ "subject" ], @@ -2338,7 +2301,7 @@ "Introspection": { "description": "https://tools.ietf.org/html/rfc7662", "type": "object", - "title": "Introspection Introspection Introspection Introspection Introspection contains an access token's session data as specified by IETF RFC 7662, see:", + "title": "Introspection Introspection Introspection Introspection Introspection Introspection contains an access token's session data as specified by IETF RFC 7662, see:", "required": [ "active" ], @@ -2596,7 +2559,7 @@ }, "LogoutRequest": { "type": "object", - "title": "LogoutRequest Contains information about an ongoing logout request.", + "title": "LogoutRequest LogoutRequest Contains information about an ongoing logout request.", "properties": { "request_url": { "description": "RequestURL is the original Logout URL requested.", @@ -2663,11 +2626,11 @@ "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "PreviousConsentSession": { - "description": "PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests\nsame as HandledLoginRequest, just with consent_request exposed as json", + "description": "The response used to return used consent requests\nsame as HandledLoginRequest, just with consent_request exposed as json", "type": "object", "properties": { "consent_request": { - "$ref": "#/definitions/ConsentRequest" + "$ref": "#/definitions/consentRequest" }, "grant_access_token_audience": { "description": "GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.", @@ -2697,14 +2660,14 @@ "x-go-name": "RememberFor" }, "session": { - "$ref": "#/definitions/ConsentRequestSessionData" + "$ref": "#/definitions/consentRequestSession" } }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" + "x-go-package": "github.com/ory/hydra/consent" }, "RequestDeniedError": { "type": "object", - "title": "RequestDeniedError RequestDeniedError The request payload used to accept a login or consent request.", + "title": "RequestDeniedError The request payload used to accept a login or consent request.", "properties": { "error": { "description": "name", @@ -2737,7 +2700,7 @@ }, "RequestHandlerResponse": { "type": "object", - "title": "RequestHandlerResponse The response payload sent when accepting or rejecting a login or consent request.", + "title": "RequestHandlerResponse RequestHandlerResponse The response payload sent when accepting or rejecting a login or consent request.", "properties": { "redirect_to": { "description": "RedirectURL is the URL which you should redirect the user to once the authentication process is completed.", @@ -2747,181 +2710,10 @@ }, "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, - "SwaggerFlushInactiveAccessTokens": { - "description": "SwaggerFlushInactiveAccessTokens SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens", - "type": "object", - "properties": { - "Body": { - "$ref": "#/definitions/FlushInactiveOAuth2TokensRequest" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "SwaggerJSONWebKeyQuery": { - "description": "SwaggerJSONWebKeyQuery SwaggerJSONWebKeyQuery swagger Json web key query", - "type": "object", - "required": [ - "kid", - "set" - ], - "properties": { - "kid": { - "description": "The kid of the desired key\nin: path", - "type": "string", - "x-go-name": "KID" - }, - "set": { - "description": "The set\nin: path", - "type": "string", - "x-go-name": "Set" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "SwaggerJwkCreateSet": { - "description": "SwaggerJwkCreateSet SwaggerJwkCreateSet swagger jwk create set", - "type": "object", - "required": [ - "set" - ], - "properties": { - "Body": { - "$ref": "#/definitions/createRequest" - }, - "set": { - "description": "The set\nin: path", - "type": "string", - "x-go-name": "Set" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "SwaggerJwkSetQuery": { - "description": "SwaggerJwkSetQuery SwaggerJwkSetQuery swagger jwk set query", - "type": "object", - "required": [ - "set" - ], - "properties": { - "set": { - "description": "The set\nin: path", - "type": "string", - "x-go-name": "Set" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "SwaggerJwkUpdateSet": { - "description": "SwaggerJwkUpdateSet SwaggerJwkUpdateSet swagger jwk update set", - "type": "object", - "required": [ - "set" - ], - "properties": { - "Body": { - "$ref": "#/definitions/swaggerJSONWebKeySet" - }, - "set": { - "description": "The set\nin: path", - "type": "string", - "x-go-name": "Set" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "SwaggerJwkUpdateSetKey": { - "description": "SwaggerJwkUpdateSetKey SwaggerJwkUpdateSetKey swagger jwk update set key", - "type": "object", - "required": [ - "kid", - "set" - ], - "properties": { - "Body": { - "$ref": "#/definitions/swaggerJSONWebKey" - }, - "kid": { - "description": "The kid of the desired key\nin: path", - "type": "string", - "x-go-name": "KID" - }, - "set": { - "description": "The set\nin: path", - "type": "string", - "x-go-name": "Set" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "SwaggerOAuthIntrospectionRequest": { - "description": "SwaggerOAuthIntrospectionRequest SwaggerOAuthIntrospectionRequest swagger o auth introspection request", - "type": "object", - "required": [ - "token" - ], - "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.\n\nin: formData", - "type": "string", - "x-go-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 [RFC6749], Section 5.1.\nThis endpoint DOES NOT accept refresh tokens for validation.", - "type": "string", - "x-go-name": "Token" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "SwaggerRevokeOAuth2TokenParameters": { - "description": "SwaggerRevokeOAuth2TokenParameters SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters", - "type": "object", - "required": [ - "token" - ], - "properties": { - "token": { - "description": "in: formData", - "type": "string", - "x-go-name": "Token" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, - "Swaggeroauth2TokenParameters": { - "description": "Swaggeroauth2TokenParameters Swaggeroauth2TokenParameters swaggeroauth2 token parameters", - "type": "object", - "required": [ - "grant_type" - ], - "properties": { - "client_id": { - "description": "in: formData", - "type": "string", - "x-go-name": "ClientID" - }, - "code": { - "description": "in: formData", - "type": "string", - "x-go-name": "Code" - }, - "grant_type": { - "description": "in: formData", - "type": "string", - "x-go-name": "GrantType" - }, - "redirect_uri": { - "description": "in: formData", - "type": "string", - "x-go-name": "RedirectURI" - } - }, - "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" - }, "WellKnown": { "description": "It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms\namong others.", "type": "object", - "title": "WellKnown WellKnown represents important OpenID Connect discovery metadata", + "title": "WellKnown WellKnown WellKnown represents important OpenID Connect discovery metadata", "required": [ "authorization_endpoint", "id_token_signing_alg_values_supported", @@ -3309,9 +3101,10 @@ "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "emptyResponse": { - "description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201.", + "description": "EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201.", "type": "object", - "x-go-package": "github.com/ory/hydra" + "x-go-name": "EmptyResponse", + "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "flushInactiveOAuth2TokensRequest": { "type": "object", @@ -3329,7 +3122,7 @@ "genericError": { "description": "Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.", "type": "object", - "title": "Error response", + "title": "GenericError Error response", "required": [ "error" ], @@ -3360,7 +3153,8 @@ "example": "Object with ID 12345 does not exist" } }, - "x-go-package": "github.com/ory/hydra" + "x-go-name": "GenericError", + "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "healthNotReadyStatus": { "type": "object", @@ -3913,13 +3707,15 @@ "x-go-package": "github.com/ory/hydra/consent" }, "swaggerFlushInactiveAccessTokens": { + "description": "SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens", "type": "object", "properties": { "Body": { - "$ref": "#/definitions/flushInactiveOAuth2TokensRequest" + "$ref": "#/definitions/FlushInactiveOAuth2TokensRequest" } }, - "x-go-package": "github.com/ory/hydra/oauth2" + "x-go-name": "SwaggerFlushInactiveAccessTokens", + "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "swaggerHealthStatus": { "description": "SwaggerHealthStatus swagger health status", @@ -4070,6 +3866,7 @@ "x-go-name": "Set" } }, + "x-go-name": "SwaggerJSONWebKeyQuery", "x-go-package": "github.com/ory/hydra/jwk" }, "swaggerJwkCreateSet": { @@ -4087,6 +3884,7 @@ "x-go-name": "Set" } }, + "x-go-name": "SwaggerJwkCreateSet", "x-go-package": "github.com/ory/hydra/jwk" }, "swaggerJwkSetQuery": { @@ -4101,6 +3899,7 @@ "x-go-name": "Set" } }, + "x-go-name": "SwaggerJwkSetQuery", "x-go-package": "github.com/ory/hydra/jwk" }, "swaggerJwkUpdateSet": { @@ -4118,6 +3917,7 @@ "x-go-name": "Set" } }, + "x-go-name": "SwaggerJwkUpdateSet", "x-go-package": "github.com/ory/hydra/jwk" }, "swaggerJwkUpdateSetKey": { @@ -4141,6 +3941,7 @@ "x-go-name": "Set" } }, + "x-go-name": "SwaggerJwkUpdateSetKey", "x-go-package": "github.com/ory/hydra/jwk" }, "swaggerNotReadyStatus": { @@ -4160,6 +3961,7 @@ "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "swaggerOAuthIntrospectionRequest": { + "description": "SwaggerOAuthIntrospectionRequest swagger o auth introspection request", "type": "object", "required": [ "token" @@ -4176,7 +3978,8 @@ "x-go-name": "Token" } }, - "x-go-package": "github.com/ory/hydra/oauth2" + "x-go-name": "SwaggerOAuthIntrospectionRequest", + "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "swaggerOAuthTokenResponse": { "description": "SwaggerOAuthTokenResponse The token response", @@ -4220,6 +4023,7 @@ "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "swaggerRevokeOAuth2TokenParameters": { + "description": "SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters", "type": "object", "required": [ "token" @@ -4231,7 +4035,8 @@ "x-go-name": "Token" } }, - "x-go-package": "github.com/ory/hydra/oauth2" + "x-go-name": "SwaggerRevokeOAuth2TokenParameters", + "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "swaggerVersion": { "description": "SwaggerVersion swagger version", @@ -4247,6 +4052,7 @@ "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "swaggeroauth2TokenParameters": { + "description": "Swaggeroauth2TokenParameters swaggeroauth2 token parameters", "type": "object", "required": [ "grant_type" @@ -4273,7 +4079,8 @@ "x-go-name": "RedirectURI" } }, - "x-go-package": "github.com/ory/hydra/oauth2" + "x-go-name": "Swaggeroauth2TokenParameters", + "x-go-package": "github.com/ory/hydra/sdk/go/hydra/models" }, "swaggeroauth2TokenResponse": { "description": "Swaggeroauth2TokenResponse The Access Token Response", diff --git a/oauth2/doc.go b/oauth2/doc.go index 9ec5840b72..fe2b6ced9c 100644 --- a/oauth2/doc.go +++ b/oauth2/doc.go @@ -278,8 +278,8 @@ type swaggerOAuthTokenResponse struct { type swaggerOAuthIntrospectionRequest struct { // 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 [RFC6749], Section 5.1. - // This endpoint DOES NOT accept refresh tokens for validation. + // defined in OAuth 2.0. For refresh tokens, this is the "refresh_token" + // value returned. // // required: true // in: formData diff --git a/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go b/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go index 66abc3ac76..17f2a284b0 100644 --- a/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go +++ b/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go @@ -70,8 +70,8 @@ type IntrospectOAuth2TokenParams struct { /*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 [RFC6749], Section 5.1. - This endpoint DOES NOT accept refresh tokens for validation. + defined in OAuth 2.0. For refresh tokens, this is the "refresh_token" + value returned. */ Token string diff --git a/sdk/go/hydra/models/authentication_request.go b/sdk/go/hydra/models/authentication_request.go index 199ebeb44e..f96753e1d1 100644 --- a/sdk/go/hydra/models/authentication_request.go +++ b/sdk/go/hydra/models/authentication_request.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/swag" ) -// AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest Contains information on an ongoing login request. +// AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest AuthenticationRequest Contains information on an ongoing login request. // swagger:model AuthenticationRequest type AuthenticationRequest struct { diff --git a/sdk/go/hydra/models/authentication_session.go b/sdk/go/hydra/models/authentication_session.go index 1a35521a2f..bed13375f7 100644 --- a/sdk/go/hydra/models/authentication_session.go +++ b/sdk/go/hydra/models/authentication_session.go @@ -13,7 +13,7 @@ import ( "github.com/go-openapi/validate" ) -// AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session +// AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session // swagger:model AuthenticationSession type AuthenticationSession struct { @@ -45,6 +45,7 @@ type AuthenticationSession struct { // Format: date-time // Format: date-time // Format: date-time + // Format: date-time AuthenticatedAt strfmt.DateTime `json:"AuthenticatedAt,omitempty"` // ID diff --git a/sdk/go/hydra/models/client.go b/sdk/go/hydra/models/client.go index d311a75d14..dfea88e6cd 100644 --- a/sdk/go/hydra/models/client.go +++ b/sdk/go/hydra/models/client.go @@ -13,7 +13,7 @@ import ( "github.com/go-openapi/validate" ) -// Client Client represents an OAuth 2.0 Client. +// Client Client Client represents an OAuth 2.0 Client. // swagger:model Client type Client struct { @@ -50,6 +50,7 @@ type Client struct { // CreatedAt returns the timestamp of the client's creation. // Format: date-time + // Format: date-time CreatedAt strfmt.DateTime `json:"created_at,omitempty"` // Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be @@ -154,6 +155,7 @@ type Client struct { // UpdatedAt returns the timestamp of the last update. // Format: date-time + // Format: date-time UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` // JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT diff --git a/sdk/go/hydra/models/consent_request.go b/sdk/go/hydra/models/consent_request.go index d7b8e6a667..064bc1e600 100644 --- a/sdk/go/hydra/models/consent_request.go +++ b/sdk/go/hydra/models/consent_request.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/swag" ) -// ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest ConsentRequest Contains information on an ongoing consent request. +// ConsentRequest Contains information on an ongoing consent request. // swagger:model ConsentRequest type ConsentRequest struct { diff --git a/sdk/go/hydra/models/consent_request_session_data.go b/sdk/go/hydra/models/consent_request_session_data.go index 3fe7774501..442778a038 100644 --- a/sdk/go/hydra/models/consent_request_session_data.go +++ b/sdk/go/hydra/models/consent_request_session_data.go @@ -11,7 +11,7 @@ import ( "github.com/go-openapi/swag" ) -// ConsentRequestSessionData Used to pass session data to a consent request. +// ConsentRequestSessionData ConsentRequestSessionData Used to pass session data to a consent request. // swagger:model ConsentRequestSessionData type ConsentRequestSessionData struct { diff --git a/sdk/go/hydra/models/empty_response.go b/sdk/go/hydra/models/empty_response.go index 68db4989ef..6eaed2a210 100644 --- a/sdk/go/hydra/models/empty_response.go +++ b/sdk/go/hydra/models/empty_response.go @@ -5,7 +5,7 @@ package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command -// EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is +// EmptyResponse EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is // typically 201. -// swagger:model emptyResponse +// swagger:model EmptyResponse type EmptyResponse interface{} diff --git a/sdk/go/hydra/models/generic_error.go b/sdk/go/hydra/models/generic_error.go index 6db5020308..1ee4bb88a7 100644 --- a/sdk/go/hydra/models/generic_error.go +++ b/sdk/go/hydra/models/generic_error.go @@ -13,10 +13,10 @@ import ( "github.com/go-openapi/validate" ) -// GenericError Error response +// GenericError GenericError Error response // // Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. -// swagger:model genericError +// swagger:model GenericError type GenericError struct { // Code represents the error status code (404, 403, 401, ...). diff --git a/sdk/go/hydra/models/handled_authentication_request.go b/sdk/go/hydra/models/handled_authentication_request.go index 44b7f0862d..2dbb60f7d5 100644 --- a/sdk/go/hydra/models/handled_authentication_request.go +++ b/sdk/go/hydra/models/handled_authentication_request.go @@ -13,7 +13,7 @@ import ( "github.com/go-openapi/validate" ) -// HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest The request payload used to accept a login request. +// HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest HandledAuthenticationRequest The request payload used to accept a login request. // swagger:model HandledAuthenticationRequest type HandledAuthenticationRequest struct { diff --git a/sdk/go/hydra/models/handled_consent_request.go b/sdk/go/hydra/models/handled_consent_request.go index b7b13f1264..b921a1e191 100644 --- a/sdk/go/hydra/models/handled_consent_request.go +++ b/sdk/go/hydra/models/handled_consent_request.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/swag" ) -// HandledConsentRequest HandledConsentRequest The request payload used to accept a consent request. +// HandledConsentRequest HandledConsentRequest HandledConsentRequest The request payload used to accept a consent request. // swagger:model HandledConsentRequest type HandledConsentRequest struct { diff --git a/sdk/go/hydra/models/handled_login_request.go b/sdk/go/hydra/models/handled_login_request.go index a4333454a1..64fda02db8 100644 --- a/sdk/go/hydra/models/handled_login_request.go +++ b/sdk/go/hydra/models/handled_login_request.go @@ -13,7 +13,7 @@ import ( "github.com/go-openapi/validate" ) -// HandledLoginRequest HandledLoginRequest HandledLoginRequest HandledLoginRequest is the request payload used to accept a login request. +// HandledLoginRequest HandledLoginRequest is the request payload used to accept a login request. // swagger:model HandledLoginRequest type HandledLoginRequest struct { diff --git a/sdk/go/hydra/models/introspection.go b/sdk/go/hydra/models/introspection.go index ecd25ef7cb..2fa9fee8e9 100644 --- a/sdk/go/hydra/models/introspection.go +++ b/sdk/go/hydra/models/introspection.go @@ -13,7 +13,7 @@ import ( "github.com/go-openapi/validate" ) -// Introspection Introspection Introspection Introspection Introspection Introspection contains an access token's session data as specified by IETF RFC 7662, see: +// Introspection Introspection contains an access token's session data as specified by IETF RFC 7662, see: // // https://tools.ietf.org/html/rfc7662 // swagger:model Introspection diff --git a/sdk/go/hydra/models/login_request.go b/sdk/go/hydra/models/login_request.go index 8c721ef40c..81df12a9d3 100644 --- a/sdk/go/hydra/models/login_request.go +++ b/sdk/go/hydra/models/login_request.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/swag" ) -// LoginRequest Contains information on an ongoing login request. +// LoginRequest LoginRequest Contains information on an ongoing login request. // swagger:model LoginRequest type LoginRequest struct { diff --git a/sdk/go/hydra/models/logout_request.go b/sdk/go/hydra/models/logout_request.go index aea62a45c2..9adcd42585 100644 --- a/sdk/go/hydra/models/logout_request.go +++ b/sdk/go/hydra/models/logout_request.go @@ -11,7 +11,7 @@ import ( "github.com/go-openapi/swag" ) -// LogoutRequest LogoutRequest Contains information about an ongoing logout request. +// LogoutRequest LogoutRequest LogoutRequest Contains information about an ongoing logout request. // swagger:model LogoutRequest type LogoutRequest struct { diff --git a/sdk/go/hydra/models/open_id_connect_context.go b/sdk/go/hydra/models/open_id_connect_context.go index c861a58746..5488c51f2c 100644 --- a/sdk/go/hydra/models/open_id_connect_context.go +++ b/sdk/go/hydra/models/open_id_connect_context.go @@ -11,7 +11,7 @@ import ( "github.com/go-openapi/swag" ) -// OpenIDConnectContext Contains optional information about the OpenID Connect request. +// OpenIDConnectContext OpenIDConnectContext Contains optional information about the OpenID Connect request. // swagger:model OpenIDConnectContext type OpenIDConnectContext struct { diff --git a/sdk/go/hydra/models/previous_consent_session.go b/sdk/go/hydra/models/previous_consent_session.go index 6a77f68a85..9b2ec97d55 100644 --- a/sdk/go/hydra/models/previous_consent_session.go +++ b/sdk/go/hydra/models/previous_consent_session.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/swag" ) -// PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests +// PreviousConsentSession The response used to return used consent requests // same as HandledLoginRequest, just with consent_request exposed as json // swagger:model PreviousConsentSession type PreviousConsentSession struct { diff --git a/sdk/go/hydra/models/request_handler_response.go b/sdk/go/hydra/models/request_handler_response.go index 1ce8f035dd..65d535287e 100644 --- a/sdk/go/hydra/models/request_handler_response.go +++ b/sdk/go/hydra/models/request_handler_response.go @@ -11,7 +11,7 @@ import ( "github.com/go-openapi/swag" ) -// RequestHandlerResponse RequestHandlerResponse The response payload sent when accepting or rejecting a login or consent request. +// RequestHandlerResponse RequestHandlerResponse RequestHandlerResponse The response payload sent when accepting or rejecting a login or consent request. // swagger:model RequestHandlerResponse type RequestHandlerResponse struct { diff --git a/sdk/go/hydra/models/swagger_flush_inactive_access_tokens.go b/sdk/go/hydra/models/swagger_flush_inactive_access_tokens.go index d7d1f94591..142c2bfb3e 100644 --- a/sdk/go/hydra/models/swagger_flush_inactive_access_tokens.go +++ b/sdk/go/hydra/models/swagger_flush_inactive_access_tokens.go @@ -12,8 +12,8 @@ import ( "github.com/go-openapi/swag" ) -// SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens -// swagger:model swaggerFlushInactiveAccessTokens +// SwaggerFlushInactiveAccessTokens SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens +// swagger:model SwaggerFlushInactiveAccessTokens type SwaggerFlushInactiveAccessTokens struct { // body diff --git a/sdk/go/hydra/models/swagger_json_web_key_query.go b/sdk/go/hydra/models/swagger_json_web_key_query.go index 098aa41934..fafe15f5c8 100644 --- a/sdk/go/hydra/models/swagger_json_web_key_query.go +++ b/sdk/go/hydra/models/swagger_json_web_key_query.go @@ -13,8 +13,8 @@ import ( "github.com/go-openapi/validate" ) -// SwaggerJSONWebKeyQuery swagger Json web key query -// swagger:model swaggerJsonWebKeyQuery +// SwaggerJSONWebKeyQuery swagger JSON web key query +// swagger:model SwaggerJSONWebKeyQuery type SwaggerJSONWebKeyQuery struct { // The kid of the desired key @@ -28,7 +28,7 @@ type SwaggerJSONWebKeyQuery struct { Set *string `json:"set"` } -// Validate validates this swagger Json web key query +// Validate validates this swagger JSON web key query func (m *SwaggerJSONWebKeyQuery) Validate(formats strfmt.Registry) error { var res []error diff --git a/sdk/go/hydra/models/swagger_jwk_create_set.go b/sdk/go/hydra/models/swagger_jwk_create_set.go index a1a40d685c..f5856380ec 100644 --- a/sdk/go/hydra/models/swagger_jwk_create_set.go +++ b/sdk/go/hydra/models/swagger_jwk_create_set.go @@ -14,7 +14,7 @@ import ( ) // SwaggerJwkCreateSet swagger jwk create set -// swagger:model swaggerJwkCreateSet +// swagger:model SwaggerJwkCreateSet type SwaggerJwkCreateSet struct { // body diff --git a/sdk/go/hydra/models/swagger_jwk_set_query.go b/sdk/go/hydra/models/swagger_jwk_set_query.go index 3df12e9d67..e0e99a5933 100644 --- a/sdk/go/hydra/models/swagger_jwk_set_query.go +++ b/sdk/go/hydra/models/swagger_jwk_set_query.go @@ -14,7 +14,7 @@ import ( ) // SwaggerJwkSetQuery swagger jwk set query -// swagger:model swaggerJwkSetQuery +// swagger:model SwaggerJwkSetQuery type SwaggerJwkSetQuery struct { // The set diff --git a/sdk/go/hydra/models/swagger_jwk_update_set.go b/sdk/go/hydra/models/swagger_jwk_update_set.go index 441f90e565..60dd4a69c3 100644 --- a/sdk/go/hydra/models/swagger_jwk_update_set.go +++ b/sdk/go/hydra/models/swagger_jwk_update_set.go @@ -14,7 +14,7 @@ import ( ) // SwaggerJwkUpdateSet swagger jwk update set -// swagger:model swaggerJwkUpdateSet +// swagger:model SwaggerJwkUpdateSet type SwaggerJwkUpdateSet struct { // body diff --git a/sdk/go/hydra/models/swagger_jwk_update_set_key.go b/sdk/go/hydra/models/swagger_jwk_update_set_key.go index b7d18dc61e..3fd8eec1bb 100644 --- a/sdk/go/hydra/models/swagger_jwk_update_set_key.go +++ b/sdk/go/hydra/models/swagger_jwk_update_set_key.go @@ -14,7 +14,7 @@ import ( ) // SwaggerJwkUpdateSetKey swagger jwk update set key -// swagger:model swaggerJwkUpdateSetKey +// swagger:model SwaggerJwkUpdateSetKey type SwaggerJwkUpdateSetKey struct { // body diff --git a/sdk/go/hydra/models/swagger_o_auth_introspection_request.go b/sdk/go/hydra/models/swagger_o_auth_introspection_request.go index 509997f4d7..1b0972716c 100644 --- a/sdk/go/hydra/models/swagger_o_auth_introspection_request.go +++ b/sdk/go/hydra/models/swagger_o_auth_introspection_request.go @@ -13,8 +13,8 @@ import ( "github.com/go-openapi/validate" ) -// SwaggerOAuthIntrospectionRequest swagger o auth introspection request -// swagger:model swaggerOAuthIntrospectionRequest +// SwaggerOAuthIntrospectionRequest SwaggerOAuthIntrospectionRequest swagger o auth introspection request +// swagger:model SwaggerOAuthIntrospectionRequest type SwaggerOAuthIntrospectionRequest struct { // An optional, space separated list of required scopes. If the access token was not granted one of the diff --git a/sdk/go/hydra/models/swagger_revoke_o_auth2_token_parameters.go b/sdk/go/hydra/models/swagger_revoke_o_auth2_token_parameters.go index 08a973c056..f0adaa921f 100644 --- a/sdk/go/hydra/models/swagger_revoke_o_auth2_token_parameters.go +++ b/sdk/go/hydra/models/swagger_revoke_o_auth2_token_parameters.go @@ -13,8 +13,8 @@ import ( "github.com/go-openapi/validate" ) -// SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters -// swagger:model swaggerRevokeOAuth2TokenParameters +// SwaggerRevokeOAuth2TokenParameters SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters +// swagger:model SwaggerRevokeOAuth2TokenParameters type SwaggerRevokeOAuth2TokenParameters struct { // in: formData diff --git a/sdk/go/hydra/models/swaggeroauth2_token_parameters.go b/sdk/go/hydra/models/swaggeroauth2_token_parameters.go index c574ac70eb..3ec4f82e1a 100644 --- a/sdk/go/hydra/models/swaggeroauth2_token_parameters.go +++ b/sdk/go/hydra/models/swaggeroauth2_token_parameters.go @@ -13,8 +13,8 @@ import ( "github.com/go-openapi/validate" ) -// Swaggeroauth2TokenParameters swaggeroauth2 token parameters -// swagger:model swaggeroauth2TokenParameters +// Swaggeroauth2TokenParameters Swaggeroauth2TokenParameters swaggeroauth2 token parameters +// swagger:model Swaggeroauth2TokenParameters type Swaggeroauth2TokenParameters struct { // in: formData diff --git a/sdk/go/hydra/models/well_known.go b/sdk/go/hydra/models/well_known.go index e4b4255829..748b7fc4c5 100644 --- a/sdk/go/hydra/models/well_known.go +++ b/sdk/go/hydra/models/well_known.go @@ -13,7 +13,7 @@ import ( "github.com/go-openapi/validate" ) -// WellKnown WellKnown WellKnown represents important OpenID Connect discovery metadata +// WellKnown WellKnown WellKnown WellKnown represents important OpenID Connect discovery metadata // // It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms // among others. diff --git a/sdk/java/hydra-client-resttemplate/.swagger-codegen/VERSION b/sdk/java/hydra-client-resttemplate/.swagger-codegen/VERSION index 26f8b8bcdf..6b4d157738 100644 --- a/sdk/java/hydra-client-resttemplate/.swagger-codegen/VERSION +++ b/sdk/java/hydra-client-resttemplate/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.5 \ No newline at end of file +2.2.3 \ No newline at end of file diff --git a/sdk/java/hydra-client-resttemplate/README.md b/sdk/java/hydra-client-resttemplate/README.md index 732cef0992..5c81c4270d 100644 --- a/sdk/java/hydra-client-resttemplate/README.md +++ b/sdk/java/hydra-client-resttemplate/README.md @@ -1,36 +1,24 @@ # hydra-client-resttemplate -ORY Hydra -- API version: latest - - Build date: 2019-04-25T13:51:05.405+02:00 - -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - - -*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)* - - ## Requirements -Building the API client library requires: -1. Java 1.7+ -2. Maven/Gradle +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. ## Installation To install the API client library to your local Maven repository, simply execute: ```shell -mvn clean install +mvn install ``` To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: ```shell -mvn clean deploy +mvn deploy ``` -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. ### Maven users @@ -38,10 +26,10 @@ Add this dependency to your project's POM: ```xml - com.github.ory - hydra-client-resttemplate - 1.0.0 - compile + com.github.ory + hydra-client-resttemplate + 1.0.0 + compile ``` @@ -57,14 +45,12 @@ compile "com.github.ory:hydra-client-resttemplate:1.0.0" At first generate the JAR by executing: -```shell -mvn clean package -``` + mvn package Then manually install the following JARs: -* `target/hydra-client-resttemplate-1.0.0.jar` -* `target/lib/*.jar` +* target/hydra-client-resttemplate-1.0.0.jar +* target/lib/*.jar ## Getting Started @@ -181,7 +167,6 @@ Class | Method | HTTP request | Description - [SwaggerFlushInactiveAccessTokens](docs/SwaggerFlushInactiveAccessTokens.md) - [SwaggerHealthStatus](docs/SwaggerHealthStatus.md) - [SwaggerJSONWebKey](docs/SwaggerJSONWebKey.md) - - [SwaggerJSONWebKeyQuery](docs/SwaggerJSONWebKeyQuery.md) - [SwaggerJSONWebKeySet](docs/SwaggerJSONWebKeySet.md) - [SwaggerJsonWebKeyQuery](docs/SwaggerJsonWebKeyQuery.md) - [SwaggerJwkCreateSet](docs/SwaggerJwkCreateSet.md) diff --git a/sdk/java/hydra-client-resttemplate/build.gradle b/sdk/java/hydra-client-resttemplate/build.gradle index 057b70d134..07160f09c6 100644 --- a/sdk/java/hydra-client-resttemplate/build.gradle +++ b/sdk/java/hydra-client-resttemplate/build.gradle @@ -94,12 +94,11 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.17" + swagger_annotations_version = "1.5.15" jackson_version = "2.8.9" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" junit_version = "4.12" - jackson_threeten_version = "2.6.4" } dependencies { @@ -109,6 +108,7 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_threeten_version" + compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" + compile "joda-time:joda-time:$jodatime_version" testCompile "junit:junit:$junit_version" } diff --git a/sdk/java/hydra-client-resttemplate/docs/AdminApi.md b/sdk/java/hydra-client-resttemplate/docs/AdminApi.md index 27f517dcc8..999e5d2669 100644 --- a/sdk/java/hydra-client-resttemplate/docs/AdminApi.md +++ b/sdk/java/hydra-client-resttemplate/docs/AdminApi.md @@ -742,7 +742,7 @@ OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); oauth2.setAccessToken("YOUR ACCESS TOKEN"); AdminApi apiInstance = new AdminApi(); -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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. +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); @@ -757,7 +757,7 @@ try { 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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. | + **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 diff --git a/sdk/java/hydra-client-resttemplate/docs/AuthenticationSession.md b/sdk/java/hydra-client-resttemplate/docs/AuthenticationSession.md index 386ddbdcfc..fea36dc979 100644 --- a/sdk/java/hydra-client-resttemplate/docs/AuthenticationSession.md +++ b/sdk/java/hydra-client-resttemplate/docs/AuthenticationSession.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**authenticatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time | [optional] +**authenticatedAt** | [**DateTime**](DateTime.md) | authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time | [optional] **ID** | **String** | ID | [optional] **subject** | **String** | subject | [optional] diff --git a/sdk/java/hydra-client-resttemplate/docs/Client.md b/sdk/java/hydra-client-resttemplate/docs/Client.md index 463a0cd793..f7d416cce4 100644 --- a/sdk/java/hydra-client-resttemplate/docs/Client.md +++ b/sdk/java/hydra-client-resttemplate/docs/Client.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **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>** | Contacts is a array of strings representing ways to contact people responsible for this client, typically email addresses. | [optional] -**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | CreatedAt returns the timestamp of the client's creation. Format: date-time | [optional] +**createdAt** | [**DateTime**](DateTime.md) | CreatedAt returns the timestamp of the client's creation. Format: date-time | [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>** | GrantTypes is an array of grant types the client is allowed to use. | [optional] @@ -33,7 +33,7 @@ Name | Type | Description | Notes **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] **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**](OffsetDateTime.md) | UpdatedAt returns the timestamp of the last update. Format: date-time | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | UpdatedAt returns the timestamp of the last update. Format: date-time | [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] diff --git a/sdk/java/hydra-client-resttemplate/docs/FlushInactiveOAuth2TokensRequest.md b/sdk/java/hydra-client-resttemplate/docs/FlushInactiveOAuth2TokensRequest.md index 4970aeaaa5..a70051cd3f 100644 --- a/sdk/java/hydra-client-resttemplate/docs/FlushInactiveOAuth2TokensRequest.md +++ b/sdk/java/hydra-client-resttemplate/docs/FlushInactiveOAuth2TokensRequest.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**notAfter** | [**OffsetDateTime**](OffsetDateTime.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] +**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] diff --git a/sdk/java/hydra-client-resttemplate/docs/OAuth2Client.md b/sdk/java/hydra-client-resttemplate/docs/OAuth2Client.md index 26aff14437..6079e4ad3e 100644 --- a/sdk/java/hydra-client-resttemplate/docs/OAuth2Client.md +++ b/sdk/java/hydra-client-resttemplate/docs/OAuth2Client.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **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>** | Contacts is a array of strings representing ways to contact people responsible for this client, typically email addresses. | [optional] -**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | CreatedAt returns the timestamp of the client's creation. | [optional] +**createdAt** | [**DateTime**](DateTime.md) | 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>** | GrantTypes is an array of grant types the client is allowed to use. | [optional] @@ -33,7 +33,7 @@ Name | Type | Description | Notes **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] **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**](OffsetDateTime.md) | UpdatedAt returns the timestamp of the last update. | [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] diff --git a/sdk/java/hydra-client-resttemplate/docs/PreviousConsentSession.md b/sdk/java/hydra-client-resttemplate/docs/PreviousConsentSession.md index c0640709ec..e0fe77f002 100644 --- a/sdk/java/hydra-client-resttemplate/docs/PreviousConsentSession.md +++ b/sdk/java/hydra-client-resttemplate/docs/PreviousConsentSession.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **grantScope** | **List<String>** | GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope` | [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** | [**ConsentRequestSessionData**](ConsentRequestSessionData.md) | | [optional] +**session** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] diff --git a/sdk/java/hydra-client-resttemplate/git_push.sh b/sdk/java/hydra-client-resttemplate/git_push.sh index ae01b182ae..ed374619b1 100644 --- a/sdk/java/hydra-client-resttemplate/git_push.sh +++ b/sdk/java/hydra-client-resttemplate/git_push.sh @@ -36,7 +36,7 @@ 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." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/sdk/java/hydra-client-resttemplate/pom.xml b/sdk/java/hydra-client-resttemplate/pom.xml index 69957045c1..dd5cbbe5cb 100644 --- a/sdk/java/hydra-client-resttemplate/pom.xml +++ b/sdk/java/hydra-client-resttemplate/pom.xml @@ -1,258 +1,243 @@ - 4.0.0 - com.github.ory - hydra-client-resttemplate - jar - hydra-client-resttemplate - 1.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + com.github.ory + hydra-client-resttemplate + jar + hydra-client-resttemplate + 1.0.0 + https://github.com/swagger-api/swagger-codegen + Swagger Java + + scm:git:git@github.com:swagger-api/swagger-codegen.git + scm:git:git@github.com:swagger-api/swagger-codegen.git https://github.com/swagger-api/swagger-codegen - Swagger Java - - scm:git:git@github.com:swagger-api/swagger-codegen.git - scm:git:git@github.com:swagger-api/swagger-codegen.git - https://github.com/swagger-api/swagger-codegen - + + + 2.2.0 + - - - Unlicense - http://unlicense.org - repo - - + + + Unlicense + http://unlicense.org + repo + + - - - Swagger - apiteam@swagger.io - Swagger - http://swagger.io - - + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - - - + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 1.7 + 1.7 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + - - - io.swagger - swagger-annotations - ${swagger-annotations-version} - + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + - - - org.springframework - spring-web - ${spring-web-version} - + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + - - - com.fasterxml.jackson.core - jackson-core - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson-version} - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - ${jackson-version} - - - com.github.joschi.jackson - jackson-datatype-threetenbp - ${jackson-threetenbp-version} - + + + org.springframework + spring-web + ${spring-web-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-joda + ${jackson-version} + + + joda-time + joda-time + ${jodatime-version} + - - - junit - junit - ${junit-version} - test - - - - UTF-8 - 1.5.17 - 4.3.9.RELEASE - 2.8.9 - 2.6.4 - 1.0.0 - 4.12 - + + + junit + junit + ${junit-version} + test + + + + UTF-8 + 1.5.15 + 4.3.9.RELEASE + 2.8.9 + 2.9.9 + 1.0.0 + 4.12 + diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java index 8136708a64..aa3dd36cd1 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/ApiClient.java @@ -24,11 +24,6 @@ import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponentsBuilder; -import org.threeten.bp.*; -import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; -import com.fasterxml.jackson.databind.ObjectMapper; import java.io.BufferedReader; import java.io.IOException; @@ -55,7 +50,7 @@ import com.github.ory.hydra.auth.ApiKeyAuth; import com.github.ory.hydra.auth.OAuth; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") @Component("com.github.ory.hydra.ApiClient") public class ApiClient { public enum CollectionFormat { @@ -256,9 +251,6 @@ public ApiClient setUserAgent(String userAgent) { * @return ApiClient this client */ public ApiClient addDefaultHeader(String name, String value) { - if (defaultHeaders.containsKey(name)) { - defaultHeaders.remove(name); - } defaultHeaders.add(name, value); return this; } @@ -310,12 +302,6 @@ public DateFormat getDateFormat() { */ public ApiClient setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; - for(HttpMessageConverter converter:restTemplate.getMessageConverters()){ - if(converter instanceof AbstractJackson2HttpMessageConverter){ - ObjectMapper mapper = ((AbstractJackson2HttpMessageConverter)converter).getObjectMapper(); - mapper.setDateFormat(dateFormat); - } - } return this; } @@ -413,11 +399,6 @@ public MultiValueMap parameterToMultiValueMap(CollectionFormat c * @return boolean true if the MediaType represents JSON, false otherwise */ public boolean isJsonMime(String mediaType) { - // "* / *" is default to JSON - if ("*/*".equals(mediaType)) { - return true; - } - try { return isJsonMime(MediaType.parseMediaType(mediaType)); } catch (InvalidMediaTypeException e) { @@ -569,16 +550,6 @@ protected void addHeadersToRequest(HttpHeaders headers, BodyBuilder requestBuild */ protected RestTemplate buildRestTemplate() { RestTemplate restTemplate = new RestTemplate(); - for(HttpMessageConverter converter:restTemplate.getMessageConverters()){ - if(converter instanceof AbstractJackson2HttpMessageConverter){ - ObjectMapper mapper = ((AbstractJackson2HttpMessageConverter)converter).getObjectMapper(); - ThreeTenModule module = new ThreeTenModule(); - module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT); - module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME); - module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME); - mapper.registerModule(module); - } - } // This allows us to read the response more than once - Necessary for debugging. restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(restTemplate.getRequestFactory())); return restTemplate; @@ -652,4 +623,4 @@ private String bodyToString(InputStream body) throws IOException { return builder.toString(); } } -} +} \ No newline at end of file diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/CustomInstantDeserializer.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/CustomInstantDeserializer.java deleted file mode 100644 index 7f16d2da84..0000000000 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/CustomInstantDeserializer.java +++ /dev/null @@ -1,232 +0,0 @@ -package com.github.ory.hydra; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonTokenId; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.datatype.threetenbp.DateTimeUtils; -import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils; -import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; -import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; -import com.fasterxml.jackson.datatype.threetenbp.function.Function; -import org.threeten.bp.DateTimeException; -import org.threeten.bp.Instant; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.ZoneId; -import org.threeten.bp.ZonedDateTime; -import org.threeten.bp.format.DateTimeFormatter; -import org.threeten.bp.temporal.Temporal; -import org.threeten.bp.temporal.TemporalAccessor; - -import java.io.IOException; -import java.math.BigDecimal; - -/** - * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s. - * Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format. - * - * @author Nick Williams - */ -public class CustomInstantDeserializer - extends ThreeTenDateTimeDeserializerBase { - private static final long serialVersionUID = 1L; - - public static final CustomInstantDeserializer INSTANT = new CustomInstantDeserializer( - Instant.class, DateTimeFormatter.ISO_INSTANT, - new Function() { - @Override - public Instant apply(TemporalAccessor temporalAccessor) { - return Instant.from(temporalAccessor); - } - }, - new Function() { - @Override - public Instant apply(FromIntegerArguments a) { - return Instant.ofEpochMilli(a.value); - } - }, - new Function() { - @Override - public Instant apply(FromDecimalArguments a) { - return Instant.ofEpochSecond(a.integer, a.fraction); - } - }, - null - ); - - public static final CustomInstantDeserializer OFFSET_DATE_TIME = new CustomInstantDeserializer( - OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, - new Function() { - @Override - public OffsetDateTime apply(TemporalAccessor temporalAccessor) { - return OffsetDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromIntegerArguments a) { - return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public OffsetDateTime apply(FromDecimalArguments a) { - return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { - return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); - } - } - ); - - public static final CustomInstantDeserializer ZONED_DATE_TIME = new CustomInstantDeserializer( - ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, - new Function() { - @Override - public ZonedDateTime apply(TemporalAccessor temporalAccessor) { - return ZonedDateTime.from(temporalAccessor); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromIntegerArguments a) { - return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); - } - }, - new Function() { - @Override - public ZonedDateTime apply(FromDecimalArguments a) { - return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); - } - }, - new BiFunction() { - @Override - public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { - return zonedDateTime.withZoneSameInstant(zoneId); - } - } - ); - - protected final Function fromMilliseconds; - - protected final Function fromNanoseconds; - - protected final Function parsedToValue; - - protected final BiFunction adjust; - - protected CustomInstantDeserializer(Class supportedType, - DateTimeFormatter parser, - Function parsedToValue, - Function fromMilliseconds, - Function fromNanoseconds, - BiFunction adjust) { - super(supportedType, parser); - this.parsedToValue = parsedToValue; - this.fromMilliseconds = fromMilliseconds; - this.fromNanoseconds = fromNanoseconds; - this.adjust = adjust == null ? new BiFunction() { - @Override - public T apply(T t, ZoneId zoneId) { - return t; - } - } : adjust; - } - - @SuppressWarnings("unchecked") - protected CustomInstantDeserializer(CustomInstantDeserializer base, DateTimeFormatter f) { - super((Class) base.handledType(), f); - parsedToValue = base.parsedToValue; - fromMilliseconds = base.fromMilliseconds; - fromNanoseconds = base.fromNanoseconds; - adjust = base.adjust; - } - - @Override - protected JsonDeserializer withDateFormat(DateTimeFormatter dtf) { - if (dtf == _formatter) { - return this; - } - return new CustomInstantDeserializer(this, dtf); - } - - @Override - public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { - //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only - //string values have to be adjusted to the configured TZ. - switch (parser.getCurrentTokenId()) { - case JsonTokenId.ID_NUMBER_FLOAT: { - BigDecimal value = parser.getDecimalValue(); - long seconds = value.longValue(); - int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); - return fromNanoseconds.apply(new FromDecimalArguments( - seconds, nanoseconds, getZone(context))); - } - - case JsonTokenId.ID_NUMBER_INT: { - long timestamp = parser.getLongValue(); - if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) { - return this.fromNanoseconds.apply(new FromDecimalArguments( - timestamp, 0, this.getZone(context) - )); - } - return this.fromMilliseconds.apply(new FromIntegerArguments( - timestamp, this.getZone(context) - )); - } - - case JsonTokenId.ID_STRING: { - String string = parser.getText().trim(); - if (string.length() == 0) { - return null; - } - if (string.endsWith("+0000")) { - string = string.substring(0, string.length() - 5) + "Z"; - } - T value; - try { - TemporalAccessor acc = _formatter.parse(string); - value = parsedToValue.apply(acc); - if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) { - return adjust.apply(value, this.getZone(context)); - } - } catch (DateTimeException e) { - throw _peelDTE(e); - } - return value; - } - } - throw context.mappingException("Expected type float, integer, or string."); - } - - private ZoneId getZone(DeserializationContext context) { - // Instants are always in UTC, so don't waste compute cycles - return (_valueClass == Instant.class) ? null : DateTimeUtils.timeZoneToZoneId(context.getTimeZone()); - } - - private static class FromIntegerArguments { - public final long value; - public final ZoneId zoneId; - - private FromIntegerArguments(long value, ZoneId zoneId) { - this.value = value; - this.zoneId = zoneId; - } - } - - private static class FromDecimalArguments { - public final long integer; - public final int fraction; - public final ZoneId zoneId; - - private FromDecimalArguments(long integer, int fraction, ZoneId zoneId) { - this.integer = integer; - this.fraction = fraction; - this.zoneId = zoneId; - } - } -} diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java index 2cd1777c58..a18b9ff870 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/AdminApi.java @@ -37,7 +37,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") @Component("com.github.ory.hydra.api.AdminApi") public class AdminApi { private ApiClient apiClient; @@ -684,7 +684,7 @@ public OAuth2Client getOAuth2Client(String id) throws RestClientException { *

200 - oAuth2TokenIntrospection *

401 - genericError *

500 - genericError - * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. + * @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 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 * @throws RestClientException if an error occurs while attempting to invoke the API diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/HealthApi.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/HealthApi.java index 7e2b3d623c..714e994497 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/HealthApi.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/HealthApi.java @@ -25,7 +25,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") @Component("com.github.ory.hydra.api.HealthApi") public class HealthApi { private ApiClient apiClient; diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java index 9ad71acb63..1ff393d905 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/PublicApi.java @@ -27,7 +27,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") @Component("com.github.ory.hydra.api.PublicApi") public class PublicApi { private ApiClient apiClient; diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/VersionApi.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/VersionApi.java index 31caaf259f..bd73d66d93 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/VersionApi.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/api/VersionApi.java @@ -23,7 +23,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") @Component("com.github.ory.hydra.api.VersionApi") public class VersionApi { private ApiClient apiClient; diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java index 4d773a18bc..a45d29ebf7 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/ApiKeyAuth.java @@ -3,7 +3,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java index a6858135a7..11b73d68dd 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/HttpBasicAuth.java @@ -7,7 +7,7 @@ import org.springframework.util.Base64Utils; import org.springframework.util.MultiValueMap; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class HttpBasicAuth implements Authentication { private String username; private String password; diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java index c04f96e230..cdb67a117b 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/auth/OAuth.java @@ -3,7 +3,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class OAuth implements Authentication { private String accessToken; diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java index 1e1c1c3e1d..93cc885fef 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptConsentRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * AcceptConsentRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class AcceptConsentRequest { @JsonProperty("grant_access_token_audience") private List grantAccessTokenAudience = null; @@ -106,7 +105,7 @@ public AcceptConsentRequest remember(Boolean remember) { * @return remember **/ @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 isRemember() { + public Boolean getRemember() { return remember; } @@ -197,6 +196,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java index 9a42e194ea..d44bcf14c2 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AcceptLoginRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * AcceptLoginRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class AcceptLoginRequest { @JsonProperty("acr") private String acr = null; @@ -119,7 +118,7 @@ public AcceptLoginRequest remember(Boolean remember) { * @return remember **/ @ApiModelProperty(value = "Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.") - public Boolean isRemember() { + public Boolean getRemember() { return remember; } @@ -212,6 +211,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationRequest.java index 22565c0c95..4bd2a586f4 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -28,7 +27,7 @@ /** * AuthenticationRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class AuthenticationRequest { @JsonProperty("challenge") private String challenge = null; @@ -209,7 +208,7 @@ public AuthenticationRequest skip(Boolean skip) { * @return skip **/ @ApiModelProperty(value = "Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.") - public Boolean isSkip() { + public Boolean getSkip() { return skip; } @@ -290,6 +289,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationSession.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationSession.java index 64c64b4259..7b967c0c0f 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationSession.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/AuthenticationSession.java @@ -14,22 +14,21 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.threeten.bp.OffsetDateTime; +import org.joda.time.DateTime; /** - * AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session + * AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session */ -@ApiModel(description = "AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@ApiModel(description = "AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class AuthenticationSession { @JsonProperty("AuthenticatedAt") - private OffsetDateTime authenticatedAt = null; + private DateTime authenticatedAt = null; @JsonProperty("ID") private String ID = null; @@ -37,21 +36,21 @@ public class AuthenticationSession { @JsonProperty("Subject") private String subject = null; - public AuthenticationSession authenticatedAt(OffsetDateTime authenticatedAt) { + public AuthenticationSession authenticatedAt(DateTime authenticatedAt) { this.authenticatedAt = authenticatedAt; return this; } /** - * authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time + * authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time * @return authenticatedAt **/ - @ApiModelProperty(value = "authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time") - public OffsetDateTime getAuthenticatedAt() { + @ApiModelProperty(value = "authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time") + public DateTime getAuthenticatedAt() { return authenticatedAt; } - public void setAuthenticatedAt(OffsetDateTime authenticatedAt) { + public void setAuthenticatedAt(DateTime authenticatedAt) { this.authenticatedAt = authenticatedAt; } @@ -134,6 +133,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Client.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Client.java index 017b3f4160..918fee44d6 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Client.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Client.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -23,12 +22,12 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.threeten.bp.OffsetDateTime; +import org.joda.time.DateTime; /** * Client */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class Client { @JsonProperty("allowed_cors_origins") private List allowedCorsOrigins = null; @@ -61,7 +60,7 @@ public class Client { private List contacts = null; @JsonProperty("created_at") - private OffsetDateTime createdAt = null; + private DateTime createdAt = null; @JsonProperty("frontchannel_logout_session_required") private Boolean frontchannelLogoutSessionRequired = null; @@ -118,7 +117,7 @@ public class Client { private String tosUri = null; @JsonProperty("updated_at") - private OffsetDateTime updatedAt = null; + private DateTime updatedAt = null; @JsonProperty("userinfo_signed_response_alg") private String userinfoSignedResponseAlg = null; @@ -185,7 +184,7 @@ public Client backchannelLogoutSessionRequired(Boolean backchannelLogoutSessionR * @return backchannelLogoutSessionRequired **/ @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.") - public Boolean isBackchannelLogoutSessionRequired() { + public Boolean getBackchannelLogoutSessionRequired() { return backchannelLogoutSessionRequired; } @@ -327,7 +326,7 @@ public void setContacts(List contacts) { this.contacts = contacts; } - public Client createdAt(OffsetDateTime createdAt) { + public Client createdAt(DateTime createdAt) { this.createdAt = createdAt; return this; } @@ -337,11 +336,11 @@ public Client createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @ApiModelProperty(value = "CreatedAt returns the timestamp of the client's creation. Format: date-time") - public OffsetDateTime getCreatedAt() { + public DateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(DateTime createdAt) { this.createdAt = createdAt; } @@ -355,7 +354,7 @@ public Client frontchannelLogoutSessionRequired(Boolean frontchannelLogoutSessio * @return frontchannelLogoutSessionRequired **/ @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.") - public Boolean isFrontchannelLogoutSessionRequired() { + public Boolean getFrontchannelLogoutSessionRequired() { return frontchannelLogoutSessionRequired; } @@ -709,7 +708,7 @@ public void setTosUri(String tosUri) { this.tosUri = tosUri; } - public Client updatedAt(OffsetDateTime updatedAt) { + public Client updatedAt(DateTime updatedAt) { this.updatedAt = updatedAt; return this; } @@ -719,11 +718,11 @@ public Client updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @ApiModelProperty(value = "UpdatedAt returns the timestamp of the last update. Format: date-time") - public OffsetDateTime getUpdatedAt() { + public DateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(DateTime updatedAt) { this.updatedAt = updatedAt; } @@ -844,6 +843,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java index d372a20907..58b6307142 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CompletedRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * CompletedRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class CompletedRequest { @JsonProperty("redirect_to") private String redirectTo = null; @@ -86,6 +85,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java index 8c1e709e94..93e43cfc01 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -30,7 +29,7 @@ /** * ConsentRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class ConsentRequest { @JsonProperty("acr") private String acr = null; @@ -282,7 +281,7 @@ public ConsentRequest skip(Boolean skip) { * @return skip **/ @ApiModelProperty(value = "Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.") - public Boolean isSkip() { + public Boolean getSkip() { return skip; } @@ -369,6 +368,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java index 6489279afb..f1bf095a5a 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSession.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * ConsentRequestSession */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class ConsentRequestSession { @JsonProperty("access_token") private Map accessToken = null; @@ -128,6 +127,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSessionData.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSessionData.java index 62a8afa8c9..263d0d2f17 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSessionData.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/ConsentRequestSessionData.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * ConsentRequestSessionData */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class ConsentRequestSessionData { @JsonProperty("access_token") private Map accessToken = null; @@ -128,6 +127,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CreateRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CreateRequest.java index 9fe5e43851..997e49bb90 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CreateRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/CreateRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * CreateRequest create request */ @ApiModel(description = "CreateRequest create request") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class CreateRequest { @JsonProperty("alg") private String alg = null; @@ -133,6 +132,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/EmptyResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/EmptyResponse.java index c46e4da1d3..decdecc7eb 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/EmptyResponse.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/EmptyResponse.java @@ -14,14 +14,13 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import io.swagger.annotations.ApiModel; /** - * Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. + * EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. */ -@ApiModel(description = "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@ApiModel(description = "EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class EmptyResponse { @Override @@ -60,6 +59,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java index 14308438ec..0845d8dea3 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java @@ -14,23 +14,22 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; -import org.threeten.bp.OffsetDateTime; +import org.joda.time.DateTime; /** * FlushInactiveOAuth2TokensRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class FlushInactiveOAuth2TokensRequest { @JsonProperty("notAfter") - private OffsetDateTime notAfter = null; + private DateTime notAfter = null; - public FlushInactiveOAuth2TokensRequest notAfter(OffsetDateTime notAfter) { + public FlushInactiveOAuth2TokensRequest notAfter(DateTime notAfter) { this.notAfter = notAfter; return this; } @@ -40,11 +39,11 @@ public FlushInactiveOAuth2TokensRequest notAfter(OffsetDateTime notAfter) { * @return notAfter **/ @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() { + public DateTime getNotAfter() { return notAfter; } - public void setNotAfter(OffsetDateTime notAfter) { + public void setNotAfter(DateTime notAfter) { this.notAfter = notAfter; } @@ -87,6 +86,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java index 1cfd177a74..a22b4db729 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/GenericError.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * 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 = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class GenericError { @JsonProperty("error") private String error = null; @@ -156,6 +155,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledAuthenticationRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledAuthenticationRequest.java index 14b406e6e1..d710977c38 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledAuthenticationRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledAuthenticationRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * HandledAuthenticationRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class HandledAuthenticationRequest { @JsonProperty("acr") private String acr = null; @@ -87,7 +86,7 @@ public HandledAuthenticationRequest remember(Boolean remember) { * @return remember **/ @ApiModelProperty(value = "Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.") - public Boolean isRemember() { + public Boolean getRemember() { return remember; } @@ -178,6 +177,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledConsentRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledConsentRequest.java index 55a83e02ca..2c483c8828 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledConsentRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledConsentRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * HandledConsentRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class HandledConsentRequest { @JsonProperty("grant_access_token_audience") private List grantAccessTokenAudience = null; @@ -106,7 +105,7 @@ public HandledConsentRequest remember(Boolean remember) { * @return remember **/ @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 isRemember() { + public Boolean getRemember() { return remember; } @@ -197,6 +196,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledLoginRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledLoginRequest.java index 969721ec46..3f27926bce 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledLoginRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HandledLoginRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * HandledLoginRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class HandledLoginRequest { @JsonProperty("acr") private String acr = null; @@ -119,7 +118,7 @@ public HandledLoginRequest remember(Boolean remember) { * @return remember **/ @ApiModelProperty(value = "Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.") - public Boolean isRemember() { + public Boolean getRemember() { return remember; } @@ -212,6 +211,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java index 50b50a4747..9c809fece6 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthNotReadyStatus.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * HealthNotReadyStatus */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class HealthNotReadyStatus { @JsonProperty("errors") private Map errors = null; @@ -97,6 +96,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java index c07741a354..86bf120b94 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/HealthStatus.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * HealthStatus */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class HealthStatus { @JsonProperty("status") private String status = null; @@ -86,6 +85,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Introspection.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Introspection.java index c30c76767d..dac70c2368 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Introspection.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Introspection.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -29,7 +28,7 @@ * https://tools.ietf.org/html/rfc7662 */ @ApiModel(description = "https://tools.ietf.org/html/rfc7662") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class Introspection { @JsonProperty("active") private Boolean active = null; @@ -80,7 +79,7 @@ public Introspection active(Boolean active) { * @return active **/ @ApiModelProperty(required = true, value = "Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time).") - public Boolean isActive() { + public Boolean getActive() { return active; } @@ -383,6 +382,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java index afbe0b44d6..8d3619ae15 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKey.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -26,7 +25,7 @@ /** * JSONWebKey */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class JSONWebKey { @JsonProperty("alg") private String alg = null; @@ -464,6 +463,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java index f745be4390..26c2a7af3d 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JSONWebKeySet.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ /** * JSONWebKeySet */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class JSONWebKeySet { @JsonProperty("keys") private List keys = null; @@ -97,6 +96,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java index 523a957483..b87363f9b6 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/JsonWebKeySetGeneratorRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * JsonWebKeySetGeneratorRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class JsonWebKeySetGeneratorRequest { @JsonProperty("alg") private String alg = null; @@ -132,6 +131,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java index 5377f986a9..a6d8530378 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LoginRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -28,7 +27,7 @@ /** * LoginRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class LoginRequest { @JsonProperty("challenge") private String challenge = null; @@ -209,7 +208,7 @@ public LoginRequest skip(Boolean skip) { * @return skip **/ @ApiModelProperty(value = "Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.") - public Boolean isSkip() { + public Boolean getSkip() { return skip; } @@ -290,6 +289,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java index 4966ca3fe1..beae906328 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/LogoutRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * LogoutRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class LogoutRequest { @JsonProperty("request_url") private String requestUrl = null; @@ -66,7 +65,7 @@ public LogoutRequest rpInitiated(Boolean rpInitiated) { * @return rpInitiated **/ @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 isRpInitiated() { + public Boolean getRpInitiated() { return rpInitiated; } @@ -155,6 +154,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java index 1ed39b4f97..71914387d9 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2Client.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -23,12 +22,12 @@ import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; -import org.threeten.bp.OffsetDateTime; +import org.joda.time.DateTime; /** * OAuth2Client */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class OAuth2Client { @JsonProperty("allowed_cors_origins") private List allowedCorsOrigins = null; @@ -61,7 +60,7 @@ public class OAuth2Client { private List contacts = null; @JsonProperty("created_at") - private OffsetDateTime createdAt = null; + private DateTime createdAt = null; @JsonProperty("frontchannel_logout_session_required") private Boolean frontchannelLogoutSessionRequired = null; @@ -118,7 +117,7 @@ public class OAuth2Client { private String tosUri = null; @JsonProperty("updated_at") - private OffsetDateTime updatedAt = null; + private DateTime updatedAt = null; @JsonProperty("userinfo_signed_response_alg") private String userinfoSignedResponseAlg = null; @@ -185,7 +184,7 @@ public OAuth2Client backchannelLogoutSessionRequired(Boolean backchannelLogoutSe * @return backchannelLogoutSessionRequired **/ @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.") - public Boolean isBackchannelLogoutSessionRequired() { + public Boolean getBackchannelLogoutSessionRequired() { return backchannelLogoutSessionRequired; } @@ -327,7 +326,7 @@ public void setContacts(List contacts) { this.contacts = contacts; } - public OAuth2Client createdAt(OffsetDateTime createdAt) { + public OAuth2Client createdAt(DateTime createdAt) { this.createdAt = createdAt; return this; } @@ -337,11 +336,11 @@ public OAuth2Client createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @ApiModelProperty(value = "CreatedAt returns the timestamp of the client's creation.") - public OffsetDateTime getCreatedAt() { + public DateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(OffsetDateTime createdAt) { + public void setCreatedAt(DateTime createdAt) { this.createdAt = createdAt; } @@ -355,7 +354,7 @@ public OAuth2Client frontchannelLogoutSessionRequired(Boolean frontchannelLogout * @return frontchannelLogoutSessionRequired **/ @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.") - public Boolean isFrontchannelLogoutSessionRequired() { + public Boolean getFrontchannelLogoutSessionRequired() { return frontchannelLogoutSessionRequired; } @@ -709,7 +708,7 @@ public void setTosUri(String tosUri) { this.tosUri = tosUri; } - public OAuth2Client updatedAt(OffsetDateTime updatedAt) { + public OAuth2Client updatedAt(DateTime updatedAt) { this.updatedAt = updatedAt; return this; } @@ -719,11 +718,11 @@ public OAuth2Client updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @ApiModelProperty(value = "UpdatedAt returns the timestamp of the last update.") - public OffsetDateTime getUpdatedAt() { + public DateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(OffsetDateTime updatedAt) { + public void setUpdatedAt(DateTime updatedAt) { this.updatedAt = updatedAt; } @@ -844,6 +843,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java index 3a2c7e281f..2f179be663 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OAuth2TokenIntrospection.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -29,7 +28,7 @@ * https://tools.ietf.org/html/rfc7662 */ @ApiModel(description = "https://tools.ietf.org/html/rfc7662") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class OAuth2TokenIntrospection { @JsonProperty("active") private Boolean active = null; @@ -80,7 +79,7 @@ public OAuth2TokenIntrospection active(Boolean active) { * @return active **/ @ApiModelProperty(required = true, value = "Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time).") - public Boolean isActive() { + public Boolean getActive() { return active; } @@ -383,6 +382,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java index 359d4f8de4..149852f9ee 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Oauth2TokenResponse.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * The Access Token Response */ @ApiModel(description = "The Access Token Response") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class Oauth2TokenResponse { @JsonProperty("access_token") private String accessToken = null; @@ -156,6 +155,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java index b573a7b050..bf4f75a282 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OauthTokenResponse.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * The token response */ @ApiModel(description = "The token response") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class OauthTokenResponse { @JsonProperty("access_token") private String accessToken = null; @@ -202,6 +201,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java index e8365179ac..06b6600472 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/OpenIDConnectContext.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -28,7 +27,7 @@ /** * OpenIDConnectContext */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class OpenIDConnectContext { @JsonProperty("acr_values") private List acrValues = null; @@ -206,6 +205,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java index 14c2565032..0e67a397f8 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/PreviousConsentSession.java @@ -14,22 +14,21 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.github.ory.hydra.model.ConsentRequest; -import com.github.ory.hydra.model.ConsentRequestSessionData; +import com.github.ory.hydra.model.ConsentRequestSession; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.ArrayList; import java.util.List; /** - * PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json + * The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json */ -@ApiModel(description = "PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@ApiModel(description = "The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class PreviousConsentSession { @JsonProperty("consent_request") private ConsentRequest consentRequest = null; @@ -47,7 +46,7 @@ public class PreviousConsentSession { private Long rememberFor = null; @JsonProperty("session") - private ConsentRequestSessionData session = null; + private ConsentRequestSession session = null; public PreviousConsentSession consentRequest(ConsentRequest consentRequest) { this.consentRequest = consentRequest; @@ -129,7 +128,7 @@ public PreviousConsentSession remember(Boolean remember) { * @return remember **/ @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 isRemember() { + public Boolean getRemember() { return remember; } @@ -155,7 +154,7 @@ public void setRememberFor(Long rememberFor) { this.rememberFor = rememberFor; } - public PreviousConsentSession session(ConsentRequestSessionData session) { + public PreviousConsentSession session(ConsentRequestSession session) { this.session = session; return this; } @@ -165,11 +164,11 @@ public PreviousConsentSession session(ConsentRequestSessionData session) { * @return session **/ @ApiModelProperty(value = "") - public ConsentRequestSessionData getSession() { + public ConsentRequestSession getSession() { return session; } - public void setSession(ConsentRequestSessionData session) { + public void setSession(ConsentRequestSession session) { this.session = session; } @@ -222,6 +221,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java index 83be867ad6..69493a059f 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RejectRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * RejectRequest */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class RejectRequest { @JsonProperty("error") private String error = null; @@ -178,6 +177,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestDeniedError.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestDeniedError.java index c086fdd229..d7f75abb16 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestDeniedError.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestDeniedError.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * RequestDeniedError */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class RequestDeniedError { @JsonProperty("error") private String error = null; @@ -178,6 +177,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestHandlerResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestHandlerResponse.java index b4c48fde1f..3263a680fc 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestHandlerResponse.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/RequestHandlerResponse.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * RequestHandlerResponse */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class RequestHandlerResponse { @JsonProperty("redirect_to") private String redirectTo = null; @@ -86,6 +85,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerFlushInactiveAccessTokens.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerFlushInactiveAccessTokens.java index cf77f94085..0a795794f0 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerFlushInactiveAccessTokens.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerFlushInactiveAccessTokens.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -23,9 +22,10 @@ import io.swagger.annotations.ApiModelProperty; /** - * SwaggerFlushInactiveAccessTokens + * SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@ApiModel(description = "SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerFlushInactiveAccessTokens { @JsonProperty("Body") private FlushInactiveOAuth2TokensRequest body = null; @@ -87,6 +87,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerHealthStatus.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerHealthStatus.java index dad967a3f1..dfec257d92 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerHealthStatus.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerHealthStatus.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * SwaggerHealthStatus swagger health status */ @ApiModel(description = "SwaggerHealthStatus swagger health status") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerHealthStatus { @JsonProperty("status") private String status = null; @@ -87,6 +86,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKey.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKey.java index ae301f03ff..40358775b7 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKey.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKey.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ * SwaggerJSONWebKey swagger JSON web key */ @ApiModel(description = "SwaggerJSONWebKey swagger JSON web key") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerJSONWebKey { @JsonProperty("alg") private String alg = null; @@ -465,6 +464,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKeySet.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKeySet.java index 083fa058e6..8a3acc99fb 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKeySet.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJSONWebKeySet.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -28,7 +27,7 @@ * SwaggerJSONWebKeySet swagger JSON web key set */ @ApiModel(description = "SwaggerJSONWebKeySet swagger JSON web key set") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerJSONWebKeySet { @JsonProperty("keys") private List keys = null; @@ -98,6 +97,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJsonWebKeyQuery.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJsonWebKeyQuery.java index bccd875e31..4a0af54057 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJsonWebKeyQuery.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJsonWebKeyQuery.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * SwaggerJsonWebKeyQuery */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerJsonWebKeyQuery { @JsonProperty("kid") private String kid = null; @@ -109,6 +108,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkCreateSet.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkCreateSet.java index 7c334adbea..0933e9288d 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkCreateSet.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkCreateSet.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ /** * SwaggerJwkCreateSet */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerJwkCreateSet { @JsonProperty("Body") private JsonWebKeySetGeneratorRequest body = null; @@ -110,6 +109,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkSetQuery.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkSetQuery.java index f37fc8889c..dbe3a7ee05 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkSetQuery.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkSetQuery.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * SwaggerJwkSetQuery */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerJwkSetQuery { @JsonProperty("set") private String set = null; @@ -86,6 +85,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSet.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSet.java index 8dfe048255..939f0f4e90 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSet.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSet.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ /** * SwaggerJwkUpdateSet */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerJwkUpdateSet { @JsonProperty("Body") private JSONWebKeySet body = null; @@ -110,6 +109,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSetKey.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSetKey.java index 9feafb8edf..73d1515633 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSetKey.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerJwkUpdateSetKey.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ /** * SwaggerJwkUpdateSetKey */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerJwkUpdateSetKey { @JsonProperty("Body") private JSONWebKey body = null; @@ -133,6 +132,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerNotReadyStatus.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerNotReadyStatus.java index c7e4a326c8..d97d2f361f 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerNotReadyStatus.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerNotReadyStatus.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -28,7 +27,7 @@ * SwaggerNotReadyStatus swagger not ready status */ @ApiModel(description = "SwaggerNotReadyStatus swagger not ready status") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerNotReadyStatus { @JsonProperty("errors") private Map errors = null; @@ -98,6 +97,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthIntrospectionRequest.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthIntrospectionRequest.java index 4c11b183b0..a70e7a4fee 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthIntrospectionRequest.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthIntrospectionRequest.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,9 +21,10 @@ import io.swagger.annotations.ApiModelProperty; /** - * SwaggerOAuthIntrospectionRequest + * SwaggerOAuthIntrospectionRequest swagger o auth introspection request */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@ApiModel(description = "SwaggerOAuthIntrospectionRequest swagger o auth introspection request") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerOAuthIntrospectionRequest { @JsonProperty("scope") private String scope = null; @@ -109,6 +109,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthTokenResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthTokenResponse.java index 0358e2bb61..dd370cd710 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthTokenResponse.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerOAuthTokenResponse.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * SwaggerOAuthTokenResponse The token response */ @ApiModel(description = "SwaggerOAuthTokenResponse The token response") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerOAuthTokenResponse { @JsonProperty("access_token") private String accessToken = null; @@ -202,6 +201,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerRevokeOAuth2TokenParameters.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerRevokeOAuth2TokenParameters.java index 661f8441a5..fa658c5725 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerRevokeOAuth2TokenParameters.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerRevokeOAuth2TokenParameters.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,9 +21,10 @@ import io.swagger.annotations.ApiModelProperty; /** - * SwaggerRevokeOAuth2TokenParameters + * SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@ApiModel(description = "SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerRevokeOAuth2TokenParameters { @JsonProperty("token") private String token = null; @@ -86,6 +86,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerVersion.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerVersion.java index 6d5299aa5e..f1cd282187 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerVersion.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggerVersion.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * SwaggerVersion swagger version */ @ApiModel(description = "SwaggerVersion swagger version") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggerVersion { @JsonProperty("version") private String version = null; @@ -87,6 +86,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenParameters.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenParameters.java index 3ccb473f0b..a301d91714 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenParameters.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenParameters.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -22,9 +21,10 @@ import io.swagger.annotations.ApiModelProperty; /** - * Swaggeroauth2TokenParameters + * Swaggeroauth2TokenParameters swaggeroauth2 token parameters */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@ApiModel(description = "Swaggeroauth2TokenParameters swaggeroauth2 token parameters") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class Swaggeroauth2TokenParameters { @JsonProperty("client_id") private String clientId = null; @@ -155,6 +155,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenResponse.java index 7af09d18a9..766b23d952 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenResponse.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Swaggeroauth2TokenResponse.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * Swaggeroauth2TokenResponse The Access Token Response */ @ApiModel(description = "Swaggeroauth2TokenResponse The Access Token Response") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class Swaggeroauth2TokenResponse { @JsonProperty("access_token") private String accessToken = null; @@ -156,6 +155,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggeruserinfoResponsePayload.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggeruserinfoResponsePayload.java index 0044c77f50..4126536fd9 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggeruserinfoResponsePayload.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/SwaggeruserinfoResponsePayload.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * SwaggeruserinfoResponsePayload The userinfo response */ @ApiModel(description = "SwaggeruserinfoResponsePayload The userinfo response") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class SwaggeruserinfoResponsePayload { @JsonProperty("birthdate") private String birthdate = null; @@ -130,7 +129,7 @@ public SwaggeruserinfoResponsePayload emailVerified(Boolean emailVerified) { * @return emailVerified **/ @ApiModelProperty(value = "True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.") - public Boolean isEmailVerified() { + public Boolean getEmailVerified() { return emailVerified; } @@ -292,7 +291,7 @@ public SwaggeruserinfoResponsePayload phoneNumberVerified(Boolean phoneNumberVer * @return phoneNumberVerified **/ @ApiModelProperty(value = "True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.") - public Boolean isPhoneNumberVerified() { + public Boolean getPhoneNumberVerified() { return phoneNumberVerified; } @@ -501,6 +500,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java index 9e21c46804..e2c19f27d6 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/UserinfoResponse.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -25,7 +24,7 @@ * The userinfo response */ @ApiModel(description = "The userinfo response") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class UserinfoResponse { @JsonProperty("birthdate") private String birthdate = null; @@ -130,7 +129,7 @@ public UserinfoResponse emailVerified(Boolean emailVerified) { * @return emailVerified **/ @ApiModelProperty(value = "True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating.") - public Boolean isEmailVerified() { + public Boolean getEmailVerified() { return emailVerified; } @@ -292,7 +291,7 @@ public UserinfoResponse phoneNumberVerified(Boolean phoneNumberVerified) { * @return phoneNumberVerified **/ @ApiModelProperty(value = "True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format.") - public Boolean isPhoneNumberVerified() { + public Boolean getPhoneNumberVerified() { return phoneNumberVerified; } @@ -501,6 +500,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java index 8e4cb57fc2..3c72914e13 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/Version.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -24,7 +23,7 @@ /** * Version */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class Version { @JsonProperty("version") private String version = null; @@ -86,6 +85,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java index b056c1d923..239eb6a031 100644 --- a/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java +++ b/sdk/java/hydra-client-resttemplate/src/main/java/com/github/ory/hydra/model/WellKnown.java @@ -14,7 +14,6 @@ package com.github.ory.hydra.model; import java.util.Objects; -import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -27,7 +26,7 @@ * 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 = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-25T13:51:05.405+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-04-26T09:49:08.655+02:00") public class WellKnown { @JsonProperty("authorization_endpoint") private String authorizationEndpoint = null; @@ -132,7 +131,7 @@ public WellKnown backchannelLogoutSessionSupported(Boolean backchannelLogoutSess * @return backchannelLogoutSessionSupported **/ @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 isBackchannelLogoutSessionSupported() { + public Boolean getBackchannelLogoutSessionSupported() { return backchannelLogoutSessionSupported; } @@ -150,7 +149,7 @@ public WellKnown backchannelLogoutSupported(Boolean backchannelLogoutSupported) * @return backchannelLogoutSupported **/ @ApiModelProperty(value = "Boolean value specifying whether the OP supports back-channel logout, with true indicating support.") - public Boolean isBackchannelLogoutSupported() { + public Boolean getBackchannelLogoutSupported() { return backchannelLogoutSupported; } @@ -168,7 +167,7 @@ public WellKnown claimsParameterSupported(Boolean claimsParameterSupported) { * @return claimsParameterSupported **/ @ApiModelProperty(value = "Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.") - public Boolean isClaimsParameterSupported() { + public Boolean getClaimsParameterSupported() { return claimsParameterSupported; } @@ -230,7 +229,7 @@ public WellKnown frontchannelLogoutSessionSupported(Boolean frontchannelLogoutSe * @return frontchannelLogoutSessionSupported **/ @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 isFrontchannelLogoutSessionSupported() { + public Boolean getFrontchannelLogoutSessionSupported() { return frontchannelLogoutSessionSupported; } @@ -248,7 +247,7 @@ public WellKnown frontchannelLogoutSupported(Boolean frontchannelLogoutSupported * @return frontchannelLogoutSupported **/ @ApiModelProperty(value = "Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.") - public Boolean isFrontchannelLogoutSupported() { + public Boolean getFrontchannelLogoutSupported() { return frontchannelLogoutSupported; } @@ -369,7 +368,7 @@ public WellKnown requestParameterSupported(Boolean requestParameterSupported) { * @return requestParameterSupported **/ @ApiModelProperty(value = "Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.") - public Boolean isRequestParameterSupported() { + public Boolean getRequestParameterSupported() { return requestParameterSupported; } @@ -387,7 +386,7 @@ public WellKnown requestUriParameterSupported(Boolean requestUriParameterSupport * @return requestUriParameterSupported **/ @ApiModelProperty(value = "Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.") - public Boolean isRequestUriParameterSupported() { + public Boolean getRequestUriParameterSupported() { return requestUriParameterSupported; } @@ -405,7 +404,7 @@ public WellKnown requireRequestUriRegistration(Boolean requireRequestUriRegistra * @return requireRequestUriRegistration **/ @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 isRequireRequestUriRegistration() { + public Boolean getRequireRequestUriRegistration() { return requireRequestUriRegistration; } @@ -704,6 +703,6 @@ private String toIndentedString(java.lang.Object o) { } return o.toString().replace("\n", "\n "); } - + } diff --git a/sdk/js/swagger/.swagger-codegen/VERSION b/sdk/js/swagger/.swagger-codegen/VERSION index 26f8b8bcdf..6b4d157738 100644 --- a/sdk/js/swagger/.swagger-codegen/VERSION +++ b/sdk/js/swagger/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.5 \ No newline at end of file +2.2.3 \ No newline at end of file diff --git a/sdk/js/swagger/README.md b/sdk/js/swagger/README.md index b922609127..12de52d979 100644 --- a/sdk/js/swagger/README.md +++ b/sdk/js/swagger/README.md @@ -196,7 +196,6 @@ Class | Method | HTTP request | Description - [OryHydra.SwaggerFlushInactiveAccessTokens](docs/SwaggerFlushInactiveAccessTokens.md) - [OryHydra.SwaggerHealthStatus](docs/SwaggerHealthStatus.md) - [OryHydra.SwaggerJSONWebKey](docs/SwaggerJSONWebKey.md) - - [OryHydra.SwaggerJSONWebKeyQuery](docs/SwaggerJSONWebKeyQuery.md) - [OryHydra.SwaggerJSONWebKeySet](docs/SwaggerJSONWebKeySet.md) - [OryHydra.SwaggerJsonWebKeyQuery](docs/SwaggerJsonWebKeyQuery.md) - [OryHydra.SwaggerJwkCreateSet](docs/SwaggerJwkCreateSet.md) diff --git a/sdk/js/swagger/docs/AdminApi.md b/sdk/js/swagger/docs/AdminApi.md index bad61a39a7..defea677f1 100644 --- a/sdk/js/swagger/docs/AdminApi.md +++ b/sdk/js/swagger/docs/AdminApi.md @@ -765,7 +765,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN'; var apiInstance = new OryHydra.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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. +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 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. @@ -785,7 +785,7 @@ apiInstance.introspectOAuth2Token(token, opts, callback); 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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. | + **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 diff --git a/sdk/js/swagger/docs/AuthenticationSession.md b/sdk/js/swagger/docs/AuthenticationSession.md index 5fd15755c8..9dfbb1a8c5 100644 --- a/sdk/js/swagger/docs/AuthenticationSession.md +++ b/sdk/js/swagger/docs/AuthenticationSession.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**authenticatedAt** | **Date** | authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time | [optional] +**authenticatedAt** | **Date** | authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time | [optional] **ID** | **String** | ID | [optional] **subject** | **String** | subject | [optional] diff --git a/sdk/js/swagger/docs/PreviousConsentSession.md b/sdk/js/swagger/docs/PreviousConsentSession.md index 1fafdf4e9e..a83bfb22a4 100644 --- a/sdk/js/swagger/docs/PreviousConsentSession.md +++ b/sdk/js/swagger/docs/PreviousConsentSession.md @@ -8,6 +8,6 @@ Name | Type | Description | Notes **grantScope** | **[String]** | GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope` | [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** | **Number** | 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** | [**ConsentRequestSessionData**](ConsentRequestSessionData.md) | | [optional] +**session** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] diff --git a/sdk/js/swagger/src/ApiClient.js b/sdk/js/swagger/src/ApiClient.js index 505d56adff..3d57462a24 100644 --- a/sdk/js/swagger/src/ApiClient.js +++ b/sdk/js/swagger/src/ApiClient.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -95,10 +95,6 @@ this.agent = new superagent.agent(); } - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; }; /** @@ -365,7 +361,6 @@ * @param {String} httpMethod The HTTP method to use. * @param {Object.} pathParams A map of path parameters and their values. * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} collectionQueryParams A map of collection query parameters and their values. * @param {Object.} headerParams A map of header parameters and their values. * @param {Object.} formParams A map of form parameters and their values. * @param {Object} bodyParam The value to pass as the request body. @@ -378,7 +373,7 @@ * @returns {Object} The SuperAgent request object. */ exports.prototype.callApi = function callApi(path, httpMethod, pathParams, - queryParams, collectionQueryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, + queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, callback) { var _this = this; @@ -388,25 +383,6 @@ // apply authentications this.applyAuthToRequest(request, authNames); - // set collection query parameters - for (var key in collectionQueryParams) { - if (collectionQueryParams.hasOwnProperty(key)) { - var param = collectionQueryParams[key]; - if (param.collectionFormat === 'csv') { - // SuperAgent normally percent-encodes all reserved characters in a query parameter. However, - // commas are used as delimiters for the 'csv' collectionFormat so they must not be encoded. We - // must therefore construct and encode 'csv' collection query parameters manually. - if (param.value != null) { - var value = param.value.map(this.paramToString).map(encodeURIComponent).join(','); - request.query(encodeURIComponent(key) + "=" + value); - } - } else { - // All other collection query parameters should be treated as ordinary query parameters. - queryParams[key] = this.buildCollectionParam(param.value, param.collectionFormat); - } - } - } - // set query parameters if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { queryParams['_'] = new Date().getTime(); @@ -416,12 +392,6 @@ // set header parameters request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - // set request timeout request.timeout(this.timeout); diff --git a/sdk/js/swagger/src/api/AdminApi.js b/sdk/js/swagger/src/api/AdminApi.js index 34706f732a..5148d7efd2 100644 --- a/sdk/js/swagger/src/api/AdminApi.js +++ b/sdk/js/swagger/src/api/AdminApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -40,7 +40,7 @@ * Constructs a new AdminApi. * @alias module:api/AdminApi * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * @param {module:ApiClient} apiClient Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ var exports = function(apiClient) { @@ -77,9 +77,7 @@ var pathParams = { }; var queryParams = { - 'consent_challenge': consentChallenge, - }; - var collectionQueryParams = { + 'consent_challenge': consentChallenge }; var headerParams = { }; @@ -93,7 +91,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/consent/accept', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -128,9 +126,7 @@ var pathParams = { }; var queryParams = { - 'login_challenge': loginChallenge, - }; - var collectionQueryParams = { + 'login_challenge': loginChallenge }; var headerParams = { }; @@ -144,7 +140,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/login/accept', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -176,9 +172,7 @@ var pathParams = { }; var queryParams = { - 'logout_challenge': logoutChallenge, - }; - var collectionQueryParams = { + 'logout_challenge': logoutChallenge }; var headerParams = { }; @@ -192,7 +186,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/logout/accept', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -229,8 +223,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -243,7 +235,7 @@ return this.apiClient.callApi( '/keys/{set}', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -276,8 +268,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -290,7 +280,7 @@ return this.apiClient.callApi( '/clients', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -330,8 +320,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -344,7 +332,7 @@ return this.apiClient.callApi( '/keys/{set}/{kid}', 'DELETE', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -377,8 +365,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -391,7 +377,7 @@ return this.apiClient.callApi( '/keys/{set}', 'DELETE', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -424,8 +410,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -438,7 +422,7 @@ return this.apiClient.callApi( '/clients/{id}', 'DELETE', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -467,8 +451,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -481,7 +463,7 @@ return this.apiClient.callApi( '/oauth2/flush', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -513,9 +495,7 @@ var pathParams = { }; var queryParams = { - 'consent_challenge': consentChallenge, - }; - var collectionQueryParams = { + 'consent_challenge': consentChallenge }; var headerParams = { }; @@ -529,7 +509,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/consent', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -570,8 +550,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -584,7 +562,7 @@ return this.apiClient.callApi( '/keys/{set}/{kid}', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -618,8 +596,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -632,7 +608,7 @@ return this.apiClient.callApi( '/keys/{set}', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -664,9 +640,7 @@ var pathParams = { }; var queryParams = { - 'login_challenge': loginChallenge, - }; - var collectionQueryParams = { + 'login_challenge': loginChallenge }; var headerParams = { }; @@ -680,7 +654,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/login', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -712,9 +686,7 @@ var pathParams = { }; var queryParams = { - 'logout_challenge': logoutChallenge, - }; - var collectionQueryParams = { + 'logout_challenge': logoutChallenge }; var headerParams = { }; @@ -728,7 +700,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/logout', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -762,8 +734,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -776,7 +746,7 @@ return this.apiClient.callApi( '/clients/{id}', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -792,7 +762,7 @@ /** * 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. - * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. + * @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 {Object} opts Optional parameters * @param {String} opts.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 {module:api/AdminApi~introspectOAuth2TokenCallback} callback The callback function, accepting three arguments: error, data, response @@ -812,8 +782,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -828,7 +796,7 @@ return this.apiClient.callApi( '/oauth2/introspect', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -859,9 +827,7 @@ }; var queryParams = { 'limit': opts['limit'], - 'offset': opts['offset'], - }; - var collectionQueryParams = { + 'offset': opts['offset'] }; var headerParams = { }; @@ -875,7 +841,7 @@ return this.apiClient.callApi( '/clients', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -907,9 +873,7 @@ var pathParams = { }; var queryParams = { - 'subject': subject, - }; - var collectionQueryParams = { + 'subject': subject }; var headerParams = { }; @@ -923,7 +887,7 @@ return this.apiClient.callApi( '/oauth2/auth/sessions/consent', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -958,9 +922,7 @@ var pathParams = { }; var queryParams = { - 'consent_challenge': consentChallenge, - }; - var collectionQueryParams = { + 'consent_challenge': consentChallenge }; var headerParams = { }; @@ -974,7 +936,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/consent/reject', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -1009,9 +971,7 @@ var pathParams = { }; var queryParams = { - 'login_challenge': loginChallenge, - }; - var collectionQueryParams = { + 'login_challenge': loginChallenge }; var headerParams = { }; @@ -1025,7 +985,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/login/reject', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -1059,9 +1019,7 @@ var pathParams = { }; var queryParams = { - 'logout_challenge': logoutChallenge, - }; - var collectionQueryParams = { + 'logout_challenge': logoutChallenge }; var headerParams = { }; @@ -1075,7 +1033,7 @@ return this.apiClient.callApi( '/oauth2/auth/requests/logout/reject', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -1106,9 +1064,7 @@ var pathParams = { }; var queryParams = { - 'subject': subject, - }; - var collectionQueryParams = { + 'subject': subject }; var headerParams = { }; @@ -1122,7 +1078,7 @@ return this.apiClient.callApi( '/oauth2/auth/sessions/login', 'DELETE', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -1157,9 +1113,7 @@ }; var queryParams = { 'subject': subject, - 'client': opts['client'], - }; - var collectionQueryParams = { + 'client': opts['client'] }; var headerParams = { }; @@ -1173,7 +1127,7 @@ return this.apiClient.callApi( '/oauth2/auth/sessions/consent', 'DELETE', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -1217,8 +1171,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -1231,7 +1183,7 @@ return this.apiClient.callApi( '/keys/{set}/{kid}', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -1268,8 +1220,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -1282,7 +1232,7 @@ return this.apiClient.callApi( '/keys/{set}', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -1322,8 +1272,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -1336,7 +1284,7 @@ return this.apiClient.callApi( '/clients/{id}', 'PUT', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } diff --git a/sdk/js/swagger/src/api/HealthApi.js b/sdk/js/swagger/src/api/HealthApi.js index f86b6d6aad..dcf3f62307 100644 --- a/sdk/js/swagger/src/api/HealthApi.js +++ b/sdk/js/swagger/src/api/HealthApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -40,7 +40,7 @@ * Constructs a new HealthApi. * @alias module:api/HealthApi * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * @param {module:ApiClient} apiClient Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ var exports = function(apiClient) { @@ -69,8 +69,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -83,7 +81,7 @@ return this.apiClient.callApi( '/health/alive', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -110,8 +108,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -124,7 +120,7 @@ return this.apiClient.callApi( '/health/ready', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } diff --git a/sdk/js/swagger/src/api/PublicApi.js b/sdk/js/swagger/src/api/PublicApi.js index e6b5029b25..2a01110009 100644 --- a/sdk/js/swagger/src/api/PublicApi.js +++ b/sdk/js/swagger/src/api/PublicApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -40,7 +40,7 @@ * Constructs a new PublicApi. * @alias module:api/PublicApi * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * @param {module:ApiClient} apiClient Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ var exports = function(apiClient) { @@ -68,8 +68,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -82,7 +80,7 @@ return this.apiClient.callApi( '/oauth2/disconnect', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -109,8 +107,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -123,7 +119,7 @@ return this.apiClient.callApi( '/.well-known/openid-configuration', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -161,8 +157,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -179,7 +173,7 @@ return this.apiClient.callApi( '/oauth2/token', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -205,8 +199,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -219,7 +211,7 @@ return this.apiClient.callApi( '/oauth2/auth', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -251,8 +243,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -266,7 +256,7 @@ return this.apiClient.callApi( '/oauth2/revoke', 'POST', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -293,8 +283,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -307,7 +295,7 @@ return this.apiClient.callApi( '/userinfo', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } @@ -334,8 +322,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -348,7 +334,7 @@ return this.apiClient.callApi( '/.well-known/jwks.json', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } diff --git a/sdk/js/swagger/src/api/VersionApi.js b/sdk/js/swagger/src/api/VersionApi.js index 1ca70287f3..0d590ff9c0 100644 --- a/sdk/js/swagger/src/api/VersionApi.js +++ b/sdk/js/swagger/src/api/VersionApi.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -40,7 +40,7 @@ * Constructs a new VersionApi. * @alias module:api/VersionApi * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * @param {module:ApiClient} apiClient Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ var exports = function(apiClient) { @@ -69,8 +69,6 @@ }; var queryParams = { }; - var collectionQueryParams = { - }; var headerParams = { }; var formParams = { @@ -83,7 +81,7 @@ return this.apiClient.callApi( '/version', 'GET', - pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } diff --git a/sdk/js/swagger/src/index.js b/sdk/js/swagger/src/index.js index d7afa29879..359d297cf8 100644 --- a/sdk/js/swagger/src/index.js +++ b/sdk/js/swagger/src/index.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -16,12 +16,12 @@ (function(factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/AcceptConsentRequest', 'model/AcceptLoginRequest', 'model/AuthenticationRequest', 'model/AuthenticationSession', 'model/Client', 'model/CompletedRequest', 'model/ConsentRequest', 'model/ConsentRequestSession', 'model/ConsentRequestSessionData', 'model/CreateRequest', 'model/EmptyResponse', 'model/FlushInactiveOAuth2TokensRequest', 'model/GenericError', 'model/HandledAuthenticationRequest', 'model/HandledConsentRequest', 'model/HandledLoginRequest', 'model/HealthNotReadyStatus', 'model/HealthStatus', 'model/Introspection', 'model/JSONWebKey', 'model/JSONWebKeySet', 'model/JsonWebKeySetGeneratorRequest', 'model/LoginRequest', 'model/LogoutRequest', 'model/OAuth2Client', 'model/OAuth2TokenIntrospection', 'model/Oauth2TokenResponse', 'model/OauthTokenResponse', 'model/OpenIDConnectContext', 'model/PreviousConsentSession', 'model/RejectRequest', 'model/RequestDeniedError', 'model/RequestHandlerResponse', 'model/SwaggerFlushInactiveAccessTokens', 'model/SwaggerHealthStatus', 'model/SwaggerJSONWebKey', 'model/SwaggerJSONWebKeyQuery', 'model/SwaggerJSONWebKeySet', 'model/SwaggerJsonWebKeyQuery', 'model/SwaggerJwkCreateSet', 'model/SwaggerJwkSetQuery', 'model/SwaggerJwkUpdateSet', 'model/SwaggerJwkUpdateSetKey', 'model/SwaggerNotReadyStatus', 'model/SwaggerOAuthIntrospectionRequest', 'model/SwaggerOAuthTokenResponse', 'model/SwaggerRevokeOAuth2TokenParameters', 'model/SwaggerVersion', 'model/Swaggeroauth2TokenParameters', 'model/Swaggeroauth2TokenResponse', 'model/SwaggeruserinfoResponsePayload', 'model/UserinfoResponse', 'model/Version', 'model/WellKnown', 'api/AdminApi', 'api/HealthApi', 'api/PublicApi', 'api/VersionApi'], factory); + define(['ApiClient', 'model/AcceptConsentRequest', 'model/AcceptLoginRequest', 'model/AuthenticationRequest', 'model/AuthenticationSession', 'model/Client', 'model/CompletedRequest', 'model/ConsentRequest', 'model/ConsentRequestSession', 'model/ConsentRequestSessionData', 'model/CreateRequest', 'model/EmptyResponse', 'model/FlushInactiveOAuth2TokensRequest', 'model/GenericError', 'model/HandledAuthenticationRequest', 'model/HandledConsentRequest', 'model/HandledLoginRequest', 'model/HealthNotReadyStatus', 'model/HealthStatus', 'model/Introspection', 'model/JSONWebKey', 'model/JSONWebKeySet', 'model/JsonWebKeySetGeneratorRequest', 'model/LoginRequest', 'model/LogoutRequest', 'model/OAuth2Client', 'model/OAuth2TokenIntrospection', 'model/Oauth2TokenResponse', 'model/OauthTokenResponse', 'model/OpenIDConnectContext', 'model/PreviousConsentSession', 'model/RejectRequest', 'model/RequestDeniedError', 'model/RequestHandlerResponse', 'model/SwaggerFlushInactiveAccessTokens', 'model/SwaggerHealthStatus', 'model/SwaggerJSONWebKey', 'model/SwaggerJSONWebKeySet', 'model/SwaggerJsonWebKeyQuery', 'model/SwaggerJwkCreateSet', 'model/SwaggerJwkSetQuery', 'model/SwaggerJwkUpdateSet', 'model/SwaggerJwkUpdateSetKey', 'model/SwaggerNotReadyStatus', 'model/SwaggerOAuthIntrospectionRequest', 'model/SwaggerOAuthTokenResponse', 'model/SwaggerRevokeOAuth2TokenParameters', 'model/SwaggerVersion', 'model/Swaggeroauth2TokenParameters', 'model/Swaggeroauth2TokenResponse', 'model/SwaggeruserinfoResponsePayload', 'model/UserinfoResponse', 'model/Version', 'model/WellKnown', 'api/AdminApi', 'api/HealthApi', 'api/PublicApi', 'api/VersionApi'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('./ApiClient'), require('./model/AcceptConsentRequest'), require('./model/AcceptLoginRequest'), require('./model/AuthenticationRequest'), require('./model/AuthenticationSession'), require('./model/Client'), require('./model/CompletedRequest'), require('./model/ConsentRequest'), require('./model/ConsentRequestSession'), require('./model/ConsentRequestSessionData'), require('./model/CreateRequest'), require('./model/EmptyResponse'), require('./model/FlushInactiveOAuth2TokensRequest'), require('./model/GenericError'), require('./model/HandledAuthenticationRequest'), require('./model/HandledConsentRequest'), require('./model/HandledLoginRequest'), require('./model/HealthNotReadyStatus'), require('./model/HealthStatus'), require('./model/Introspection'), require('./model/JSONWebKey'), require('./model/JSONWebKeySet'), require('./model/JsonWebKeySetGeneratorRequest'), require('./model/LoginRequest'), require('./model/LogoutRequest'), require('./model/OAuth2Client'), require('./model/OAuth2TokenIntrospection'), require('./model/Oauth2TokenResponse'), require('./model/OauthTokenResponse'), require('./model/OpenIDConnectContext'), require('./model/PreviousConsentSession'), require('./model/RejectRequest'), require('./model/RequestDeniedError'), require('./model/RequestHandlerResponse'), require('./model/SwaggerFlushInactiveAccessTokens'), require('./model/SwaggerHealthStatus'), require('./model/SwaggerJSONWebKey'), require('./model/SwaggerJSONWebKeyQuery'), require('./model/SwaggerJSONWebKeySet'), require('./model/SwaggerJsonWebKeyQuery'), require('./model/SwaggerJwkCreateSet'), require('./model/SwaggerJwkSetQuery'), require('./model/SwaggerJwkUpdateSet'), require('./model/SwaggerJwkUpdateSetKey'), require('./model/SwaggerNotReadyStatus'), require('./model/SwaggerOAuthIntrospectionRequest'), require('./model/SwaggerOAuthTokenResponse'), require('./model/SwaggerRevokeOAuth2TokenParameters'), require('./model/SwaggerVersion'), require('./model/Swaggeroauth2TokenParameters'), require('./model/Swaggeroauth2TokenResponse'), require('./model/SwaggeruserinfoResponsePayload'), require('./model/UserinfoResponse'), require('./model/Version'), require('./model/WellKnown'), require('./api/AdminApi'), require('./api/HealthApi'), require('./api/PublicApi'), require('./api/VersionApi')); + module.exports = factory(require('./ApiClient'), require('./model/AcceptConsentRequest'), require('./model/AcceptLoginRequest'), require('./model/AuthenticationRequest'), require('./model/AuthenticationSession'), require('./model/Client'), require('./model/CompletedRequest'), require('./model/ConsentRequest'), require('./model/ConsentRequestSession'), require('./model/ConsentRequestSessionData'), require('./model/CreateRequest'), require('./model/EmptyResponse'), require('./model/FlushInactiveOAuth2TokensRequest'), require('./model/GenericError'), require('./model/HandledAuthenticationRequest'), require('./model/HandledConsentRequest'), require('./model/HandledLoginRequest'), require('./model/HealthNotReadyStatus'), require('./model/HealthStatus'), require('./model/Introspection'), require('./model/JSONWebKey'), require('./model/JSONWebKeySet'), require('./model/JsonWebKeySetGeneratorRequest'), require('./model/LoginRequest'), require('./model/LogoutRequest'), require('./model/OAuth2Client'), require('./model/OAuth2TokenIntrospection'), require('./model/Oauth2TokenResponse'), require('./model/OauthTokenResponse'), require('./model/OpenIDConnectContext'), require('./model/PreviousConsentSession'), require('./model/RejectRequest'), require('./model/RequestDeniedError'), require('./model/RequestHandlerResponse'), require('./model/SwaggerFlushInactiveAccessTokens'), require('./model/SwaggerHealthStatus'), require('./model/SwaggerJSONWebKey'), require('./model/SwaggerJSONWebKeySet'), require('./model/SwaggerJsonWebKeyQuery'), require('./model/SwaggerJwkCreateSet'), require('./model/SwaggerJwkSetQuery'), require('./model/SwaggerJwkUpdateSet'), require('./model/SwaggerJwkUpdateSetKey'), require('./model/SwaggerNotReadyStatus'), require('./model/SwaggerOAuthIntrospectionRequest'), require('./model/SwaggerOAuthTokenResponse'), require('./model/SwaggerRevokeOAuth2TokenParameters'), require('./model/SwaggerVersion'), require('./model/Swaggeroauth2TokenParameters'), require('./model/Swaggeroauth2TokenResponse'), require('./model/SwaggeruserinfoResponsePayload'), require('./model/UserinfoResponse'), require('./model/Version'), require('./model/WellKnown'), require('./api/AdminApi'), require('./api/HealthApi'), require('./api/PublicApi'), require('./api/VersionApi')); } -}(function(ApiClient, AcceptConsentRequest, AcceptLoginRequest, AuthenticationRequest, AuthenticationSession, Client, CompletedRequest, ConsentRequest, ConsentRequestSession, ConsentRequestSessionData, CreateRequest, EmptyResponse, FlushInactiveOAuth2TokensRequest, GenericError, HandledAuthenticationRequest, HandledConsentRequest, HandledLoginRequest, HealthNotReadyStatus, HealthStatus, Introspection, JSONWebKey, JSONWebKeySet, JsonWebKeySetGeneratorRequest, LoginRequest, LogoutRequest, OAuth2Client, OAuth2TokenIntrospection, Oauth2TokenResponse, OauthTokenResponse, OpenIDConnectContext, PreviousConsentSession, RejectRequest, RequestDeniedError, RequestHandlerResponse, SwaggerFlushInactiveAccessTokens, SwaggerHealthStatus, SwaggerJSONWebKey, SwaggerJSONWebKeyQuery, SwaggerJSONWebKeySet, SwaggerJsonWebKeyQuery, SwaggerJwkCreateSet, SwaggerJwkSetQuery, SwaggerJwkUpdateSet, SwaggerJwkUpdateSetKey, SwaggerNotReadyStatus, SwaggerOAuthIntrospectionRequest, SwaggerOAuthTokenResponse, SwaggerRevokeOAuth2TokenParameters, SwaggerVersion, Swaggeroauth2TokenParameters, Swaggeroauth2TokenResponse, SwaggeruserinfoResponsePayload, UserinfoResponse, Version, WellKnown, AdminApi, HealthApi, PublicApi, VersionApi) { +}(function(ApiClient, AcceptConsentRequest, AcceptLoginRequest, AuthenticationRequest, AuthenticationSession, Client, CompletedRequest, ConsentRequest, ConsentRequestSession, ConsentRequestSessionData, CreateRequest, EmptyResponse, FlushInactiveOAuth2TokensRequest, GenericError, HandledAuthenticationRequest, HandledConsentRequest, HandledLoginRequest, HealthNotReadyStatus, HealthStatus, Introspection, JSONWebKey, JSONWebKeySet, JsonWebKeySetGeneratorRequest, LoginRequest, LogoutRequest, OAuth2Client, OAuth2TokenIntrospection, Oauth2TokenResponse, OauthTokenResponse, OpenIDConnectContext, PreviousConsentSession, RejectRequest, RequestDeniedError, RequestHandlerResponse, SwaggerFlushInactiveAccessTokens, SwaggerHealthStatus, SwaggerJSONWebKey, SwaggerJSONWebKeySet, SwaggerJsonWebKeyQuery, SwaggerJwkCreateSet, SwaggerJwkSetQuery, SwaggerJwkUpdateSet, SwaggerJwkUpdateSetKey, SwaggerNotReadyStatus, SwaggerOAuthIntrospectionRequest, SwaggerOAuthTokenResponse, SwaggerRevokeOAuth2TokenParameters, SwaggerVersion, Swaggeroauth2TokenParameters, Swaggeroauth2TokenResponse, SwaggeruserinfoResponsePayload, UserinfoResponse, Version, WellKnown, AdminApi, HealthApi, PublicApi, VersionApi) { 'use strict'; /** @@ -241,11 +241,6 @@ * @property {module:model/SwaggerJSONWebKey} */ SwaggerJSONWebKey: SwaggerJSONWebKey, - /** - * The SwaggerJSONWebKeyQuery model constructor. - * @property {module:model/SwaggerJSONWebKeyQuery} - */ - SwaggerJSONWebKeyQuery: SwaggerJSONWebKeyQuery, /** * The SwaggerJSONWebKeySet model constructor. * @property {module:model/SwaggerJSONWebKeySet} diff --git a/sdk/js/swagger/src/model/AcceptConsentRequest.js b/sdk/js/swagger/src/model/AcceptConsentRequest.js index 42c3f1c0f7..d729d91c5c 100644 --- a/sdk/js/swagger/src/model/AcceptConsentRequest.js +++ b/sdk/js/swagger/src/model/AcceptConsentRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/AcceptLoginRequest.js b/sdk/js/swagger/src/model/AcceptLoginRequest.js index 24288fabae..0451101d20 100644 --- a/sdk/js/swagger/src/model/AcceptLoginRequest.js +++ b/sdk/js/swagger/src/model/AcceptLoginRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/AuthenticationRequest.js b/sdk/js/swagger/src/model/AuthenticationRequest.js index 063c80f1bb..4b4f6153d6 100644 --- a/sdk/js/swagger/src/model/AuthenticationRequest.js +++ b/sdk/js/swagger/src/model/AuthenticationRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/AuthenticationSession.js b/sdk/js/swagger/src/model/AuthenticationSession.js index 3bb3372a4f..620bbd5225 100644 --- a/sdk/js/swagger/src/model/AuthenticationSession.js +++ b/sdk/js/swagger/src/model/AuthenticationSession.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -41,7 +41,7 @@ /** * Constructs a new AuthenticationSession. - * AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session + * AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session * @alias module:model/AuthenticationSession * @class */ @@ -78,7 +78,7 @@ } /** - * authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time + * authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time * @member {Date} AuthenticatedAt */ exports.prototype['AuthenticatedAt'] = undefined; diff --git a/sdk/js/swagger/src/model/Client.js b/sdk/js/swagger/src/model/Client.js index dbab2a9739..75b000ec0c 100644 --- a/sdk/js/swagger/src/model/Client.js +++ b/sdk/js/swagger/src/model/Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/CompletedRequest.js b/sdk/js/swagger/src/model/CompletedRequest.js index 24730f7f59..7445a2fdfd 100644 --- a/sdk/js/swagger/src/model/CompletedRequest.js +++ b/sdk/js/swagger/src/model/CompletedRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/ConsentRequest.js b/sdk/js/swagger/src/model/ConsentRequest.js index a3df167754..be7e39aaff 100644 --- a/sdk/js/swagger/src/model/ConsentRequest.js +++ b/sdk/js/swagger/src/model/ConsentRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/ConsentRequestSession.js b/sdk/js/swagger/src/model/ConsentRequestSession.js index 5cd7de0967..5ecc94d58f 100644 --- a/sdk/js/swagger/src/model/ConsentRequestSession.js +++ b/sdk/js/swagger/src/model/ConsentRequestSession.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/ConsentRequestSessionData.js b/sdk/js/swagger/src/model/ConsentRequestSessionData.js index bfe7518e3d..71fc730042 100644 --- a/sdk/js/swagger/src/model/ConsentRequestSessionData.js +++ b/sdk/js/swagger/src/model/ConsentRequestSessionData.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/CreateRequest.js b/sdk/js/swagger/src/model/CreateRequest.js index a922ef04fb..f1e45e81c0 100644 --- a/sdk/js/swagger/src/model/CreateRequest.js +++ b/sdk/js/swagger/src/model/CreateRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/EmptyResponse.js b/sdk/js/swagger/src/model/EmptyResponse.js index 0b78ce4803..7f7cbd0fd0 100644 --- a/sdk/js/swagger/src/model/EmptyResponse.js +++ b/sdk/js/swagger/src/model/EmptyResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -41,7 +41,7 @@ /** * Constructs a new EmptyResponse. - * Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. + * EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. * @alias module:model/EmptyResponse * @class */ diff --git a/sdk/js/swagger/src/model/FlushInactiveOAuth2TokensRequest.js b/sdk/js/swagger/src/model/FlushInactiveOAuth2TokensRequest.js index a233c997b2..eaa61193a0 100644 --- a/sdk/js/swagger/src/model/FlushInactiveOAuth2TokensRequest.js +++ b/sdk/js/swagger/src/model/FlushInactiveOAuth2TokensRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/GenericError.js b/sdk/js/swagger/src/model/GenericError.js index ea0bab13a8..98ebdcd5b0 100644 --- a/sdk/js/swagger/src/model/GenericError.js +++ b/sdk/js/swagger/src/model/GenericError.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/HandledAuthenticationRequest.js b/sdk/js/swagger/src/model/HandledAuthenticationRequest.js index 7c35cdd642..9fbd9dd3f6 100644 --- a/sdk/js/swagger/src/model/HandledAuthenticationRequest.js +++ b/sdk/js/swagger/src/model/HandledAuthenticationRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/HandledConsentRequest.js b/sdk/js/swagger/src/model/HandledConsentRequest.js index 620c263864..63e9b476e8 100644 --- a/sdk/js/swagger/src/model/HandledConsentRequest.js +++ b/sdk/js/swagger/src/model/HandledConsentRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/HandledLoginRequest.js b/sdk/js/swagger/src/model/HandledLoginRequest.js index 1f00db10a7..f9fb182736 100644 --- a/sdk/js/swagger/src/model/HandledLoginRequest.js +++ b/sdk/js/swagger/src/model/HandledLoginRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/HealthNotReadyStatus.js b/sdk/js/swagger/src/model/HealthNotReadyStatus.js index cb13c97e13..b6f46705ef 100644 --- a/sdk/js/swagger/src/model/HealthNotReadyStatus.js +++ b/sdk/js/swagger/src/model/HealthNotReadyStatus.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/HealthStatus.js b/sdk/js/swagger/src/model/HealthStatus.js index 258e104931..92fbab6fdd 100644 --- a/sdk/js/swagger/src/model/HealthStatus.js +++ b/sdk/js/swagger/src/model/HealthStatus.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/Introspection.js b/sdk/js/swagger/src/model/Introspection.js index 4bc799ceeb..f93568a294 100644 --- a/sdk/js/swagger/src/model/Introspection.js +++ b/sdk/js/swagger/src/model/Introspection.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/JSONWebKey.js b/sdk/js/swagger/src/model/JSONWebKey.js index 135a7a9b02..d58fc4cab6 100644 --- a/sdk/js/swagger/src/model/JSONWebKey.js +++ b/sdk/js/swagger/src/model/JSONWebKey.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/JSONWebKeySet.js b/sdk/js/swagger/src/model/JSONWebKeySet.js index 81ebf27e4e..9480ad5c20 100644 --- a/sdk/js/swagger/src/model/JSONWebKeySet.js +++ b/sdk/js/swagger/src/model/JSONWebKeySet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/JsonWebKeySetGeneratorRequest.js b/sdk/js/swagger/src/model/JsonWebKeySetGeneratorRequest.js index e8fccbe1d7..5292866f50 100644 --- a/sdk/js/swagger/src/model/JsonWebKeySetGeneratorRequest.js +++ b/sdk/js/swagger/src/model/JsonWebKeySetGeneratorRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/LoginRequest.js b/sdk/js/swagger/src/model/LoginRequest.js index de4debdba9..03de922165 100644 --- a/sdk/js/swagger/src/model/LoginRequest.js +++ b/sdk/js/swagger/src/model/LoginRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/LogoutRequest.js b/sdk/js/swagger/src/model/LogoutRequest.js index 73adac59dc..fefb2ca962 100644 --- a/sdk/js/swagger/src/model/LogoutRequest.js +++ b/sdk/js/swagger/src/model/LogoutRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/OAuth2Client.js b/sdk/js/swagger/src/model/OAuth2Client.js index a1a122cc0e..231267b342 100644 --- a/sdk/js/swagger/src/model/OAuth2Client.js +++ b/sdk/js/swagger/src/model/OAuth2Client.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/OAuth2TokenIntrospection.js b/sdk/js/swagger/src/model/OAuth2TokenIntrospection.js index f388008425..e43f56904c 100644 --- a/sdk/js/swagger/src/model/OAuth2TokenIntrospection.js +++ b/sdk/js/swagger/src/model/OAuth2TokenIntrospection.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/Oauth2TokenResponse.js b/sdk/js/swagger/src/model/Oauth2TokenResponse.js index b93825238a..69274e7c92 100644 --- a/sdk/js/swagger/src/model/Oauth2TokenResponse.js +++ b/sdk/js/swagger/src/model/Oauth2TokenResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/OauthTokenResponse.js b/sdk/js/swagger/src/model/OauthTokenResponse.js index 68148fbdf5..e39bd1358c 100644 --- a/sdk/js/swagger/src/model/OauthTokenResponse.js +++ b/sdk/js/swagger/src/model/OauthTokenResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/OpenIDConnectContext.js b/sdk/js/swagger/src/model/OpenIDConnectContext.js index cc049da57e..7145aabfdc 100644 --- a/sdk/js/swagger/src/model/OpenIDConnectContext.js +++ b/sdk/js/swagger/src/model/OpenIDConnectContext.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/PreviousConsentSession.js b/sdk/js/swagger/src/model/PreviousConsentSession.js index 7d843f2739..fa2dc2ef8d 100644 --- a/sdk/js/swagger/src/model/PreviousConsentSession.js +++ b/sdk/js/swagger/src/model/PreviousConsentSession.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -16,18 +16,18 @@ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['ApiClient', 'model/ConsentRequest', 'model/ConsentRequestSessionData'], factory); + define(['ApiClient', 'model/ConsentRequest', 'model/ConsentRequestSession'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./ConsentRequest'), require('./ConsentRequestSessionData')); + module.exports = factory(require('../ApiClient'), require('./ConsentRequest'), require('./ConsentRequestSession')); } else { // Browser globals (root is window) if (!root.OryHydra) { root.OryHydra = {}; } - root.OryHydra.PreviousConsentSession = factory(root.OryHydra.ApiClient, root.OryHydra.ConsentRequest, root.OryHydra.ConsentRequestSessionData); + root.OryHydra.PreviousConsentSession = factory(root.OryHydra.ApiClient, root.OryHydra.ConsentRequest, root.OryHydra.ConsentRequestSession); } -}(this, function(ApiClient, ConsentRequest, ConsentRequestSessionData) { +}(this, function(ApiClient, ConsentRequest, ConsentRequestSession) { 'use strict'; @@ -41,7 +41,7 @@ /** * Constructs a new PreviousConsentSession. - * PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json + * The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json * @alias module:model/PreviousConsentSession * @class */ @@ -83,7 +83,7 @@ obj['remember_for'] = ApiClient.convertToType(data['remember_for'], 'Number'); } if (data.hasOwnProperty('session')) { - obj['session'] = ConsentRequestSessionData.constructFromObject(data['session']); + obj['session'] = ConsentRequestSession.constructFromObject(data['session']); } } return obj; @@ -114,7 +114,7 @@ */ exports.prototype['remember_for'] = undefined; /** - * @member {module:model/ConsentRequestSessionData} session + * @member {module:model/ConsentRequestSession} session */ exports.prototype['session'] = undefined; diff --git a/sdk/js/swagger/src/model/RejectRequest.js b/sdk/js/swagger/src/model/RejectRequest.js index 70097dcfe1..8ca090fe37 100644 --- a/sdk/js/swagger/src/model/RejectRequest.js +++ b/sdk/js/swagger/src/model/RejectRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/RequestDeniedError.js b/sdk/js/swagger/src/model/RequestDeniedError.js index 31a3c84ae8..4ded94bbca 100644 --- a/sdk/js/swagger/src/model/RequestDeniedError.js +++ b/sdk/js/swagger/src/model/RequestDeniedError.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/RequestHandlerResponse.js b/sdk/js/swagger/src/model/RequestHandlerResponse.js index f9a4705a35..b38d399742 100644 --- a/sdk/js/swagger/src/model/RequestHandlerResponse.js +++ b/sdk/js/swagger/src/model/RequestHandlerResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerFlushInactiveAccessTokens.js b/sdk/js/swagger/src/model/SwaggerFlushInactiveAccessTokens.js index 37e989a63a..abd656b2c5 100644 --- a/sdk/js/swagger/src/model/SwaggerFlushInactiveAccessTokens.js +++ b/sdk/js/swagger/src/model/SwaggerFlushInactiveAccessTokens.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -41,6 +41,7 @@ /** * Constructs a new SwaggerFlushInactiveAccessTokens. + * SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens * @alias module:model/SwaggerFlushInactiveAccessTokens * @class */ diff --git a/sdk/js/swagger/src/model/SwaggerHealthStatus.js b/sdk/js/swagger/src/model/SwaggerHealthStatus.js index e319b1f761..706f39d58a 100644 --- a/sdk/js/swagger/src/model/SwaggerHealthStatus.js +++ b/sdk/js/swagger/src/model/SwaggerHealthStatus.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerJSONWebKey.js b/sdk/js/swagger/src/model/SwaggerJSONWebKey.js index 692346a9fc..7910c0ddf9 100644 --- a/sdk/js/swagger/src/model/SwaggerJSONWebKey.js +++ b/sdk/js/swagger/src/model/SwaggerJSONWebKey.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerJSONWebKeySet.js b/sdk/js/swagger/src/model/SwaggerJSONWebKeySet.js index 85c2f12205..a45141b106 100644 --- a/sdk/js/swagger/src/model/SwaggerJSONWebKeySet.js +++ b/sdk/js/swagger/src/model/SwaggerJSONWebKeySet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerJsonWebKeyQuery.js b/sdk/js/swagger/src/model/SwaggerJsonWebKeyQuery.js index 1e97989f44..056e15e55b 100644 --- a/sdk/js/swagger/src/model/SwaggerJsonWebKeyQuery.js +++ b/sdk/js/swagger/src/model/SwaggerJsonWebKeyQuery.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerJwkCreateSet.js b/sdk/js/swagger/src/model/SwaggerJwkCreateSet.js index e3be4d7b09..08f4f98c28 100644 --- a/sdk/js/swagger/src/model/SwaggerJwkCreateSet.js +++ b/sdk/js/swagger/src/model/SwaggerJwkCreateSet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerJwkSetQuery.js b/sdk/js/swagger/src/model/SwaggerJwkSetQuery.js index 57b97f7bdb..5e79cb9bfc 100644 --- a/sdk/js/swagger/src/model/SwaggerJwkSetQuery.js +++ b/sdk/js/swagger/src/model/SwaggerJwkSetQuery.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerJwkUpdateSet.js b/sdk/js/swagger/src/model/SwaggerJwkUpdateSet.js index 410a2d6e67..cef70b0b95 100644 --- a/sdk/js/swagger/src/model/SwaggerJwkUpdateSet.js +++ b/sdk/js/swagger/src/model/SwaggerJwkUpdateSet.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerJwkUpdateSetKey.js b/sdk/js/swagger/src/model/SwaggerJwkUpdateSetKey.js index abb3ac0365..d44badc149 100644 --- a/sdk/js/swagger/src/model/SwaggerJwkUpdateSetKey.js +++ b/sdk/js/swagger/src/model/SwaggerJwkUpdateSetKey.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerNotReadyStatus.js b/sdk/js/swagger/src/model/SwaggerNotReadyStatus.js index 08dd4681e0..d5e8422e1e 100644 --- a/sdk/js/swagger/src/model/SwaggerNotReadyStatus.js +++ b/sdk/js/swagger/src/model/SwaggerNotReadyStatus.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerOAuthIntrospectionRequest.js b/sdk/js/swagger/src/model/SwaggerOAuthIntrospectionRequest.js index 976b38b455..85955c80c9 100644 --- a/sdk/js/swagger/src/model/SwaggerOAuthIntrospectionRequest.js +++ b/sdk/js/swagger/src/model/SwaggerOAuthIntrospectionRequest.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -41,6 +41,7 @@ /** * Constructs a new SwaggerOAuthIntrospectionRequest. + * SwaggerOAuthIntrospectionRequest swagger o auth introspection request * @alias module:model/SwaggerOAuthIntrospectionRequest * @class * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. diff --git a/sdk/js/swagger/src/model/SwaggerOAuthTokenResponse.js b/sdk/js/swagger/src/model/SwaggerOAuthTokenResponse.js index 263ae5179d..845d6bbfca 100644 --- a/sdk/js/swagger/src/model/SwaggerOAuthTokenResponse.js +++ b/sdk/js/swagger/src/model/SwaggerOAuthTokenResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggerRevokeOAuth2TokenParameters.js b/sdk/js/swagger/src/model/SwaggerRevokeOAuth2TokenParameters.js index 44e6e0f8da..af07e7585a 100644 --- a/sdk/js/swagger/src/model/SwaggerRevokeOAuth2TokenParameters.js +++ b/sdk/js/swagger/src/model/SwaggerRevokeOAuth2TokenParameters.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -41,6 +41,7 @@ /** * Constructs a new SwaggerRevokeOAuth2TokenParameters. + * SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters * @alias module:model/SwaggerRevokeOAuth2TokenParameters * @class * @param token {String} in: formData diff --git a/sdk/js/swagger/src/model/SwaggerVersion.js b/sdk/js/swagger/src/model/SwaggerVersion.js index 7d7031a3a9..c11b32c586 100644 --- a/sdk/js/swagger/src/model/SwaggerVersion.js +++ b/sdk/js/swagger/src/model/SwaggerVersion.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/Swaggeroauth2TokenParameters.js b/sdk/js/swagger/src/model/Swaggeroauth2TokenParameters.js index b3b80dae6f..d1741a3a26 100644 --- a/sdk/js/swagger/src/model/Swaggeroauth2TokenParameters.js +++ b/sdk/js/swagger/src/model/Swaggeroauth2TokenParameters.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * @@ -41,6 +41,7 @@ /** * Constructs a new Swaggeroauth2TokenParameters. + * Swaggeroauth2TokenParameters swaggeroauth2 token parameters * @alias module:model/Swaggeroauth2TokenParameters * @class * @param grantType {String} in: formData diff --git a/sdk/js/swagger/src/model/Swaggeroauth2TokenResponse.js b/sdk/js/swagger/src/model/Swaggeroauth2TokenResponse.js index 5360e70c15..dadc173d19 100644 --- a/sdk/js/swagger/src/model/Swaggeroauth2TokenResponse.js +++ b/sdk/js/swagger/src/model/Swaggeroauth2TokenResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/SwaggeruserinfoResponsePayload.js b/sdk/js/swagger/src/model/SwaggeruserinfoResponsePayload.js index 689557bedf..e42b132fe5 100644 --- a/sdk/js/swagger/src/model/SwaggeruserinfoResponsePayload.js +++ b/sdk/js/swagger/src/model/SwaggeruserinfoResponsePayload.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/UserinfoResponse.js b/sdk/js/swagger/src/model/UserinfoResponse.js index 9f1a0b06a0..db403ae98f 100644 --- a/sdk/js/swagger/src/model/UserinfoResponse.js +++ b/sdk/js/swagger/src/model/UserinfoResponse.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/Version.js b/sdk/js/swagger/src/model/Version.js index 330aaa8d95..30b94396e8 100644 --- a/sdk/js/swagger/src/model/Version.js +++ b/sdk/js/swagger/src/model/Version.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/js/swagger/src/model/WellKnown.js b/sdk/js/swagger/src/model/WellKnown.js index 7a0aa3fc1b..0bb61bc088 100644 --- a/sdk/js/swagger/src/model/WellKnown.js +++ b/sdk/js/swagger/src/model/WellKnown.js @@ -7,7 +7,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * - * Swagger Codegen version: 2.4.5 + * Swagger Codegen version: 2.2.3 * * Do not edit the class manually. * diff --git a/sdk/php/.swagger-codegen/VERSION b/sdk/php/.swagger-codegen/VERSION index 26f8b8bcdf..6b4d157738 100644 --- a/sdk/php/.swagger-codegen/VERSION +++ b/sdk/php/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.5 \ No newline at end of file +2.2.3 \ No newline at end of file diff --git a/sdk/php/swagger/.php_cs b/sdk/php/swagger/.php_cs index 4fbe53ec5f..6b8e23c818 100644 --- a/sdk/php/swagger/.php_cs +++ b/sdk/php/swagger/.php_cs @@ -1,23 +1,18 @@ level(Symfony\CS\FixerInterface::PSR2_LEVEL) ->setUsingCache(true) - ->setRules([ - '@PSR2' => true, - 'ordered_imports' => true, - 'phpdoc_order' => true, - 'array_syntax' => [ 'syntax' => 'short' ], - 'strict_comparison' => true, - 'strict_param' => true, - 'no_trailing_whitespace' => false, - 'no_trailing_whitespace_in_comment' => false, - 'braces' => false, - 'single_blank_line_at_eof' => false, - 'blank_line_after_namespace' => false, - ]) - ->setFinder( - PhpCsFixer\Finder::create() - ->exclude('test') - ->exclude('tests') - ->in(__DIR__) + ->fixers( + [ + 'ordered_use', + 'phpdoc_order', + 'short_array_syntax', + 'strict', + 'strict_param' + ] + ) + ->finder( + Symfony\CS\Finder\DefaultFinder::create() + ->in(__DIR__) ); diff --git a/sdk/php/swagger/README.md b/sdk/php/swagger/README.md index 6eefadf7a9..66d4cf721a 100644 --- a/sdk/php/swagger/README.md +++ b/sdk/php/swagger/README.md @@ -8,7 +8,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git ## Requirements -PHP 5.5 and later +PHP 5.4.0 and later ## Installation & Usage ### Composer @@ -20,11 +20,11 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi "repositories": [ { "type": "git", - "url": "https://github.com/ory/hydra.git" + "url": "https://github.com/ory/swagger.git" } ], "require": { - "ory/hydra": "*@dev" + "ory/swagger": "*@dev" } } ``` @@ -36,7 +36,7 @@ Then run `composer install` Download the files and include `autoload.php`: ```php - require_once('/path/to/swagger/vendor/autoload.php'); + require_once('/path/to/swagger/autoload.php'); ``` ## Tests @@ -56,16 +56,12 @@ Please follow the [installation procedure](#installation--usage) and then run th acceptConsentRequest($consent_challenge, $body); + $result = $api_instance->acceptConsentRequest($consent_challenge, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->acceptConsentRequest: ', $e->getMessage(), PHP_EOL; @@ -156,7 +152,6 @@ Class | Method | HTTP request | Description - [SwaggerFlushInactiveAccessTokens](docs/Model/SwaggerFlushInactiveAccessTokens.md) - [SwaggerHealthStatus](docs/Model/SwaggerHealthStatus.md) - [SwaggerJSONWebKey](docs/Model/SwaggerJSONWebKey.md) - - [SwaggerJSONWebKeyQuery](docs/Model/SwaggerJSONWebKeyQuery.md) - [SwaggerJSONWebKeySet](docs/Model/SwaggerJSONWebKeySet.md) - [SwaggerJsonWebKeyQuery](docs/Model/SwaggerJsonWebKeyQuery.md) - [SwaggerJwkCreateSet](docs/Model/SwaggerJwkCreateSet.md) diff --git a/sdk/php/swagger/autoload.php b/sdk/php/swagger/autoload.php new file mode 100644 index 0000000000..1dab38a6a6 --- /dev/null +++ b/sdk/php/swagger/autoload.php @@ -0,0 +1,54 @@ + \Hydra\SDK\Model\CompletedRequest acceptConsentRequest($consent_challenge, $body) +> \HydraSDK\Model\CompletedRequest acceptConsentRequest($consent_challenge, $body) Accept an consent request @@ -45,16 +45,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY acceptConsentRequest($consent_challenge, $body); + $result = $api_instance->acceptConsentRequest($consent_challenge, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->acceptConsentRequest: ', $e->getMessage(), PHP_EOL; @@ -67,11 +63,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **consent_challenge** | **string**| | - **body** | [**\Hydra\SDK\Model\AcceptConsentRequest**](../Model/AcceptConsentRequest.md)| | [optional] + **body** | [**\HydraSDK\Model\AcceptConsentRequest**](../Model/AcceptConsentRequest.md)| | [optional] ### Return type -[**\Hydra\SDK\Model\CompletedRequest**](../Model/CompletedRequest.md) +[**\HydraSDK\Model\CompletedRequest**](../Model/CompletedRequest.md) ### Authorization @@ -85,7 +81,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **acceptLoginRequest** -> \Hydra\SDK\Model\CompletedRequest acceptLoginRequest($login_challenge, $body) +> \HydraSDK\Model\CompletedRequest acceptLoginRequest($login_challenge, $body) Accept an login request @@ -96,16 +92,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY acceptLoginRequest($login_challenge, $body); + $result = $api_instance->acceptLoginRequest($login_challenge, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->acceptLoginRequest: ', $e->getMessage(), PHP_EOL; @@ -118,11 +110,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **login_challenge** | **string**| | - **body** | [**\Hydra\SDK\Model\AcceptLoginRequest**](../Model/AcceptLoginRequest.md)| | [optional] + **body** | [**\HydraSDK\Model\AcceptLoginRequest**](../Model/AcceptLoginRequest.md)| | [optional] ### Return type -[**\Hydra\SDK\Model\CompletedRequest**](../Model/CompletedRequest.md) +[**\HydraSDK\Model\CompletedRequest**](../Model/CompletedRequest.md) ### Authorization @@ -136,7 +128,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **acceptLogoutRequest** -> \Hydra\SDK\Model\CompletedRequest acceptLogoutRequest($logout_challenge) +> \HydraSDK\Model\CompletedRequest acceptLogoutRequest($logout_challenge) Accept a logout request @@ -147,15 +139,11 @@ When a user or an application requests ORY Hydra to log out a user, this endpoin acceptLogoutRequest($logout_challenge); + $result = $api_instance->acceptLogoutRequest($logout_challenge); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->acceptLogoutRequest: ', $e->getMessage(), PHP_EOL; @@ -171,7 +159,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\CompletedRequest**](../Model/CompletedRequest.md) +[**\HydraSDK\Model\CompletedRequest**](../Model/CompletedRequest.md) ### Authorization @@ -185,7 +173,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createJsonWebKeySet** -> \Hydra\SDK\Model\JSONWebKeySet createJsonWebKeySet($set, $body) +> \HydraSDK\Model\JSONWebKeySet createJsonWebKeySet($set, $body) Generate a new JSON Web Key @@ -196,16 +184,12 @@ This endpoint is capable of generating JSON Web Key Sets for you. There a differ createJsonWebKeySet($set, $body); + $result = $api_instance->createJsonWebKeySet($set, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->createJsonWebKeySet: ', $e->getMessage(), PHP_EOL; @@ -218,11 +202,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **set** | **string**| The set | - **body** | [**\Hydra\SDK\Model\JsonWebKeySetGeneratorRequest**](../Model/JsonWebKeySetGeneratorRequest.md)| | [optional] + **body** | [**\HydraSDK\Model\JsonWebKeySetGeneratorRequest**](../Model/JsonWebKeySetGeneratorRequest.md)| | [optional] ### Return type -[**\Hydra\SDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) +[**\HydraSDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) ### Authorization @@ -236,7 +220,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **createOAuth2Client** -> \Hydra\SDK\Model\OAuth2Client createOAuth2Client($body) +> \HydraSDK\Model\OAuth2Client createOAuth2Client($body) Create an OAuth 2.0 client @@ -247,15 +231,11 @@ Create a new OAuth 2.0 client If you pass `client_secret` the secret will be use createOAuth2Client($body); + $result = $api_instance->createOAuth2Client($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->createOAuth2Client: ', $e->getMessage(), PHP_EOL; @@ -267,11 +247,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Hydra\SDK\Model\OAuth2Client**](../Model/OAuth2Client.md)| | + **body** | [**\HydraSDK\Model\OAuth2Client**](../Model/OAuth2Client.md)| | ### Return type -[**\Hydra\SDK\Model\OAuth2Client**](../Model/OAuth2Client.md) +[**\HydraSDK\Model\OAuth2Client**](../Model/OAuth2Client.md) ### Authorization @@ -296,16 +276,12 @@ Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a Ja deleteJsonWebKey($kid, $set); + $api_instance->deleteJsonWebKey($kid, $set); } catch (Exception $e) { echo 'Exception when calling AdminApi->deleteJsonWebKey: ', $e->getMessage(), PHP_EOL; } @@ -346,15 +322,11 @@ Use this endpoint to delete a complete JSON Web Key Set and all the keys in that deleteJsonWebKeySet($set); + $api_instance->deleteJsonWebKeySet($set); } catch (Exception $e) { echo 'Exception when calling AdminApi->deleteJsonWebKeySet: ', $e->getMessage(), PHP_EOL; } @@ -394,15 +366,11 @@ Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to pe deleteOAuth2Client($id); + $api_instance->deleteOAuth2Client($id); } catch (Exception $e) { echo 'Exception when calling AdminApi->deleteOAuth2Client: ', $e->getMessage(), PHP_EOL; } @@ -442,15 +410,11 @@ This endpoint flushes expired OAuth2 access tokens from the database. You can se flushInactiveOAuth2Tokens($body); + $api_instance->flushInactiveOAuth2Tokens($body); } catch (Exception $e) { echo 'Exception when calling AdminApi->flushInactiveOAuth2Tokens: ', $e->getMessage(), PHP_EOL; } @@ -461,7 +425,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest**](../Model/FlushInactiveOAuth2TokensRequest.md)| | [optional] + **body** | [**\HydraSDK\Model\FlushInactiveOAuth2TokensRequest**](../Model/FlushInactiveOAuth2TokensRequest.md)| | [optional] ### Return type @@ -479,7 +443,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getConsentRequest** -> \Hydra\SDK\Model\ConsentRequest getConsentRequest($consent_challenge) +> \HydraSDK\Model\ConsentRequest getConsentRequest($consent_challenge) Get consent request information @@ -490,15 +454,11 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY getConsentRequest($consent_challenge); + $result = $api_instance->getConsentRequest($consent_challenge); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->getConsentRequest: ', $e->getMessage(), PHP_EOL; @@ -514,7 +474,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\ConsentRequest**](../Model/ConsentRequest.md) +[**\HydraSDK\Model\ConsentRequest**](../Model/ConsentRequest.md) ### Authorization @@ -528,7 +488,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getJsonWebKey** -> \Hydra\SDK\Model\JSONWebKeySet getJsonWebKey($kid, $set) +> \HydraSDK\Model\JSONWebKeySet getJsonWebKey($kid, $set) Fetch a JSON Web Key @@ -539,16 +499,12 @@ This endpoint returns a singular JSON Web Key, identified by the set and the spe getJsonWebKey($kid, $set); + $result = $api_instance->getJsonWebKey($kid, $set); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->getJsonWebKey: ', $e->getMessage(), PHP_EOL; @@ -565,7 +521,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) +[**\HydraSDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) ### Authorization @@ -579,7 +535,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getJsonWebKeySet** -> \Hydra\SDK\Model\JSONWebKeySet getJsonWebKeySet($set) +> \HydraSDK\Model\JSONWebKeySet getJsonWebKeySet($set) Retrieve a JSON Web Key Set @@ -590,15 +546,11 @@ This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web getJsonWebKeySet($set); + $result = $api_instance->getJsonWebKeySet($set); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->getJsonWebKeySet: ', $e->getMessage(), PHP_EOL; @@ -614,7 +566,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) +[**\HydraSDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) ### Authorization @@ -628,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getLoginRequest** -> \Hydra\SDK\Model\LoginRequest getLoginRequest($login_challenge) +> \HydraSDK\Model\LoginRequest getLoginRequest($login_challenge) Get an login request @@ -639,15 +591,11 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY getLoginRequest($login_challenge); + $result = $api_instance->getLoginRequest($login_challenge); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->getLoginRequest: ', $e->getMessage(), PHP_EOL; @@ -663,7 +611,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\LoginRequest**](../Model/LoginRequest.md) +[**\HydraSDK\Model\LoginRequest**](../Model/LoginRequest.md) ### Authorization @@ -677,7 +625,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getLogoutRequest** -> \Hydra\SDK\Model\LogoutRequest getLogoutRequest($logout_challenge) +> \HydraSDK\Model\LogoutRequest getLogoutRequest($logout_challenge) Get a logout request @@ -688,15 +636,11 @@ Use this endpoint to fetch a logout request. getLogoutRequest($logout_challenge); + $result = $api_instance->getLogoutRequest($logout_challenge); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->getLogoutRequest: ', $e->getMessage(), PHP_EOL; @@ -712,7 +656,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\LogoutRequest**](../Model/LogoutRequest.md) +[**\HydraSDK\Model\LogoutRequest**](../Model/LogoutRequest.md) ### Authorization @@ -726,7 +670,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **getOAuth2Client** -> \Hydra\SDK\Model\OAuth2Client getOAuth2Client($id) +> \HydraSDK\Model\OAuth2Client getOAuth2Client($id) Get an OAuth 2.0 Client. @@ -737,15 +681,11 @@ Get an OAUth 2.0 client by its ID. This endpoint never returns passwords. OAuth getOAuth2Client($id); + $result = $api_instance->getOAuth2Client($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->getOAuth2Client: ', $e->getMessage(), PHP_EOL; @@ -761,7 +701,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\OAuth2Client**](../Model/OAuth2Client.md) +[**\HydraSDK\Model\OAuth2Client**](../Model/OAuth2Client.md) ### Authorization @@ -775,7 +715,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **introspectOAuth2Token** -> \Hydra\SDK\Model\OAuth2TokenIntrospection introspectOAuth2Token($token, $scope) +> \HydraSDK\Model\OAuth2TokenIntrospection introspectOAuth2Token($token, $scope) Introspect OAuth2 tokens @@ -787,24 +727,17 @@ The introspection endpoint allows to check if a token (both refresh and access) require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basic -$config = Hydra\SDK\Configuration::getDefaultConfiguration() - ->setUsername('YOUR_USERNAME') - ->setPassword('YOUR_PASSWORD'); - +HydraSDK\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); +HydraSDK\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: oauth2 -$config = Hydra\SDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); - -$apiInstance = new Hydra\SDK\Api\AdminApi( - // 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 | 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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. +HydraSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new HydraSDK\Api\AdminApi(); +$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. try { - $result = $apiInstance->introspectOAuth2Token($token, $scope); + $result = $api_instance->introspectOAuth2Token($token, $scope); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->introspectOAuth2Token: ', $e->getMessage(), PHP_EOL; @@ -816,12 +749,12 @@ try { 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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. | + **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 -[**\Hydra\SDK\Model\OAuth2TokenIntrospection**](../Model/OAuth2TokenIntrospection.md) +[**\HydraSDK\Model\OAuth2TokenIntrospection**](../Model/OAuth2TokenIntrospection.md) ### Authorization @@ -835,7 +768,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **listOAuth2Clients** -> \Hydra\SDK\Model\OAuth2Client[] listOAuth2Clients($limit, $offset) +> \HydraSDK\Model\OAuth2Client[] listOAuth2Clients($limit, $offset) List OAuth 2.0 Clients @@ -846,16 +779,12 @@ This endpoint lists all clients in the database, and never returns client secret listOAuth2Clients($limit, $offset); + $result = $api_instance->listOAuth2Clients($limit, $offset); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->listOAuth2Clients: ', $e->getMessage(), PHP_EOL; @@ -872,7 +801,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\OAuth2Client[]**](../Model/OAuth2Client.md) +[**\HydraSDK\Model\OAuth2Client[]**](../Model/OAuth2Client.md) ### Authorization @@ -886,7 +815,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **listSubjectConsentSessions** -> \Hydra\SDK\Model\PreviousConsentSession[] listSubjectConsentSessions($subject) +> \HydraSDK\Model\PreviousConsentSession[] listSubjectConsentSessions($subject) Lists all consent sessions of a subject @@ -897,15 +826,11 @@ This endpoint lists all subject's granted consent sessions, including client and listSubjectConsentSessions($subject); + $result = $api_instance->listSubjectConsentSessions($subject); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->listSubjectConsentSessions: ', $e->getMessage(), PHP_EOL; @@ -921,7 +846,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\PreviousConsentSession[]**](../Model/PreviousConsentSession.md) +[**\HydraSDK\Model\PreviousConsentSession[]**](../Model/PreviousConsentSession.md) ### Authorization @@ -935,7 +860,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **rejectConsentRequest** -> \Hydra\SDK\Model\CompletedRequest rejectConsentRequest($consent_challenge, $body) +> \HydraSDK\Model\CompletedRequest rejectConsentRequest($consent_challenge, $body) Reject an consent request @@ -946,16 +871,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY rejectConsentRequest($consent_challenge, $body); + $result = $api_instance->rejectConsentRequest($consent_challenge, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->rejectConsentRequest: ', $e->getMessage(), PHP_EOL; @@ -968,11 +889,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **consent_challenge** | **string**| | - **body** | [**\Hydra\SDK\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] + **body** | [**\HydraSDK\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] ### Return type -[**\Hydra\SDK\Model\CompletedRequest**](../Model/CompletedRequest.md) +[**\HydraSDK\Model\CompletedRequest**](../Model/CompletedRequest.md) ### Authorization @@ -986,7 +907,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **rejectLoginRequest** -> \Hydra\SDK\Model\CompletedRequest rejectLoginRequest($login_challenge, $body) +> \HydraSDK\Model\CompletedRequest rejectLoginRequest($login_challenge, $body) Reject a login request @@ -997,16 +918,12 @@ When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY rejectLoginRequest($login_challenge, $body); + $result = $api_instance->rejectLoginRequest($login_challenge, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->rejectLoginRequest: ', $e->getMessage(), PHP_EOL; @@ -1019,11 +936,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **login_challenge** | **string**| | - **body** | [**\Hydra\SDK\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] + **body** | [**\HydraSDK\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] ### Return type -[**\Hydra\SDK\Model\CompletedRequest**](../Model/CompletedRequest.md) +[**\HydraSDK\Model\CompletedRequest**](../Model/CompletedRequest.md) ### Authorization @@ -1048,16 +965,12 @@ When a user or an application requests ORY Hydra to log out a user, this endpoin rejectLogoutRequest($logout_challenge, $body); + $api_instance->rejectLogoutRequest($logout_challenge, $body); } catch (Exception $e) { echo 'Exception when calling AdminApi->rejectLogoutRequest: ', $e->getMessage(), PHP_EOL; } @@ -1069,7 +982,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **logout_challenge** | **string**| | - **body** | [**\Hydra\SDK\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] + **body** | [**\HydraSDK\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] ### Return type @@ -1098,15 +1011,11 @@ This endpoint invalidates a subject's authentication session. After revoking the revokeAuthenticationSession($subject); + $api_instance->revokeAuthenticationSession($subject); } catch (Exception $e) { echo 'Exception when calling AdminApi->revokeAuthenticationSession: ', $e->getMessage(), PHP_EOL; } @@ -1146,16 +1055,12 @@ This endpoint revokes a subject's granted consent sessions for a specific OAuth revokeConsentSessions($subject, $client); + $api_instance->revokeConsentSessions($subject, $client); } catch (Exception $e) { echo 'Exception when calling AdminApi->revokeConsentSessions: ', $e->getMessage(), PHP_EOL; } @@ -1185,7 +1090,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **updateJsonWebKey** -> \Hydra\SDK\Model\JSONWebKey updateJsonWebKey($kid, $set, $body) +> \HydraSDK\Model\JSONWebKey updateJsonWebKey($kid, $set, $body) Update a JSON Web Key @@ -1196,17 +1101,13 @@ Use this method if you do not want to let Hydra generate the JWKs for you, but i updateJsonWebKey($kid, $set, $body); + $result = $api_instance->updateJsonWebKey($kid, $set, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->updateJsonWebKey: ', $e->getMessage(), PHP_EOL; @@ -1220,11 +1121,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **kid** | **string**| The kid of the desired key | **set** | **string**| The set | - **body** | [**\Hydra\SDK\Model\JSONWebKey**](../Model/JSONWebKey.md)| | [optional] + **body** | [**\HydraSDK\Model\JSONWebKey**](../Model/JSONWebKey.md)| | [optional] ### Return type -[**\Hydra\SDK\Model\JSONWebKey**](../Model/JSONWebKey.md) +[**\HydraSDK\Model\JSONWebKey**](../Model/JSONWebKey.md) ### Authorization @@ -1238,7 +1139,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **updateJsonWebKeySet** -> \Hydra\SDK\Model\JSONWebKeySet updateJsonWebKeySet($set, $body) +> \HydraSDK\Model\JSONWebKeySet updateJsonWebKeySet($set, $body) Update a JSON Web Key Set @@ -1249,16 +1150,12 @@ Use this method if you do not want to let Hydra generate the JWKs for you, but i updateJsonWebKeySet($set, $body); + $result = $api_instance->updateJsonWebKeySet($set, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->updateJsonWebKeySet: ', $e->getMessage(), PHP_EOL; @@ -1271,11 +1168,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **set** | **string**| The set | - **body** | [**\Hydra\SDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md)| | [optional] + **body** | [**\HydraSDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md)| | [optional] ### Return type -[**\Hydra\SDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) +[**\HydraSDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) ### Authorization @@ -1289,7 +1186,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **updateOAuth2Client** -> \Hydra\SDK\Model\OAuth2Client updateOAuth2Client($id, $body) +> \HydraSDK\Model\OAuth2Client updateOAuth2Client($id, $body) Update an OAuth 2.0 Client @@ -1300,16 +1197,12 @@ Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will updateOAuth2Client($id, $body); + $result = $api_instance->updateOAuth2Client($id, $body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AdminApi->updateOAuth2Client: ', $e->getMessage(), PHP_EOL; @@ -1322,11 +1215,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **string**| | - **body** | [**\Hydra\SDK\Model\OAuth2Client**](../Model/OAuth2Client.md)| | + **body** | [**\HydraSDK\Model\OAuth2Client**](../Model/OAuth2Client.md)| | ### Return type -[**\Hydra\SDK\Model\OAuth2Client**](../Model/OAuth2Client.md) +[**\HydraSDK\Model\OAuth2Client**](../Model/OAuth2Client.md) ### Authorization diff --git a/sdk/php/swagger/docs/Api/HealthApi.md b/sdk/php/swagger/docs/Api/HealthApi.md index 766d7f0a22..e2a27fcb95 100644 --- a/sdk/php/swagger/docs/Api/HealthApi.md +++ b/sdk/php/swagger/docs/Api/HealthApi.md @@ -1,4 +1,4 @@ -# Hydra\SDK\HealthApi +# HydraSDK\HealthApi Client for Hydra All URIs are relative to *http://localhost* @@ -10,7 +10,7 @@ Method | HTTP request | Description # **isInstanceAlive** -> \Hydra\SDK\Model\HealthStatus isInstanceAlive() +> \HydraSDK\Model\HealthStatus isInstanceAlive() Check alive status @@ -21,14 +21,10 @@ This endpoint returns a 200 status code when the HTTP server is up running. This isInstanceAlive(); + $result = $api_instance->isInstanceAlive(); print_r($result); } catch (Exception $e) { echo 'Exception when calling HealthApi->isInstanceAlive: ', $e->getMessage(), PHP_EOL; @@ -41,7 +37,7 @@ This endpoint does not need any parameter. ### Return type -[**\Hydra\SDK\Model\HealthStatus**](../Model/HealthStatus.md) +[**\HydraSDK\Model\HealthStatus**](../Model/HealthStatus.md) ### Authorization @@ -55,7 +51,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **isInstanceReady** -> \Hydra\SDK\Model\HealthStatus isInstanceReady() +> \HydraSDK\Model\HealthStatus isInstanceReady() Check readiness status @@ -66,14 +62,10 @@ This endpoint returns a 200 status code when the HTTP server is up running and t isInstanceReady(); + $result = $api_instance->isInstanceReady(); print_r($result); } catch (Exception $e) { echo 'Exception when calling HealthApi->isInstanceReady: ', $e->getMessage(), PHP_EOL; @@ -86,7 +78,7 @@ This endpoint does not need any parameter. ### Return type -[**\Hydra\SDK\Model\HealthStatus**](../Model/HealthStatus.md) +[**\HydraSDK\Model\HealthStatus**](../Model/HealthStatus.md) ### Authorization diff --git a/sdk/php/swagger/docs/Api/PublicApi.md b/sdk/php/swagger/docs/Api/PublicApi.md index 0056a5562e..c18ba10de0 100644 --- a/sdk/php/swagger/docs/Api/PublicApi.md +++ b/sdk/php/swagger/docs/Api/PublicApi.md @@ -1,4 +1,4 @@ -# Hydra\SDK\PublicApi +# HydraSDK\PublicApi Client for Hydra All URIs are relative to *http://localhost* @@ -26,14 +26,10 @@ This endpoint initiates and completes user logout at ORY Hydra and initiates Ope disconnectUser(); + $api_instance->disconnectUser(); } catch (Exception $e) { echo 'Exception when calling PublicApi->disconnectUser: ', $e->getMessage(), PHP_EOL; } @@ -59,7 +55,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **discoverOpenIDConfiguration** -> \Hydra\SDK\Model\WellKnown discoverOpenIDConfiguration() +> \HydraSDK\Model\WellKnown discoverOpenIDConfiguration() OpenID Connect Discovery @@ -70,14 +66,10 @@ The well known endpoint an be used to retrieve information for OpenID Connect cl discoverOpenIDConfiguration(); + $result = $api_instance->discoverOpenIDConfiguration(); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->discoverOpenIDConfiguration: ', $e->getMessage(), PHP_EOL; @@ -90,7 +82,7 @@ This endpoint does not need any parameter. ### Return type -[**\Hydra\SDK\Model\WellKnown**](../Model/WellKnown.md) +[**\HydraSDK\Model\WellKnown**](../Model/WellKnown.md) ### Authorization @@ -104,7 +96,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **oauth2Token** -> \Hydra\SDK\Model\Oauth2TokenResponse oauth2Token($grant_type, $code, $redirect_uri, $client_id) +> \HydraSDK\Model\Oauth2TokenResponse oauth2Token($grant_type, $code, $redirect_uri, $client_id) The OAuth 2.0 token endpoint @@ -116,26 +108,19 @@ The client makes a request to the token endpoint by sending the following parame require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basic -$config = Hydra\SDK\Configuration::getDefaultConfiguration() - ->setUsername('YOUR_USERNAME') - ->setPassword('YOUR_PASSWORD'); - +HydraSDK\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); +HydraSDK\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: oauth2 -$config = Hydra\SDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); - -$apiInstance = new Hydra\SDK\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 -); +HydraSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new HydraSDK\Api\PublicApi(); $grant_type = "grant_type_example"; // string | $code = "code_example"; // string | $redirect_uri = "redirect_uri_example"; // string | $client_id = "client_id_example"; // string | try { - $result = $apiInstance->oauth2Token($grant_type, $code, $redirect_uri, $client_id); + $result = $api_instance->oauth2Token($grant_type, $code, $redirect_uri, $client_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->oauth2Token: ', $e->getMessage(), PHP_EOL; @@ -154,7 +139,7 @@ Name | Type | Description | Notes ### Return type -[**\Hydra\SDK\Model\Oauth2TokenResponse**](../Model/Oauth2TokenResponse.md) +[**\HydraSDK\Model\Oauth2TokenResponse**](../Model/Oauth2TokenResponse.md) ### Authorization @@ -179,14 +164,10 @@ This endpoint is not documented here because you should never use your own imple oauthAuth(); + $api_instance->oauthAuth(); } catch (Exception $e) { echo 'Exception when calling PublicApi->oauthAuth: ', $e->getMessage(), PHP_EOL; } @@ -224,23 +205,16 @@ Revoking a token (both access and refresh) means that the tokens will be invalid require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: basic -$config = Hydra\SDK\Configuration::getDefaultConfiguration() - ->setUsername('YOUR_USERNAME') - ->setPassword('YOUR_PASSWORD'); - +HydraSDK\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME'); +HydraSDK\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: oauth2 -$config = Hydra\SDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); - -$apiInstance = new Hydra\SDK\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 -); +HydraSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + +$api_instance = new HydraSDK\Api\PublicApi(); $token = "token_example"; // string | try { - $apiInstance->revokeOAuth2Token($token); + $api_instance->revokeOAuth2Token($token); } catch (Exception $e) { echo 'Exception when calling PublicApi->revokeOAuth2Token: ', $e->getMessage(), PHP_EOL; } @@ -269,7 +243,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **userinfo** -> \Hydra\SDK\Model\UserinfoResponse userinfo() +> \HydraSDK\Model\UserinfoResponse userinfo() OpenID Connect Userinfo @@ -281,17 +255,12 @@ This endpoint returns the payload of the ID Token, including the idTokenExtra va require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: oauth2 -$config = Hydra\SDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +HydraSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new Hydra\SDK\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 -); +$api_instance = new HydraSDK\Api\PublicApi(); try { - $result = $apiInstance->userinfo(); + $result = $api_instance->userinfo(); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->userinfo: ', $e->getMessage(), PHP_EOL; @@ -304,7 +273,7 @@ This endpoint does not need any parameter. ### Return type -[**\Hydra\SDK\Model\UserinfoResponse**](../Model/UserinfoResponse.md) +[**\HydraSDK\Model\UserinfoResponse**](../Model/UserinfoResponse.md) ### Authorization @@ -318,7 +287,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) # **wellKnown** -> \Hydra\SDK\Model\JSONWebKeySet wellKnown() +> \HydraSDK\Model\JSONWebKeySet wellKnown() JSON Web Keys Discovery @@ -329,14 +298,10 @@ This endpoint returns JSON Web Keys to be used as public keys for verifying Open wellKnown(); + $result = $api_instance->wellKnown(); print_r($result); } catch (Exception $e) { echo 'Exception when calling PublicApi->wellKnown: ', $e->getMessage(), PHP_EOL; @@ -349,7 +314,7 @@ This endpoint does not need any parameter. ### Return type -[**\Hydra\SDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) +[**\HydraSDK\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) ### Authorization diff --git a/sdk/php/swagger/docs/Api/VersionApi.md b/sdk/php/swagger/docs/Api/VersionApi.md index 8a3fa664ab..6380e1e872 100644 --- a/sdk/php/swagger/docs/Api/VersionApi.md +++ b/sdk/php/swagger/docs/Api/VersionApi.md @@ -1,4 +1,4 @@ -# Hydra\SDK\VersionApi +# HydraSDK\VersionApi Client for Hydra All URIs are relative to *http://localhost* @@ -9,7 +9,7 @@ Method | HTTP request | Description # **getVersion** -> \Hydra\SDK\Model\Version getVersion() +> \HydraSDK\Model\Version getVersion() Get service version @@ -20,14 +20,10 @@ This endpoint returns the service version typically notated using semantic versi getVersion(); + $result = $api_instance->getVersion(); print_r($result); } catch (Exception $e) { echo 'Exception when calling VersionApi->getVersion: ', $e->getMessage(), PHP_EOL; @@ -40,7 +36,7 @@ This endpoint does not need any parameter. ### Return type -[**\Hydra\SDK\Model\Version**](../Model/Version.md) +[**\HydraSDK\Model\Version**](../Model/Version.md) ### Authorization diff --git a/sdk/php/swagger/docs/Model/AcceptConsentRequest.md b/sdk/php/swagger/docs/Model/AcceptConsentRequest.md index 8327ab65d8..729b5d0f77 100644 --- a/sdk/php/swagger/docs/Model/AcceptConsentRequest.md +++ b/sdk/php/swagger/docs/Model/AcceptConsentRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **grant_scope** | **string[]** | GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`. | [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** | [**\Hydra\SDK\Model\ConsentRequestSession**](ConsentRequestSession.md) | | [optional] +**session** | [**\HydraSDK\Model\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/sdk/php/swagger/docs/Model/AuthenticationRequest.md b/sdk/php/swagger/docs/Model/AuthenticationRequest.md index 0c2e591aaf..c3be14006c 100644 --- a/sdk/php/swagger/docs/Model/AuthenticationRequest.md +++ b/sdk/php/swagger/docs/Model/AuthenticationRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **challenge** | **string** | Challenge is the identifier (\"authentication challenge\") of the consent authentication request. It is used to identify the session. | [optional] -**client** | [**\Hydra\SDK\Model\Client**](Client.md) | | [optional] -**oidc_context** | [**\Hydra\SDK\Model\OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**client** | [**\HydraSDK\Model\Client**](Client.md) | | [optional] +**oidc_context** | [**\HydraSDK\Model\OpenIDConnectContext**](OpenIDConnectContext.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** | **string[]** | RequestedScope contains the access token audience as requested by the OAuth 2.0 Client. | [optional] **requested_scope** | **string[]** | RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client. | [optional] diff --git a/sdk/php/swagger/docs/Model/AuthenticationSession.md b/sdk/php/swagger/docs/Model/AuthenticationSession.md index f5db203198..fbff4cf49e 100644 --- a/sdk/php/swagger/docs/Model/AuthenticationSession.md +++ b/sdk/php/swagger/docs/Model/AuthenticationSession.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**authenticated_at** | [**\DateTime**](\DateTime.md) | authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time | [optional] +**authenticated_at** | [**\DateTime**](\DateTime.md) | authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time | [optional] **id** | **string** | ID | [optional] **subject** | **string** | subject | [optional] diff --git a/sdk/php/swagger/docs/Model/Client.md b/sdk/php/swagger/docs/Model/Client.md index 0e55323066..c6cc8469b2 100644 --- a/sdk/php/swagger/docs/Model/Client.md +++ b/sdk/php/swagger/docs/Model/Client.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **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** | **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] **grant_types** | **string[]** | GrantTypes is an array of grant types the client is allowed to use. | [optional] -**jwks** | [**\Hydra\SDK\Model\SwaggerJSONWebKeySet**](SwaggerJSONWebKeySet.md) | | [optional] +**jwks** | [**\HydraSDK\Model\SwaggerJSONWebKeySet**](SwaggerJSONWebKeySet.md) | | [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] **owner** | **string** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] diff --git a/sdk/php/swagger/docs/Model/ConsentRequest.md b/sdk/php/swagger/docs/Model/ConsentRequest.md index 6827df5aca..4460d0c226 100644 --- a/sdk/php/swagger/docs/Model/ConsentRequest.md +++ b/sdk/php/swagger/docs/Model/ConsentRequest.md @@ -5,11 +5,11 @@ 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] **challenge** | **string** | Challenge is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | [optional] -**client** | [**\Hydra\SDK\Model\OAuth2Client**](OAuth2Client.md) | | [optional] +**client** | [**\HydraSDK\Model\OAuth2Client**](OAuth2Client.md) | | [optional] **context** | **map[string,object]** | Context contains arbitrary information set by the login endpoint or is empty if not set. | [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** | [**\Hydra\SDK\Model\OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**oidc_context** | [**\HydraSDK\Model\OpenIDConnectContext**](OpenIDConnectContext.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** | **string[]** | RequestedScope contains the access token audience as requested by the OAuth 2.0 Client. | [optional] **requested_scope** | **string[]** | RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client. | [optional] diff --git a/sdk/php/swagger/docs/Model/HandledConsentRequest.md b/sdk/php/swagger/docs/Model/HandledConsentRequest.md index d34e76fd11..ee0c6db560 100644 --- a/sdk/php/swagger/docs/Model/HandledConsentRequest.md +++ b/sdk/php/swagger/docs/Model/HandledConsentRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **grant_scope** | **string[]** | GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`. | [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** | [**\Hydra\SDK\Model\ConsentRequestSessionData**](ConsentRequestSessionData.md) | | [optional] +**session** | [**\HydraSDK\Model\ConsentRequestSessionData**](ConsentRequestSessionData.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/sdk/php/swagger/docs/Model/JSONWebKeySet.md b/sdk/php/swagger/docs/Model/JSONWebKeySet.md index 6a33be226c..0f93f587dd 100644 --- a/sdk/php/swagger/docs/Model/JSONWebKeySet.md +++ b/sdk/php/swagger/docs/Model/JSONWebKeySet.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**keys** | [**\Hydra\SDK\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] +**keys** | [**\HydraSDK\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#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/php/swagger/docs/Model/LoginRequest.md b/sdk/php/swagger/docs/Model/LoginRequest.md index f6c4d48302..08f4a23c5b 100644 --- a/sdk/php/swagger/docs/Model/LoginRequest.md +++ b/sdk/php/swagger/docs/Model/LoginRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **challenge** | **string** | Challenge is the identifier (\"login challenge\") of the login request. It is used to identify the session. | [optional] -**client** | [**\Hydra\SDK\Model\OAuth2Client**](OAuth2Client.md) | | [optional] -**oidc_context** | [**\Hydra\SDK\Model\OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**client** | [**\HydraSDK\Model\OAuth2Client**](OAuth2Client.md) | | [optional] +**oidc_context** | [**\HydraSDK\Model\OpenIDConnectContext**](OpenIDConnectContext.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** | **string[]** | RequestedScope contains the access token audience as requested by the OAuth 2.0 Client. | [optional] **requested_scope** | **string[]** | RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client. | [optional] diff --git a/sdk/php/swagger/docs/Model/OAuth2Client.md b/sdk/php/swagger/docs/Model/OAuth2Client.md index deaf6a3474..e14a3ddd23 100644 --- a/sdk/php/swagger/docs/Model/OAuth2Client.md +++ b/sdk/php/swagger/docs/Model/OAuth2Client.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **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** | **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] **grant_types** | **string[]** | GrantTypes is an array of grant types the client is allowed to use. | [optional] -**jwks** | [**\Hydra\SDK\Model\JSONWebKeySet**](JSONWebKeySet.md) | | [optional] +**jwks** | [**\HydraSDK\Model\JSONWebKeySet**](JSONWebKeySet.md) | | [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] **owner** | **string** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] diff --git a/sdk/php/swagger/docs/Model/PreviousConsentSession.md b/sdk/php/swagger/docs/Model/PreviousConsentSession.md index 0720e4b780..6248c8eb23 100644 --- a/sdk/php/swagger/docs/Model/PreviousConsentSession.md +++ b/sdk/php/swagger/docs/Model/PreviousConsentSession.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**consent_request** | [**\Hydra\SDK\Model\ConsentRequest**](ConsentRequest.md) | | [optional] +**consent_request** | [**\HydraSDK\Model\ConsentRequest**](ConsentRequest.md) | | [optional] **grant_access_token_audience** | **string[]** | GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`. | [optional] **grant_scope** | **string[]** | GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope` | [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** | [**\Hydra\SDK\Model\ConsentRequestSessionData**](ConsentRequestSessionData.md) | | [optional] +**session** | [**\HydraSDK\Model\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/sdk/php/swagger/docs/Model/SwaggerFlushInactiveAccessTokens.md b/sdk/php/swagger/docs/Model/SwaggerFlushInactiveAccessTokens.md index 8e6fe3db45..a1c83f5347 100644 --- a/sdk/php/swagger/docs/Model/SwaggerFlushInactiveAccessTokens.md +++ b/sdk/php/swagger/docs/Model/SwaggerFlushInactiveAccessTokens.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | [**\Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md) | | [optional] +**body** | [**\HydraSDK\Model\FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.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/sdk/php/swagger/docs/Model/SwaggerJSONWebKeySet.md b/sdk/php/swagger/docs/Model/SwaggerJSONWebKeySet.md index 03d188448f..52908d9808 100644 --- a/sdk/php/swagger/docs/Model/SwaggerJSONWebKeySet.md +++ b/sdk/php/swagger/docs/Model/SwaggerJSONWebKeySet.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**keys** | [**\Hydra\SDK\Model\SwaggerJSONWebKey[]**](SwaggerJSONWebKey.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** | [**\HydraSDK\Model\SwaggerJSONWebKey[]**](SwaggerJSONWebKey.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/sdk/php/swagger/docs/Model/SwaggerJwkCreateSet.md b/sdk/php/swagger/docs/Model/SwaggerJwkCreateSet.md index 75e10ac524..2335e27551 100644 --- a/sdk/php/swagger/docs/Model/SwaggerJwkCreateSet.md +++ b/sdk/php/swagger/docs/Model/SwaggerJwkCreateSet.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | [**\Hydra\SDK\Model\JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md) | | [optional] +**body** | [**\HydraSDK\Model\JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md) | | [optional] **set** | **string** | The set in: path | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSet.md b/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSet.md index 4f34e2537a..a612d125ac 100644 --- a/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSet.md +++ b/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSet.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | [**\Hydra\SDK\Model\JSONWebKeySet**](JSONWebKeySet.md) | | [optional] +**body** | [**\HydraSDK\Model\JSONWebKeySet**](JSONWebKeySet.md) | | [optional] **set** | **string** | The set in: path | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSetKey.md b/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSetKey.md index 65b1bb6c15..61724b5a32 100644 --- a/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSetKey.md +++ b/sdk/php/swagger/docs/Model/SwaggerJwkUpdateSetKey.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | [**\Hydra\SDK\Model\JSONWebKey**](JSONWebKey.md) | | [optional] +**body** | [**\HydraSDK\Model\JSONWebKey**](JSONWebKey.md) | | [optional] **kid** | **string** | The kid of the desired key in: path | **set** | **string** | The set in: path | diff --git a/sdk/php/swagger/git_push.sh b/sdk/php/swagger/git_push.sh index 8dec03e7ca..228df0fd02 100644 --- a/sdk/php/swagger/git_push.sh +++ b/sdk/php/swagger/git_push.sh @@ -13,7 +13,7 @@ if [ "$git_user_id" = "" ]; then fi if [ "$git_repo_id" = "" ]; then - git_repo_id="hydra" + git_repo_id="swagger" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi @@ -36,7 +36,7 @@ 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." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/sdk/php/swagger/lib/Api/AdminApi.php b/sdk/php/swagger/lib/Api/AdminApi.php index ec4bab74bf..ec9d92e12b 100644 --- a/sdk/php/swagger/lib/Api/AdminApi.php +++ b/sdk/php/swagger/lib/Api/AdminApi.php @@ -4,7 +4,7 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -17,7 +17,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -26,65 +26,65 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Api; +namespace HydraSDK\Api; -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Hydra\SDK\ApiException; -use Hydra\SDK\Configuration; -use Hydra\SDK\HeaderSelector; -use Hydra\SDK\ObjectSerializer; +use \HydraSDK\ApiClient; +use \HydraSDK\ApiException; +use \HydraSDK\Configuration; +use \HydraSDK\ObjectSerializer; /** * AdminApi Class Doc Comment * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class AdminApi { /** - * @var ClientInterface + * API Client + * + * @var \HydraSDK\ApiClient instance of the ApiClient */ - protected $client; + protected $apiClient; /** - * @var Configuration + * Constructor + * + * @param \HydraSDK\ApiClient|null $apiClient The api client to use */ - protected $config; + public function __construct(\HydraSDK\ApiClient $apiClient = null) + { + if ($apiClient === null) { + $apiClient = new ApiClient(); + } - /** - * @var HeaderSelector - */ - protected $headerSelector; + $this->apiClient = $apiClient; + } /** - * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector + * Get API client + * + * @return \HydraSDK\ApiClient get the API client */ - public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null - ) { - $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); + public function getApiClient() + { + return $this->apiClient; } /** - * @return Configuration + * Set the API client + * + * @param \HydraSDK\ApiClient $apiClient set the API client + * + * @return AdminApi */ - public function getConfig() + public function setApiClient(\HydraSDK\ApiClient $apiClient) { - return $this->config; + $this->apiClient = $apiClient; + return $this; } /** @@ -94,12 +94,10 @@ public function getConfig() * * Client for Hydra * - * @param string $consent_challenge consent_challenge (required) - * @param \Hydra\SDK\Model\AcceptConsentRequest $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\CompletedRequest + * @param string $consent_challenge (required) + * @param \HydraSDK\Model\AcceptConsentRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\CompletedRequest */ public function acceptConsentRequest($consent_challenge, $body = null) { @@ -114,7360 +112,2507 @@ public function acceptConsentRequest($consent_challenge, $body = null) * * Client for Hydra * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\AcceptConsentRequest $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) + * @param string $consent_challenge (required) + * @param \HydraSDK\Model\AcceptConsentRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) */ public function acceptConsentRequestWithHttpInfo($consent_challenge, $body = null) { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->acceptConsentRequestRequest($consent_challenge, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'consent_challenge' is set + if ($consent_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $consent_challenge when calling acceptConsentRequest'); + } + // parse inputs + $resourcePath = "/oauth2/auth/requests/consent/accept"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // query params + if ($consent_challenge !== null) { + $queryParams['consent_challenge'] = $this->apiClient->getSerializer()->toQueryValue($consent_challenge); + } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\CompletedRequest', + '/oauth2/auth/requests/consent/accept' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\CompletedRequest', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\CompletedRequest', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\CompletedRequest', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation acceptConsentRequestAsync + * Operation acceptLoginRequest * - * Accept an consent request + * Accept an login request * * Client for Hydra * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\AcceptConsentRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $login_challenge (required) + * @param \HydraSDK\Model\AcceptLoginRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\CompletedRequest */ - public function acceptConsentRequestAsync($consent_challenge, $body = null) + public function acceptLoginRequest($login_challenge, $body = null) { - return $this->acceptConsentRequestAsyncWithHttpInfo($consent_challenge, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->acceptLoginRequestWithHttpInfo($login_challenge, $body); + return $response; } /** - * Operation acceptConsentRequestAsyncWithHttpInfo + * Operation acceptLoginRequestWithHttpInfo * - * Accept an consent request + * Accept an login request * * Client for Hydra * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\AcceptConsentRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function acceptConsentRequestAsyncWithHttpInfo($consent_challenge, $body = null) - { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->acceptConsentRequestRequest($consent_challenge, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'acceptConsentRequest' - * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\AcceptConsentRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $login_challenge (required) + * @param \HydraSDK\Model\AcceptLoginRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) */ - protected function acceptConsentRequestRequest($consent_challenge, $body = null) + public function acceptLoginRequestWithHttpInfo($login_challenge, $body = null) { - // verify the required parameter 'consent_challenge' is set - if ($consent_challenge === null || (is_array($consent_challenge) && count($consent_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $consent_challenge when calling acceptConsentRequest' - ); + // verify the required parameter 'login_challenge' is set + if ($login_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $login_challenge when calling acceptLoginRequest'); } - - $resourcePath = '/oauth2/auth/requests/consent/accept'; - $formParams = []; + // parse inputs + $resourcePath = "/oauth2/auth/requests/login/accept"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($consent_challenge !== null) { - $queryParams['consent_challenge'] = ObjectSerializer::toQueryValue($consent_challenge); + if ($login_challenge !== null) { + $queryParams['login_challenge'] = $this->apiClient->getSerializer()->toQueryValue($login_challenge); } - - // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\CompletedRequest', + '/oauth2/auth/requests/login/accept' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\CompletedRequest', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\CompletedRequest', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation acceptLoginRequest + * Operation acceptLogoutRequest * - * Accept an login request + * Accept a logout request * * Client for Hydra * - * @param string $login_challenge login_challenge (required) - * @param \Hydra\SDK\Model\AcceptLoginRequest $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\CompletedRequest + * @param string $logout_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\CompletedRequest */ - public function acceptLoginRequest($login_challenge, $body = null) + public function acceptLogoutRequest($logout_challenge) { - list($response) = $this->acceptLoginRequestWithHttpInfo($login_challenge, $body); + list($response) = $this->acceptLogoutRequestWithHttpInfo($logout_challenge); return $response; } /** - * Operation acceptLoginRequestWithHttpInfo + * Operation acceptLogoutRequestWithHttpInfo * - * Accept an login request + * Accept a logout request * * Client for Hydra * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\AcceptLoginRequest $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) + * @param string $logout_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) */ - public function acceptLoginRequestWithHttpInfo($login_challenge, $body = null) + public function acceptLogoutRequestWithHttpInfo($logout_challenge) { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->acceptLoginRequestRequest($login_challenge, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'logout_challenge' is set + if ($logout_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $logout_challenge when calling acceptLogoutRequest'); + } + // parse inputs + $resourcePath = "/oauth2/auth/requests/logout/accept"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // query params + if ($logout_challenge !== null) { + $queryParams['logout_challenge'] = $this->apiClient->getSerializer()->toQueryValue($logout_challenge); + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\CompletedRequest', + '/oauth2/auth/requests/logout/accept' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\CompletedRequest', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\CompletedRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\CompletedRequest', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation acceptLoginRequestAsync + * Operation createJsonWebKeySet * - * Accept an login request + * Generate a new JSON Web Key * * Client for Hydra * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\AcceptLoginRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $set The set (required) + * @param \HydraSDK\Model\JsonWebKeySetGeneratorRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\JSONWebKeySet */ - public function acceptLoginRequestAsync($login_challenge, $body = null) + public function createJsonWebKeySet($set, $body = null) { - return $this->acceptLoginRequestAsyncWithHttpInfo($login_challenge, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->createJsonWebKeySetWithHttpInfo($set, $body); + return $response; } /** - * Operation acceptLoginRequestAsyncWithHttpInfo + * Operation createJsonWebKeySetWithHttpInfo * - * Accept an login request + * Generate a new JSON Web Key * * Client for Hydra * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\AcceptLoginRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function acceptLoginRequestAsyncWithHttpInfo($login_challenge, $body = null) - { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->acceptLoginRequestRequest($login_challenge, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'acceptLoginRequest' - * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\AcceptLoginRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $set The set (required) + * @param \HydraSDK\Model\JsonWebKeySetGeneratorRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) */ - protected function acceptLoginRequestRequest($login_challenge, $body = null) + public function createJsonWebKeySetWithHttpInfo($set, $body = null) { - // verify the required parameter 'login_challenge' is set - if ($login_challenge === null || (is_array($login_challenge) && count($login_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $login_challenge when calling acceptLoginRequest' - ); + // verify the required parameter 'set' is set + if ($set === null) { + throw new \InvalidArgumentException('Missing the required parameter $set when calling createJsonWebKeySet'); } - - $resourcePath = '/oauth2/auth/requests/login/accept'; - $formParams = []; + // parse inputs + $resourcePath = "/keys/{set}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($login_challenge !== null) { - $queryParams['login_challenge'] = ObjectSerializer::toQueryValue($login_challenge); + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - + // path params + if ($set !== null) { + $resourcePath = str_replace( + "{" . "set" . "}", + $this->apiClient->getSerializer()->toPathValue($set), + $resourcePath + ); + } // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\JSONWebKeySet', + '/keys/{set}' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\JSONWebKeySet', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\JSONWebKeySet', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 403: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation acceptLogoutRequest + * Operation createOAuth2Client * - * Accept a logout request + * Create an OAuth 2.0 client * * Client for Hydra * - * @param string $logout_challenge logout_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\CompletedRequest + * @param \HydraSDK\Model\OAuth2Client $body (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\OAuth2Client */ - public function acceptLogoutRequest($logout_challenge) + public function createOAuth2Client($body) { - list($response) = $this->acceptLogoutRequestWithHttpInfo($logout_challenge); + list($response) = $this->createOAuth2ClientWithHttpInfo($body); return $response; } /** - * Operation acceptLogoutRequestWithHttpInfo + * Operation createOAuth2ClientWithHttpInfo * - * Accept a logout request + * Create an OAuth 2.0 client * * Client for Hydra * - * @param string $logout_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) + * @param \HydraSDK\Model\OAuth2Client $body (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\OAuth2Client, HTTP status code, HTTP response headers (array of strings) */ - public function acceptLogoutRequestWithHttpInfo($logout_challenge) + public function createOAuth2ClientWithHttpInfo($body) { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->acceptLogoutRequestRequest($logout_challenge); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'body' is set + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling createOAuth2Client'); + } + // parse inputs + $resourcePath = "/clients"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\OAuth2Client', + '/clients' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\OAuth2Client', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\CompletedRequest', - $e->getResponseHeaders() - ); + case 201: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\OAuth2Client', $e->getResponseHeaders()); $e->setResponseObject($data); break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 409: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation acceptLogoutRequestAsync + * Operation deleteJsonWebKey * - * Accept a logout request + * Delete a JSON Web Key * * Client for Hydra * - * @param string $logout_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $kid The kid of the desired key (required) + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function acceptLogoutRequestAsync($logout_challenge) + public function deleteJsonWebKey($kid, $set) { - return $this->acceptLogoutRequestAsyncWithHttpInfo($logout_challenge) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->deleteJsonWebKeyWithHttpInfo($kid, $set); + return $response; } /** - * Operation acceptLogoutRequestAsyncWithHttpInfo + * Operation deleteJsonWebKeyWithHttpInfo * - * Accept a logout request + * Delete a JSON Web Key * * Client for Hydra * - * @param string $logout_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function acceptLogoutRequestAsyncWithHttpInfo($logout_challenge) - { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->acceptLogoutRequestRequest($logout_challenge); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'acceptLogoutRequest' - * - * @param string $logout_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $kid The kid of the desired key (required) + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - protected function acceptLogoutRequestRequest($logout_challenge) + public function deleteJsonWebKeyWithHttpInfo($kid, $set) { - // verify the required parameter 'logout_challenge' is set - if ($logout_challenge === null || (is_array($logout_challenge) && count($logout_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $logout_challenge when calling acceptLogoutRequest' - ); + // verify the required parameter 'kid' is set + if ($kid === null) { + throw new \InvalidArgumentException('Missing the required parameter $kid when calling deleteJsonWebKey'); } - - $resourcePath = '/oauth2/auth/requests/logout/accept'; - $formParams = []; + // verify the required parameter 'set' is set + if ($set === null) { + throw new \InvalidArgumentException('Missing the required parameter $set when calling deleteJsonWebKey'); + } + // parse inputs + $resourcePath = "/keys/{set}/{kid}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($logout_challenge !== null) { - $queryParams['logout_challenge'] = ObjectSerializer::toQueryValue($logout_challenge); + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + // path params + if ($kid !== null) { + $resourcePath = str_replace( + "{" . "kid" . "}", + $this->apiClient->getSerializer()->toPathValue($kid), + $resourcePath ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] + } + // path params + if ($set !== null) { + $resourcePath = str_replace( + "{" . "set" . "}", + $this->apiClient->getSerializer()->toPathValue($set), + $resourcePath ); } // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/keys/{set}/{kid}' + ); + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 403: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation createJsonWebKeySet + * Operation deleteJsonWebKeySet * - * Generate a new JSON Web Key + * Delete a JSON Web Key Set * * Client for Hydra * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JsonWebKeySetGeneratorRequest $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\JSONWebKeySet + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function createJsonWebKeySet($set, $body = null) + public function deleteJsonWebKeySet($set) { - list($response) = $this->createJsonWebKeySetWithHttpInfo($set, $body); + list($response) = $this->deleteJsonWebKeySetWithHttpInfo($set); return $response; } /** - * Operation createJsonWebKeySetWithHttpInfo + * Operation deleteJsonWebKeySetWithHttpInfo * - * Generate a new JSON Web Key + * Delete a JSON Web Key Set * * Client for Hydra * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JsonWebKeySetGeneratorRequest $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createJsonWebKeySetWithHttpInfo($set, $body = null) + public function deleteJsonWebKeySetWithHttpInfo($set) { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->createJsonWebKeySetRequest($set, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'set' is set + if ($set === null) { + throw new \InvalidArgumentException('Missing the required parameter $set when calling deleteJsonWebKeySet'); + } + // parse inputs + $resourcePath = "/keys/{set}"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // path params + if ($set !== null) { + $resourcePath = str_replace( + "{" . "set" . "}", + $this->apiClient->getSerializer()->toPathValue($set), + $resourcePath + ); + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/keys/{set}' + ); + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation createJsonWebKeySetAsync + * Operation deleteOAuth2Client * - * Generate a new JSON Web Key + * Deletes an OAuth 2.0 Client * * Client for Hydra * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JsonWebKeySetGeneratorRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $id The id of the OAuth 2.0 Client. (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function createJsonWebKeySetAsync($set, $body = null) + public function deleteOAuth2Client($id) { - return $this->createJsonWebKeySetAsyncWithHttpInfo($set, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->deleteOAuth2ClientWithHttpInfo($id); + return $response; } /** - * Operation createJsonWebKeySetAsyncWithHttpInfo + * Operation deleteOAuth2ClientWithHttpInfo * - * Generate a new JSON Web Key + * Deletes an OAuth 2.0 Client * * Client for Hydra * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JsonWebKeySetGeneratorRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createJsonWebKeySetAsyncWithHttpInfo($set, $body = null) - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->createJsonWebKeySetRequest($set, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createJsonWebKeySet' - * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JsonWebKeySetGeneratorRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $id The id of the OAuth 2.0 Client. (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - protected function createJsonWebKeySetRequest($set, $body = null) + public function deleteOAuth2ClientWithHttpInfo($id) { - // 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 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling deleteOAuth2Client'); } - - $resourcePath = '/keys/{set}'; - $formParams = []; + // parse inputs + $resourcePath = "/clients/{id}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // path params - if ($set !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + "{" . "id" . "}", + $this->apiClient->getSerializer()->toPathValue($id), $resourcePath ); } - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/clients/{id}' + ); + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation createOAuth2Client + * Operation flushInactiveOAuth2Tokens * - * Create an OAuth 2.0 client + * Flush Expired OAuth2 Access Tokens * * Client for Hydra * - * @param \Hydra\SDK\Model\OAuth2Client $body body (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\OAuth2Client + * @param \HydraSDK\Model\FlushInactiveOAuth2TokensRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function createOAuth2Client($body) + public function flushInactiveOAuth2Tokens($body = null) { - list($response) = $this->createOAuth2ClientWithHttpInfo($body); + list($response) = $this->flushInactiveOAuth2TokensWithHttpInfo($body); return $response; } /** - * Operation createOAuth2ClientWithHttpInfo + * Operation flushInactiveOAuth2TokensWithHttpInfo * - * Create an OAuth 2.0 client + * Flush Expired OAuth2 Access Tokens * * Client for Hydra * - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\OAuth2Client, HTTP status code, HTTP response headers (array of strings) + * @param \HydraSDK\Model\FlushInactiveOAuth2TokensRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createOAuth2ClientWithHttpInfo($body) + public function flushInactiveOAuth2TokensWithHttpInfo($body = null) { - $returnType = '\Hydra\SDK\Model\OAuth2Client'; - $request = $this->createOAuth2ClientRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // parse inputs + $resourcePath = "/oauth2/flush"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/oauth2/flush' + ); + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\OAuth2Client', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation createOAuth2ClientAsync + * Operation getConsentRequest * - * Create an OAuth 2.0 client + * Get consent request information * * Client for Hydra * - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $consent_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\ConsentRequest */ - public function createOAuth2ClientAsync($body) + public function getConsentRequest($consent_challenge) { - return $this->createOAuth2ClientAsyncWithHttpInfo($body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->getConsentRequestWithHttpInfo($consent_challenge); + return $response; } /** - * Operation createOAuth2ClientAsyncWithHttpInfo + * Operation getConsentRequestWithHttpInfo * - * Create an OAuth 2.0 client + * Get consent request information * * Client for Hydra * - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createOAuth2ClientAsyncWithHttpInfo($body) - { - $returnType = '\Hydra\SDK\Model\OAuth2Client'; - $request = $this->createOAuth2ClientRequest($body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createOAuth2Client' - * - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $consent_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\ConsentRequest, HTTP status code, HTTP response headers (array of strings) */ - protected function createOAuth2ClientRequest($body) + public function getConsentRequestWithHttpInfo($consent_challenge) { - // 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 createOAuth2Client' - ); + // verify the required parameter 'consent_challenge' is set + if ($consent_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $consent_challenge when calling getConsentRequest'); } - - $resourcePath = '/clients'; - $formParams = []; + // parse inputs + $resourcePath = "/oauth2/auth/requests/consent"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); + // query params + if ($consent_challenge !== null) { + $queryParams['consent_challenge'] = $this->apiClient->getSerializer()->toQueryValue($consent_challenge); } // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + $httpBody = $formParams; // for HTTP post (form) } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteJsonWebKey - * - * Delete a JSON Web Key - * - * Client for Hydra - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteJsonWebKey($kid, $set) - { - $this->deleteJsonWebKeyWithHttpInfo($kid, $set); - } - - /** - * Operation deleteJsonWebKeyWithHttpInfo - * - * Delete a JSON Web Key - * - * Client for Hydra - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \Hydra\SDK\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) - { - $returnType = ''; - $request = $this->deleteJsonWebKeyRequest($kid, $set); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\ConsentRequest', + '/oauth2/auth/requests/consent' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\ConsentRequest', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\ConsentRequest', $e->getResponseHeaders()); $e->setResponseObject($data); break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 409: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation deleteJsonWebKeyAsync + * Operation getJsonWebKey * - * Delete a JSON Web Key + * Fetch a JSON Web Key * * Client for Hydra * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $kid The kid of the desired key (required) + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\JSONWebKeySet */ - public function deleteJsonWebKeyAsync($kid, $set) + public function getJsonWebKey($kid, $set) { - return $this->deleteJsonWebKeyAsyncWithHttpInfo($kid, $set) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->getJsonWebKeyWithHttpInfo($kid, $set); + return $response; } /** - * Operation deleteJsonWebKeyAsyncWithHttpInfo + * Operation getJsonWebKeyWithHttpInfo * - * Delete a JSON Web Key + * Fetch a JSON Web Key * * Client for Hydra * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteJsonWebKeyAsyncWithHttpInfo($kid, $set) - { - $returnType = ''; - $request = $this->deleteJsonWebKeyRequest($kid, $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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteJsonWebKey' - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $kid The kid of the desired key (required) + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) */ - protected function deleteJsonWebKeyRequest($kid, $set) + public function getJsonWebKeyWithHttpInfo($kid, $set) { // 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' - ); + if ($kid === null) { + 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)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling deleteJsonWebKey' - ); + if ($set === null) { + throw new \InvalidArgumentException('Missing the required parameter $set when calling getJsonWebKey'); } - - $resourcePath = '/keys/{set}/{kid}'; - $formParams = []; + // parse inputs + $resourcePath = "/keys/{set}/{kid}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // path params if ($kid !== null) { $resourcePath = str_replace( - '{' . 'kid' . '}', - ObjectSerializer::toPathValue($kid), + "{" . "kid" . "}", + $this->apiClient->getSerializer()->toPathValue($kid), $resourcePath ); } // path params if ($set !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + "{" . "set" . "}", + $this->apiClient->getSerializer()->toPathValue($set), $resourcePath ); } - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteJsonWebKeySet - * - * Delete a JSON Web Key Set - * - * Client for Hydra - * - * @param string $set The set (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteJsonWebKeySet($set) - { - $this->deleteJsonWebKeySetWithHttpInfo($set); - } - - /** - * Operation deleteJsonWebKeySetWithHttpInfo - * - * Delete a JSON Web Key Set - * - * Client for Hydra - * - * @param string $set The set (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteJsonWebKeySetWithHttpInfo($set) - { - $returnType = ''; - $request = $this->deleteJsonWebKeySetRequest($set); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\JSONWebKeySet', + '/keys/{set}/{kid}' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\JSONWebKeySet', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\JSONWebKeySet', $e->getResponseHeaders()); $e->setResponseObject($data); break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation deleteJsonWebKeySetAsync + * Operation getJsonWebKeySet * - * Delete a JSON Web Key Set + * Retrieve a JSON Web Key Set * * Client for Hydra * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\JSONWebKeySet */ - public function deleteJsonWebKeySetAsync($set) + public function getJsonWebKeySet($set) { - return $this->deleteJsonWebKeySetAsyncWithHttpInfo($set) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->getJsonWebKeySetWithHttpInfo($set); + return $response; } /** - * Operation deleteJsonWebKeySetAsyncWithHttpInfo + * Operation getJsonWebKeySetWithHttpInfo * - * Delete a JSON Web Key Set + * Retrieve a JSON Web Key Set * * Client for Hydra * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $set The set (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) */ - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteJsonWebKeySet' - * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function deleteJsonWebKeySetRequest($set) + public function getJsonWebKeySetWithHttpInfo($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' - ); + if ($set === null) { + throw new \InvalidArgumentException('Missing the required parameter $set when calling getJsonWebKeySet'); } - - $resourcePath = '/keys/{set}'; - $formParams = []; + // parse inputs + $resourcePath = "/keys/{set}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // path params if ($set !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + "{" . "set" . "}", + $this->apiClient->getSerializer()->toPathValue($set), $resourcePath ); } - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + $httpBody = $formParams; // for HTTP post (form) } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteOAuth2Client - * - * Deletes an OAuth 2.0 Client - * - * Client for Hydra - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteOAuth2Client($id) - { - $this->deleteOAuth2ClientWithHttpInfo($id); - } - - /** - * Operation deleteOAuth2ClientWithHttpInfo - * - * Deletes an OAuth 2.0 Client - * - * Client for Hydra - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteOAuth2ClientWithHttpInfo($id) - { - $returnType = ''; - $request = $this->deleteOAuth2ClientRequest($id); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\JSONWebKeySet', + '/keys/{set}' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\JSONWebKeySet', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\JSONWebKeySet', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 403: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation deleteOAuth2ClientAsync + * Operation getLoginRequest * - * Deletes an OAuth 2.0 Client + * Get an login request * * Client for Hydra * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $login_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\LoginRequest */ - public function deleteOAuth2ClientAsync($id) + public function getLoginRequest($login_challenge) { - return $this->deleteOAuth2ClientAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->getLoginRequestWithHttpInfo($login_challenge); + return $response; } /** - * Operation deleteOAuth2ClientAsyncWithHttpInfo + * Operation getLoginRequestWithHttpInfo * - * Deletes an OAuth 2.0 Client + * Get an login request * * Client for Hydra * - * @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(), - $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 + * @param string $login_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\LoginRequest, HTTP status code, HTTP response headers (array of strings) */ - protected function deleteOAuth2ClientRequest($id) + public function getLoginRequestWithHttpInfo($login_challenge) { - // 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' - ); + // verify the required parameter 'login_challenge' is set + if ($login_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $login_challenge when calling getLoginRequest'); } - - $resourcePath = '/clients/{id}'; - $formParams = []; + // parse inputs + $resourcePath = "/oauth2/auth/requests/login"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation flushInactiveOAuth2Tokens - * - * Flush Expired OAuth2 Access Tokens - * - * Client for Hydra - * - * @param \Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function flushInactiveOAuth2Tokens($body = null) - { - $this->flushInactiveOAuth2TokensWithHttpInfo($body); - } - - /** - * Operation flushInactiveOAuth2TokensWithHttpInfo - * - * Flush Expired OAuth2 Access Tokens - * - * Client for Hydra - * - * @param \Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest $body (optional) - * - * @throws \Hydra\SDK\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) - { - $returnType = ''; - $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()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation flushInactiveOAuth2TokensAsync - * - * Flush Expired OAuth2 Access Tokens - * - * Client for Hydra - * - * @param \Hydra\SDK\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 - * - * Client for Hydra - * - * @param \Hydra\SDK\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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'flushInactiveOAuth2Tokens' - * - * @param \Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function flushInactiveOAuth2TokensRequest($body = null) - { - - $resourcePath = '/oauth2/flush'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getConsentRequest - * - * Get consent request information - * - * Client for Hydra - * - * @param string $consent_challenge consent_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\ConsentRequest - */ - public function getConsentRequest($consent_challenge) - { - list($response) = $this->getConsentRequestWithHttpInfo($consent_challenge); - return $response; - } - - /** - * Operation getConsentRequestWithHttpInfo - * - * Get consent request information - * - * Client for Hydra - * - * @param string $consent_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\ConsentRequest, HTTP status code, HTTP response headers (array of strings) - */ - public function getConsentRequestWithHttpInfo($consent_challenge) - { - $returnType = '\Hydra\SDK\Model\ConsentRequest'; - $request = $this->getConsentRequestRequest($consent_challenge); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\ConsentRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getConsentRequestAsync - * - * Get consent request information - * - * Client for Hydra - * - * @param string $consent_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getConsentRequestAsync($consent_challenge) - { - return $this->getConsentRequestAsyncWithHttpInfo($consent_challenge) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getConsentRequestAsyncWithHttpInfo - * - * Get consent request information - * - * Client for Hydra - * - * @param string $consent_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getConsentRequestAsyncWithHttpInfo($consent_challenge) - { - $returnType = '\Hydra\SDK\Model\ConsentRequest'; - $request = $this->getConsentRequestRequest($consent_challenge); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getConsentRequest' - * - * @param string $consent_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getConsentRequestRequest($consent_challenge) - { - // verify the required parameter 'consent_challenge' is set - if ($consent_challenge === null || (is_array($consent_challenge) && count($consent_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $consent_challenge when calling getConsentRequest' - ); - } - - $resourcePath = '/oauth2/auth/requests/consent'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($consent_challenge !== null) { - $queryParams['consent_challenge'] = ObjectSerializer::toQueryValue($consent_challenge); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getJsonWebKey - * - * Fetch a JSON Web Key - * - * Client for Hydra - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\JSONWebKeySet - */ - public function getJsonWebKey($kid, $set) - { - list($response) = $this->getJsonWebKeyWithHttpInfo($kid, $set); - return $response; - } - - /** - * Operation getJsonWebKeyWithHttpInfo - * - * Fetch a JSON Web Key - * - * Client for Hydra - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) - */ - public function getJsonWebKeyWithHttpInfo($kid, $set) - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $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()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getJsonWebKeyAsync - * - * Fetch a JSON Web Key - * - * Client for Hydra - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getJsonWebKeyAsync($kid, $set) - { - return $this->getJsonWebKeyAsyncWithHttpInfo($kid, $set) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getJsonWebKeyAsyncWithHttpInfo - * - * Fetch a JSON Web Key - * - * Client for Hydra - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getJsonWebKeyAsyncWithHttpInfo($kid, $set) - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->getJsonWebKeyRequest($kid, $set); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getJsonWebKey' - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getJsonWebKeyRequest($kid, $set) - { - // 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)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling getJsonWebKey' - ); - } - - $resourcePath = '/keys/{set}/{kid}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // 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 - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getJsonWebKeySet - * - * Retrieve a JSON Web Key Set - * - * Client for Hydra - * - * @param string $set The set (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\JSONWebKeySet - */ - public function getJsonWebKeySet($set) - { - list($response) = $this->getJsonWebKeySetWithHttpInfo($set); - return $response; - } - - /** - * Operation getJsonWebKeySetWithHttpInfo - * - * Retrieve a JSON Web Key Set - * - * Client for Hydra - * - * @param string $set The set (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) - */ - public function getJsonWebKeySetWithHttpInfo($set) - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $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()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getJsonWebKeySetAsync - * - * Retrieve a JSON Web Key Set - * - * Client for Hydra - * - * @param string $set The set (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 - * - * Client for Hydra - * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getJsonWebKeySetAsyncWithHttpInfo($set) - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->getJsonWebKeySetRequest($set); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getJsonWebKeySet' - * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected 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 = '/keys/{set}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($set !== null) { - $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getLoginRequest - * - * Get an login request - * - * Client for Hydra - * - * @param string $login_challenge login_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\LoginRequest - */ - public function getLoginRequest($login_challenge) - { - list($response) = $this->getLoginRequestWithHttpInfo($login_challenge); - return $response; - } - - /** - * Operation getLoginRequestWithHttpInfo - * - * Get an login request - * - * Client for Hydra - * - * @param string $login_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\LoginRequest, HTTP status code, HTTP response headers (array of strings) - */ - public function getLoginRequestWithHttpInfo($login_challenge) - { - $returnType = '\Hydra\SDK\Model\LoginRequest'; - $request = $this->getLoginRequestRequest($login_challenge); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\LoginRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getLoginRequestAsync - * - * Get an login request - * - * Client for Hydra - * - * @param string $login_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getLoginRequestAsync($login_challenge) - { - return $this->getLoginRequestAsyncWithHttpInfo($login_challenge) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getLoginRequestAsyncWithHttpInfo - * - * Get an login request - * - * Client for Hydra - * - * @param string $login_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getLoginRequestAsyncWithHttpInfo($login_challenge) - { - $returnType = '\Hydra\SDK\Model\LoginRequest'; - $request = $this->getLoginRequestRequest($login_challenge); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getLoginRequest' - * - * @param string $login_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getLoginRequestRequest($login_challenge) - { - // verify the required parameter 'login_challenge' is set - if ($login_challenge === null || (is_array($login_challenge) && count($login_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $login_challenge when calling getLoginRequest' - ); - } - - $resourcePath = '/oauth2/auth/requests/login'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($login_challenge !== null) { - $queryParams['login_challenge'] = ObjectSerializer::toQueryValue($login_challenge); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getLogoutRequest - * - * Get a logout request - * - * Client for Hydra - * - * @param string $logout_challenge logout_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\LogoutRequest - */ - public function getLogoutRequest($logout_challenge) - { - list($response) = $this->getLogoutRequestWithHttpInfo($logout_challenge); - return $response; - } - - /** - * Operation getLogoutRequestWithHttpInfo - * - * Get a logout request - * - * Client for Hydra - * - * @param string $logout_challenge (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\LogoutRequest, HTTP status code, HTTP response headers (array of strings) - */ - public function getLogoutRequestWithHttpInfo($logout_challenge) - { - $returnType = '\Hydra\SDK\Model\LogoutRequest'; - $request = $this->getLogoutRequestRequest($logout_challenge); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\LogoutRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getLogoutRequestAsync - * - * Get a logout request - * - * Client for Hydra - * - * @param string $logout_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getLogoutRequestAsync($logout_challenge) - { - return $this->getLogoutRequestAsyncWithHttpInfo($logout_challenge) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getLogoutRequestAsyncWithHttpInfo - * - * Get a logout request - * - * Client for Hydra - * - * @param string $logout_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getLogoutRequestAsyncWithHttpInfo($logout_challenge) - { - $returnType = '\Hydra\SDK\Model\LogoutRequest'; - $request = $this->getLogoutRequestRequest($logout_challenge); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getLogoutRequest' - * - * @param string $logout_challenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getLogoutRequestRequest($logout_challenge) - { - // verify the required parameter 'logout_challenge' is set - if ($logout_challenge === null || (is_array($logout_challenge) && count($logout_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $logout_challenge when calling getLogoutRequest' - ); - } - - $resourcePath = '/oauth2/auth/requests/logout'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($logout_challenge !== null) { - $queryParams['logout_challenge'] = ObjectSerializer::toQueryValue($logout_challenge); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getOAuth2Client - * - * Get an OAuth 2.0 Client. - * - * Client for Hydra - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\OAuth2Client - */ - public function getOAuth2Client($id) - { - list($response) = $this->getOAuth2ClientWithHttpInfo($id); - return $response; - } - - /** - * Operation getOAuth2ClientWithHttpInfo - * - * Get an OAuth 2.0 Client. - * - * Client for Hydra - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\OAuth2Client, HTTP status code, HTTP response headers (array of strings) - */ - public function getOAuth2ClientWithHttpInfo($id) - { - $returnType = '\Hydra\SDK\Model\OAuth2Client'; - $request = $this->getOAuth2ClientRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\OAuth2Client', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getOAuth2ClientAsync - * - * Get an OAuth 2.0 Client. - * - * Client for Hydra - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getOAuth2ClientAsync($id) - { - return $this->getOAuth2ClientAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getOAuth2ClientAsyncWithHttpInfo - * - * Get an OAuth 2.0 Client. - * - * Client for Hydra - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getOAuth2ClientAsyncWithHttpInfo($id) - { - $returnType = '\Hydra\SDK\Model\OAuth2Client'; - $request = $this->getOAuth2ClientRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getOAuth2Client' - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getOAuth2ClientRequest($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 getOAuth2Client' - ); - } - - $resourcePath = '/clients/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation introspectOAuth2Token - * - * Introspect OAuth2 tokens - * - * Client for Hydra - * - * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. (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 \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\OAuth2TokenIntrospection - */ - public function introspectOAuth2Token($token, $scope = null) - { - list($response) = $this->introspectOAuth2TokenWithHttpInfo($token, $scope); - return $response; - } - - /** - * Operation introspectOAuth2TokenWithHttpInfo - * - * Introspect OAuth2 tokens - * - * Client for Hydra - * - * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. (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 \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\OAuth2TokenIntrospection, HTTP status code, HTTP response headers (array of strings) - */ - public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) - { - $returnType = '\Hydra\SDK\Model\OAuth2TokenIntrospection'; - $request = $this->introspectOAuth2TokenRequest($token, $scope); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\OAuth2TokenIntrospection', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation introspectOAuth2TokenAsync - * - * Introspect OAuth2 tokens - * - * Client for Hydra - * - * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. (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 introspectOAuth2TokenAsync($token, $scope = null) - { - return $this->introspectOAuth2TokenAsyncWithHttpInfo($token, $scope) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation introspectOAuth2TokenAsyncWithHttpInfo - * - * Introspect OAuth2 tokens - * - * Client for Hydra - * - * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. (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 introspectOAuth2TokenAsyncWithHttpInfo($token, $scope = null) - { - $returnType = '\Hydra\SDK\Model\OAuth2TokenIntrospection'; - $request = $this->introspectOAuth2TokenRequest($token, $scope); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * 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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. (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 - */ - protected 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 = '/oauth2/introspect'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // form params - if ($token !== null) { - $formParams['token'] = ObjectSerializer::toFormValue($token); - } - // form params - if ($scope !== null) { - $formParams['scope'] = ObjectSerializer::toFormValue($scope); - } - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/x-www-form-urlencoded'] - ); + // query params + if ($login_challenge !== null) { + $queryParams['login_challenge'] = $this->apiClient->getSerializer()->toQueryValue($login_challenge); } // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } - - // this endpoint requires HTTP basic authentication - if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { - $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\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listOAuth2Clients - * - * List OAuth 2.0 Clients - * - * Client for Hydra - * - * @param int $limit The maximum amount of policies returned. (optional) - * @param int $offset The offset from where to start looking. (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\OAuth2Client[] - */ - public function listOAuth2Clients($limit = null, $offset = null) - { - list($response) = $this->listOAuth2ClientsWithHttpInfo($limit, $offset); - return $response; - } - - /** - * Operation listOAuth2ClientsWithHttpInfo - * - * List OAuth 2.0 Clients - * - * Client for Hydra - * - * @param int $limit The maximum amount of policies returned. (optional) - * @param int $offset The offset from where to start looking. (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\OAuth2Client[], HTTP status code, HTTP response headers (array of strings) - */ - public function listOAuth2ClientsWithHttpInfo($limit = null, $offset = null) - { - $returnType = '\Hydra\SDK\Model\OAuth2Client[]'; - $request = $this->listOAuth2ClientsRequest($limit, $offset); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\OAuth2Client[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation listOAuth2ClientsAsync - * - * List OAuth 2.0 Clients - * - * Client for Hydra - * - * @param int $limit The maximum amount of policies returned. (optional) - * @param int $offset The offset from where to start looking. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listOAuth2ClientsAsync($limit = null, $offset = null) - { - return $this->listOAuth2ClientsAsyncWithHttpInfo($limit, $offset) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listOAuth2ClientsAsyncWithHttpInfo - * - * List OAuth 2.0 Clients - * - * Client for Hydra - * - * @param int $limit The maximum amount of policies returned. (optional) - * @param int $offset The offset from where to start looking. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listOAuth2ClientsAsyncWithHttpInfo($limit = null, $offset = null) - { - $returnType = '\Hydra\SDK\Model\OAuth2Client[]'; - $request = $this->listOAuth2ClientsRequest($limit, $offset); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listOAuth2Clients' - * - * @param int $limit The maximum amount of policies returned. (optional) - * @param int $offset The offset from where to start looking. (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function listOAuth2ClientsRequest($limit = null, $offset = null) - { - - $resourcePath = '/clients'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($limit !== null) { - $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\LoginRequest', + '/oauth2/auth/requests/login' ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation listSubjectConsentSessions - * - * Lists all consent sessions of a subject - * - * Client for Hydra - * - * @param string $subject subject (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\PreviousConsentSession[] - */ - public function listSubjectConsentSessions($subject) - { - list($response) = $this->listSubjectConsentSessionsWithHttpInfo($subject); - return $response; - } - - /** - * Operation listSubjectConsentSessionsWithHttpInfo - * - * Lists all consent sessions of a subject - * - * Client for Hydra - * - * @param string $subject (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\PreviousConsentSession[], HTTP status code, HTTP response headers (array of strings) - */ - public function listSubjectConsentSessionsWithHttpInfo($subject) - { - $returnType = '\Hydra\SDK\Model\PreviousConsentSession[]'; - $request = $this->listSubjectConsentSessionsRequest($subject); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\LoginRequest', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\PreviousConsentSession[]', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\LoginRequest', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 409: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } - throw $e; - } - } - - /** - * Operation listSubjectConsentSessionsAsync - * - * Lists all consent sessions of a subject - * - * Client for Hydra - * - * @param string $subject (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listSubjectConsentSessionsAsync($subject) - { - return $this->listSubjectConsentSessionsAsyncWithHttpInfo($subject) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation listSubjectConsentSessionsAsyncWithHttpInfo - * - * Lists all consent sessions of a subject - * - * Client for Hydra - * - * @param string $subject (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function listSubjectConsentSessionsAsyncWithHttpInfo($subject) - { - $returnType = '\Hydra\SDK\Model\PreviousConsentSession[]'; - $request = $this->listSubjectConsentSessionsRequest($subject); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'listSubjectConsentSessions' - * - * @param string $subject (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function listSubjectConsentSessionsRequest($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 listSubjectConsentSessions' - ); - } - - $resourcePath = '/oauth2/auth/sessions/consent'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($subject !== null) { - $queryParams['subject'] = ObjectSerializer::toQueryValue($subject); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation rejectConsentRequest + * Operation getLogoutRequest * - * Reject an consent request + * Get a logout request * * Client for Hydra * - * @param string $consent_challenge consent_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\CompletedRequest + * @param string $logout_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\LogoutRequest */ - public function rejectConsentRequest($consent_challenge, $body = null) + public function getLogoutRequest($logout_challenge) { - list($response) = $this->rejectConsentRequestWithHttpInfo($consent_challenge, $body); + list($response) = $this->getLogoutRequestWithHttpInfo($logout_challenge); return $response; } /** - * Operation rejectConsentRequestWithHttpInfo + * Operation getLogoutRequestWithHttpInfo * - * Reject an consent request + * Get a logout request * * Client for Hydra * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) + * @param string $logout_challenge (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\LogoutRequest, HTTP status code, HTTP response headers (array of strings) */ - public function rejectConsentRequestWithHttpInfo($consent_challenge, $body = null) + public function getLogoutRequestWithHttpInfo($logout_challenge) { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->rejectConsentRequestRequest($consent_challenge, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'logout_challenge' is set + if ($logout_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $logout_challenge when calling getLogoutRequest'); + } + // parse inputs + $resourcePath = "/oauth2/auth/requests/logout"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // query params + if ($logout_challenge !== null) { + $queryParams['logout_challenge'] = $this->apiClient->getSerializer()->toQueryValue($logout_challenge); + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\LogoutRequest', + '/oauth2/auth/requests/logout' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\LogoutRequest', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\CompletedRequest', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\LogoutRequest', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation rejectConsentRequestAsync + * Operation getOAuth2Client * - * Reject an consent request + * Get an OAuth 2.0 Client. * * Client for Hydra * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $id The id of the OAuth 2.0 Client. (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\OAuth2Client */ - public function rejectConsentRequestAsync($consent_challenge, $body = null) + public function getOAuth2Client($id) { - return $this->rejectConsentRequestAsyncWithHttpInfo($consent_challenge, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->getOAuth2ClientWithHttpInfo($id); + return $response; } /** - * Operation rejectConsentRequestAsyncWithHttpInfo + * Operation getOAuth2ClientWithHttpInfo * - * Reject an consent request + * Get an OAuth 2.0 Client. * * Client for Hydra * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function rejectConsentRequestAsyncWithHttpInfo($consent_challenge, $body = null) - { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->rejectConsentRequestRequest($consent_challenge, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'rejectConsentRequest' - * - * @param string $consent_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $id The id of the OAuth 2.0 Client. (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\OAuth2Client, HTTP status code, HTTP response headers (array of strings) */ - protected function rejectConsentRequestRequest($consent_challenge, $body = null) + public function getOAuth2ClientWithHttpInfo($id) { - // verify the required parameter 'consent_challenge' is set - if ($consent_challenge === null || (is_array($consent_challenge) && count($consent_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $consent_challenge when calling rejectConsentRequest' - ); + // verify the required parameter 'id' is set + if ($id === null) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getOAuth2Client'); } - - $resourcePath = '/oauth2/auth/requests/consent/reject'; - $formParams = []; + // parse inputs + $resourcePath = "/clients/{id}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($consent_challenge !== null) { - $queryParams['consent_challenge'] = ObjectSerializer::toQueryValue($consent_challenge); - } - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] + // path params + if ($id !== null) { + $resourcePath = str_replace( + "{" . "id" . "}", + $this->apiClient->getSerializer()->toPathValue($id), + $resourcePath ); } // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\OAuth2Client', + '/clients/{id}' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\OAuth2Client', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\OAuth2Client', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation rejectLoginRequest + * Operation introspectOAuth2Token * - * Reject a login request + * Introspect OAuth2 tokens * * Client for Hydra * - * @param string $login_challenge login_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\CompletedRequest + * @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 \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\OAuth2TokenIntrospection */ - public function rejectLoginRequest($login_challenge, $body = null) + public function introspectOAuth2Token($token, $scope = null) { - list($response) = $this->rejectLoginRequestWithHttpInfo($login_challenge, $body); + list($response) = $this->introspectOAuth2TokenWithHttpInfo($token, $scope); return $response; } /** - * Operation rejectLoginRequestWithHttpInfo + * Operation introspectOAuth2TokenWithHttpInfo * - * Reject a login request + * Introspect OAuth2 tokens * * Client for Hydra * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) + * @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 \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\OAuth2TokenIntrospection, HTTP status code, HTTP response headers (array of strings) */ - public function rejectLoginRequestWithHttpInfo($login_challenge, $body = null) + public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->rejectLoginRequestRequest($login_challenge, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'token' is set + if ($token === null) { + throw new \InvalidArgumentException('Missing the required parameter $token when calling introspectOAuth2Token'); + } + // parse inputs + $resourcePath = "/oauth2/introspect"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/x-www-form-urlencoded']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // form params + if ($token !== null) { + $formParams['token'] = $this->apiClient->getSerializer()->toFormValue($token); + } + // form params + if ($scope !== null) { + $formParams['scope'] = $this->apiClient->getSerializer()->toFormValue($scope); + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\OAuth2TokenIntrospection', + '/oauth2/introspect' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\OAuth2TokenIntrospection', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\CompletedRequest', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\OAuth2TokenIntrospection', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation rejectLoginRequestAsync + * Operation listOAuth2Clients * - * Reject a login request + * List OAuth 2.0 Clients * * Client for Hydra * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param int $limit The maximum amount of policies returned. (optional) + * @param int $offset The offset from where to start looking. (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\OAuth2Client[] */ - public function rejectLoginRequestAsync($login_challenge, $body = null) + public function listOAuth2Clients($limit = null, $offset = null) { - return $this->rejectLoginRequestAsyncWithHttpInfo($login_challenge, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->listOAuth2ClientsWithHttpInfo($limit, $offset); + return $response; } /** - * Operation rejectLoginRequestAsyncWithHttpInfo + * Operation listOAuth2ClientsWithHttpInfo * - * Reject a login request + * List OAuth 2.0 Clients * * Client for Hydra * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function rejectLoginRequestAsyncWithHttpInfo($login_challenge, $body = null) - { - $returnType = '\Hydra\SDK\Model\CompletedRequest'; - $request = $this->rejectLoginRequestRequest($login_challenge, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'rejectLoginRequest' - * - * @param string $login_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param int $limit The maximum amount of policies returned. (optional) + * @param int $offset The offset from where to start looking. (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\OAuth2Client[], HTTP status code, HTTP response headers (array of strings) */ - protected function rejectLoginRequestRequest($login_challenge, $body = null) + public function listOAuth2ClientsWithHttpInfo($limit = null, $offset = null) { - // verify the required parameter 'login_challenge' is set - if ($login_challenge === null || (is_array($login_challenge) && count($login_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $login_challenge when calling rejectLoginRequest' - ); - } - - $resourcePath = '/oauth2/auth/requests/login/reject'; - $formParams = []; + // parse inputs + $resourcePath = "/clients"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if ($login_challenge !== null) { - $queryParams['login_challenge'] = ObjectSerializer::toQueryValue($login_challenge); + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; + // query params + if ($limit !== null) { + $queryParams['limit'] = $this->apiClient->getSerializer()->toQueryValue($limit); } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); + // query params + if ($offset !== null) { + $queryParams['offset'] = $this->apiClient->getSerializer()->toQueryValue($offset); } // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\OAuth2Client[]', + '/clients' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\OAuth2Client[]', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\OAuth2Client[]', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation rejectLogoutRequest + * Operation listSubjectConsentSessions * - * Reject a logout request + * Lists all consent sessions of a subject * * Client for Hydra * - * @param string $logout_challenge logout_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void + * @param string $subject (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\PreviousConsentSession[] */ - public function rejectLogoutRequest($logout_challenge, $body = null) + public function listSubjectConsentSessions($subject) { - $this->rejectLogoutRequestWithHttpInfo($logout_challenge, $body); + list($response) = $this->listSubjectConsentSessionsWithHttpInfo($subject); + return $response; } /** - * Operation rejectLogoutRequestWithHttpInfo + * Operation listSubjectConsentSessionsWithHttpInfo * - * Reject a logout request + * Lists all consent sessions of a subject * * Client for Hydra * - * @param string $logout_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @param string $subject (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\PreviousConsentSession[], HTTP status code, HTTP response headers (array of strings) */ - public function rejectLogoutRequestWithHttpInfo($logout_challenge, $body = null) + public function listSubjectConsentSessionsWithHttpInfo($subject) { - $returnType = ''; - $request = $this->rejectLogoutRequestRequest($logout_challenge, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } + // verify the required parameter 'subject' is set + if ($subject === null) { + throw new \InvalidArgumentException('Missing the required parameter $subject when calling listSubjectConsentSessions'); + } + // parse inputs + $resourcePath = "/oauth2/auth/sessions/consent"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // query params + if ($subject !== null) { + $queryParams['subject'] = $this->apiClient->getSerializer()->toQueryValue($subject); + } - return [null, $statusCode, $response->getHeaders()]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\PreviousConsentSession[]', + '/oauth2/auth/sessions/consent' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\PreviousConsentSession[]', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\PreviousConsentSession[]', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation rejectLogoutRequestAsync + * Operation rejectConsentRequest * - * Reject a logout request + * Reject an consent request * * Client for Hydra * - * @param string $logout_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $consent_challenge (required) + * @param \HydraSDK\Model\RejectRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\CompletedRequest */ - public function rejectLogoutRequestAsync($logout_challenge, $body = null) + public function rejectConsentRequest($consent_challenge, $body = null) { - return $this->rejectLogoutRequestAsyncWithHttpInfo($logout_challenge, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->rejectConsentRequestWithHttpInfo($consent_challenge, $body); + return $response; } /** - * Operation rejectLogoutRequestAsyncWithHttpInfo + * Operation rejectConsentRequestWithHttpInfo * - * Reject a logout request + * Reject an consent request * * Client for Hydra * - * @param string $logout_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function rejectLogoutRequestAsyncWithHttpInfo($logout_challenge, $body = null) - { - $returnType = ''; - $request = $this->rejectLogoutRequestRequest($logout_challenge, $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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'rejectLogoutRequest' - * - * @param string $logout_challenge (required) - * @param \Hydra\SDK\Model\RejectRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $consent_challenge (required) + * @param \HydraSDK\Model\RejectRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) */ - protected function rejectLogoutRequestRequest($logout_challenge, $body = null) + public function rejectConsentRequestWithHttpInfo($consent_challenge, $body = null) { - // verify the required parameter 'logout_challenge' is set - if ($logout_challenge === null || (is_array($logout_challenge) && count($logout_challenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $logout_challenge when calling rejectLogoutRequest' - ); + // verify the required parameter 'consent_challenge' is set + if ($consent_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $consent_challenge when calling rejectConsentRequest'); } - - $resourcePath = '/oauth2/auth/requests/logout/reject'; - $formParams = []; + // parse inputs + $resourcePath = "/oauth2/auth/requests/consent/reject"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($logout_challenge !== null) { - $queryParams['logout_challenge'] = ObjectSerializer::toQueryValue($logout_challenge); + if ($consent_challenge !== null) { + $queryParams['consent_challenge'] = $this->apiClient->getSerializer()->toQueryValue($consent_challenge); } - - // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + $httpBody = $formParams; // for HTTP post (form) } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation revokeAuthenticationSession - * - * Invalidates all login sessions of a certain user Invalidates a subject's authentication session - * - * Client for Hydra - * - * @param string $subject subject (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function revokeAuthenticationSession($subject) - { - $this->revokeAuthenticationSessionWithHttpInfo($subject); - } - - /** - * Operation revokeAuthenticationSessionWithHttpInfo - * - * Invalidates all login sessions of a certain user Invalidates a subject's authentication session - * - * Client for Hydra - * - * @param string $subject (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function revokeAuthenticationSessionWithHttpInfo($subject) - { - $returnType = ''; - $request = $this->revokeAuthenticationSessionRequest($subject); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\CompletedRequest', + '/oauth2/auth/requests/consent/reject' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\CompletedRequest', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\CompletedRequest', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation revokeAuthenticationSessionAsync + * Operation rejectLoginRequest * - * Invalidates all login sessions of a certain user Invalidates a subject's authentication session + * Reject a login request * * Client for Hydra * - * @param string $subject (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $login_challenge (required) + * @param \HydraSDK\Model\RejectRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\CompletedRequest */ - public function revokeAuthenticationSessionAsync($subject) + public function rejectLoginRequest($login_challenge, $body = null) { - return $this->revokeAuthenticationSessionAsyncWithHttpInfo($subject) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->rejectLoginRequestWithHttpInfo($login_challenge, $body); + return $response; } /** - * Operation revokeAuthenticationSessionAsyncWithHttpInfo + * Operation rejectLoginRequestWithHttpInfo * - * Invalidates all login sessions of a certain user Invalidates a subject's authentication session + * Reject a login request * * Client for Hydra * - * @param string $subject (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function revokeAuthenticationSessionAsyncWithHttpInfo($subject) - { - $returnType = ''; - $request = $this->revokeAuthenticationSessionRequest($subject); - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'revokeAuthenticationSession' - * - * @param string $subject (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $login_challenge (required) + * @param \HydraSDK\Model\RejectRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\CompletedRequest, HTTP status code, HTTP response headers (array of strings) */ - protected function revokeAuthenticationSessionRequest($subject) + public function rejectLoginRequestWithHttpInfo($login_challenge, $body = 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' - ); + // verify the required parameter 'login_challenge' is set + if ($login_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $login_challenge when calling rejectLoginRequest'); } - - $resourcePath = '/oauth2/auth/sessions/login'; - $formParams = []; + // parse inputs + $resourcePath = "/oauth2/auth/requests/login/reject"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params - if ($subject !== null) { - $queryParams['subject'] = ObjectSerializer::toQueryValue($subject); + if ($login_challenge !== null) { + $queryParams['login_challenge'] = $this->apiClient->getSerializer()->toQueryValue($login_challenge); } - - // body params $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); + if (isset($body)) { + $_tempBody = $body; } // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\CompletedRequest', + '/oauth2/auth/requests/login/reject' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\CompletedRequest', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\CompletedRequest', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation revokeConsentSessions + * Operation rejectLogoutRequest * - * Revokes consent sessions of a subject for a specific OAuth 2.0 Client + * Reject a logout request * * Client for Hydra * - * @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) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException + * @param string $logout_challenge (required) + * @param \HydraSDK\Model\RejectRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response * @return void */ - public function revokeConsentSessions($subject, $client = null) + public function rejectLogoutRequest($logout_challenge, $body = null) { - $this->revokeConsentSessionsWithHttpInfo($subject, $client); + list($response) = $this->rejectLogoutRequestWithHttpInfo($logout_challenge, $body); + return $response; } /** - * Operation revokeConsentSessionsWithHttpInfo + * Operation rejectLogoutRequestWithHttpInfo * - * Revokes consent sessions of a subject for a specific OAuth 2.0 Client + * Reject a logout request * * Client for Hydra * - * @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) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException + * @param string $logout_challenge (required) + * @param \HydraSDK\Model\RejectRequest $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function revokeConsentSessionsWithHttpInfo($subject, $client = null) + public function rejectLogoutRequestWithHttpInfo($logout_challenge, $body = null) { - $returnType = ''; - $request = $this->revokeConsentSessionsRequest($subject, $client); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } + // verify the required parameter 'logout_challenge' is set + if ($logout_challenge === null) { + throw new \InvalidArgumentException('Missing the required parameter $logout_challenge when calling rejectLogoutRequest'); + } + // parse inputs + $resourcePath = "/oauth2/auth/requests/logout/reject"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // query params + if ($logout_challenge !== null) { + $queryParams['logout_challenge'] = $this->apiClient->getSerializer()->toQueryValue($logout_challenge); + } + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } - return [null, $statusCode, $response->getHeaders()]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + null, + '/oauth2/auth/requests/logout/reject' + ); + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation revokeConsentSessionsAsync + * Operation revokeAuthenticationSession * - * Revokes consent sessions of a subject for a specific OAuth 2.0 Client + * Invalidates all login sessions of a certain user Invalidates a subject's authentication session * * Client for Hydra * - * @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) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $subject (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function revokeConsentSessionsAsync($subject, $client = null) + public function revokeAuthenticationSession($subject) { - return $this->revokeConsentSessionsAsyncWithHttpInfo($subject, $client) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->revokeAuthenticationSessionWithHttpInfo($subject); + return $response; } /** - * Operation revokeConsentSessionsAsyncWithHttpInfo + * Operation revokeAuthenticationSessionWithHttpInfo * - * Revokes consent sessions of a subject for a specific OAuth 2.0 Client + * Invalidates all login sessions of a certain user Invalidates a subject's authentication session * * Client for Hydra * - * @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) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function revokeConsentSessionsAsyncWithHttpInfo($subject, $client = null) - { - $returnType = ''; - $request = $this->revokeConsentSessionsRequest($subject, $client); - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'revokeConsentSessions' - * - * @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) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $subject (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - protected function revokeConsentSessionsRequest($subject, $client = null) + public function revokeAuthenticationSessionWithHttpInfo($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' - ); + if ($subject === null) { + throw new \InvalidArgumentException('Missing the required parameter $subject when calling revokeAuthenticationSession'); } - - $resourcePath = '/oauth2/auth/sessions/consent'; - $formParams = []; + // parse inputs + $resourcePath = "/oauth2/auth/sessions/login"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // query params if ($subject !== null) { - $queryParams['subject'] = ObjectSerializer::toQueryValue($subject); - } - // query params - if ($client !== null) { - $queryParams['client'] = ObjectSerializer::toQueryValue($client); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); + $queryParams['subject'] = $this->apiClient->getSerializer()->toQueryValue($subject); } // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/oauth2/auth/sessions/login' + ); + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation updateJsonWebKey + * Operation revokeConsentSessions * - * Update a JSON Web Key + * Revokes consent sessions of a subject for a specific OAuth 2.0 Client * * Client for Hydra * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKey $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\JSONWebKey + * @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) + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function updateJsonWebKey($kid, $set, $body = null) + public function revokeConsentSessions($subject, $client = null) { - list($response) = $this->updateJsonWebKeyWithHttpInfo($kid, $set, $body); + list($response) = $this->revokeConsentSessionsWithHttpInfo($subject, $client); return $response; } /** - * Operation updateJsonWebKeyWithHttpInfo + * Operation revokeConsentSessionsWithHttpInfo * - * Update a JSON Web Key + * Revokes consent sessions of a subject for a specific OAuth 2.0 Client * * Client for Hydra * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKey $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\JSONWebKey, HTTP status code, HTTP response headers (array of strings) + * @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) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateJsonWebKeyWithHttpInfo($kid, $set, $body = null) + public function revokeConsentSessionsWithHttpInfo($subject, $client = null) { - $returnType = '\Hydra\SDK\Model\JSONWebKey'; - $request = $this->updateJsonWebKeyRequest($kid, $set, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'subject' is set + if ($subject === null) { + throw new \InvalidArgumentException('Missing the required parameter $subject when calling revokeConsentSessions'); + } + // parse inputs + $resourcePath = "/oauth2/auth/sessions/consent"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // query params + if ($subject !== null) { + $queryParams['subject'] = $this->apiClient->getSerializer()->toQueryValue($subject); + } + // query params + if ($client !== null) { + $queryParams['client'] = $this->apiClient->getSerializer()->toQueryValue($client); + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'DELETE', + $queryParams, + $httpBody, + $headerParams, + null, + '/oauth2/auth/sessions/consent' + ); + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\JSONWebKey', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 400: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + case 404: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation updateJsonWebKeyAsync + * Operation updateJsonWebKey * * Update a JSON Web Key * * Client for Hydra * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKey $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $kid The kid of the desired key (required) + * @param string $set The set (required) + * @param \HydraSDK\Model\JSONWebKey $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\JSONWebKey */ - public function updateJsonWebKeyAsync($kid, $set, $body = null) + public function updateJsonWebKey($kid, $set, $body = null) { - return $this->updateJsonWebKeyAsyncWithHttpInfo($kid, $set, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->updateJsonWebKeyWithHttpInfo($kid, $set, $body); + return $response; } /** - * Operation updateJsonWebKeyAsyncWithHttpInfo + * Operation updateJsonWebKeyWithHttpInfo * * Update a JSON Web Key * * Client for Hydra * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKey $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateJsonWebKeyAsyncWithHttpInfo($kid, $set, $body = null) - { - $returnType = '\Hydra\SDK\Model\JSONWebKey'; - $request = $this->updateJsonWebKeyRequest($kid, $set, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateJsonWebKey' - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKey $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @param string $kid The kid of the desired key (required) + * @param string $set The set (required) + * @param \HydraSDK\Model\JSONWebKey $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\JSONWebKey, HTTP status code, HTTP response headers (array of strings) */ - protected function updateJsonWebKeyRequest($kid, $set, $body = null) + public function updateJsonWebKeyWithHttpInfo($kid, $set, $body = null) { // 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 updateJsonWebKey' - ); + if ($kid === null) { + throw new \InvalidArgumentException('Missing the required parameter $kid when calling updateJsonWebKey'); } // 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 updateJsonWebKey' - ); + if ($set === null) { + throw new \InvalidArgumentException('Missing the required parameter $set when calling updateJsonWebKey'); } - - $resourcePath = '/keys/{set}/{kid}'; - $formParams = []; + // parse inputs + $resourcePath = "/keys/{set}/{kid}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // path params if ($kid !== null) { $resourcePath = str_replace( - '{' . 'kid' . '}', - ObjectSerializer::toPathValue($kid), + "{" . "kid" . "}", + $this->apiClient->getSerializer()->toPathValue($kid), $resourcePath ); } // path params if ($set !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + "{" . "set" . "}", + $this->apiClient->getSerializer()->toPathValue($set), $resourcePath ); } - // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + $httpBody = $formParams; // for HTTP post (form) } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateJsonWebKeySet - * - * Update a JSON Web Key Set - * - * Client for Hydra - * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKeySet $body body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\JSONWebKeySet - */ - public function updateJsonWebKeySet($set, $body = null) - { - list($response) = $this->updateJsonWebKeySetWithHttpInfo($set, $body); - return $response; - } - - /** - * Operation updateJsonWebKeySetWithHttpInfo - * - * Update a JSON Web Key Set - * - * Client for Hydra - * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKeySet $body (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) - */ - public function updateJsonWebKeySetWithHttpInfo($set, $body = null) - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->updateJsonWebKeySetRequest($set, $body); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\JSONWebKey', + '/keys/{set}/{kid}' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\JSONWebKey', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\JSONWebKey', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation updateJsonWebKeySetAsync + * Operation updateJsonWebKeySet * * Update a JSON Web Key Set * * Client for Hydra * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKeySet $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $set The set (required) + * @param \HydraSDK\Model\JSONWebKeySet $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\JSONWebKeySet */ - public function updateJsonWebKeySetAsync($set, $body = null) + public function updateJsonWebKeySet($set, $body = null) { - return $this->updateJsonWebKeySetAsyncWithHttpInfo($set, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->updateJsonWebKeySetWithHttpInfo($set, $body); + return $response; } /** - * Operation updateJsonWebKeySetAsyncWithHttpInfo + * Operation updateJsonWebKeySetWithHttpInfo * * Update a JSON Web Key Set * * Client for Hydra * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKeySet $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $set The set (required) + * @param \HydraSDK\Model\JSONWebKeySet $body (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) */ - public function updateJsonWebKeySetAsyncWithHttpInfo($set, $body = null) - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->updateJsonWebKeySetRequest($set, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateJsonWebKeySet' - * - * @param string $set The set (required) - * @param \Hydra\SDK\Model\JSONWebKeySet $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function updateJsonWebKeySetRequest($set, $body = null) + public function updateJsonWebKeySetWithHttpInfo($set, $body = 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 updateJsonWebKeySet' - ); + if ($set === null) { + throw new \InvalidArgumentException('Missing the required parameter $set when calling updateJsonWebKeySet'); } - - $resourcePath = '/keys/{set}'; - $formParams = []; + // parse inputs + $resourcePath = "/keys/{set}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // path params if ($set !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + "{" . "set" . "}", + $this->apiClient->getSerializer()->toPathValue($set), $resourcePath ); } - // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateOAuth2Client - * - * Update an OAuth 2.0 Client - * - * Client for Hydra - * - * @param string $id id (required) - * @param \Hydra\SDK\Model\OAuth2Client $body body (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\OAuth2Client - */ - public function updateOAuth2Client($id, $body) - { - list($response) = $this->updateOAuth2ClientWithHttpInfo($id, $body); - return $response; - } - - /** - * Operation updateOAuth2ClientWithHttpInfo - * - * Update an OAuth 2.0 Client - * - * Client for Hydra - * - * @param string $id (required) - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\OAuth2Client, HTTP status code, HTTP response headers (array of strings) - */ - public function updateOAuth2ClientWithHttpInfo($id, $body) - { - $returnType = '\Hydra\SDK\Model\OAuth2Client'; - $request = $this->updateOAuth2ClientRequest($id, $body); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\JSONWebKeySet', + '/keys/{set}' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\JSONWebKeySet', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\OAuth2Client', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\JSONWebKeySet', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 403: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation updateOAuth2ClientAsync + * Operation updateOAuth2Client * * Update an OAuth 2.0 Client * * Client for Hydra * - * @param string $id (required) - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $id (required) + * @param \HydraSDK\Model\OAuth2Client $body (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\OAuth2Client */ - public function updateOAuth2ClientAsync($id, $body) + public function updateOAuth2Client($id, $body) { - return $this->updateOAuth2ClientAsyncWithHttpInfo($id, $body) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->updateOAuth2ClientWithHttpInfo($id, $body); + return $response; } /** - * Operation updateOAuth2ClientAsyncWithHttpInfo + * Operation updateOAuth2ClientWithHttpInfo * * Update an OAuth 2.0 Client * * Client for Hydra * - * @param string $id (required) - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string $id (required) + * @param \HydraSDK\Model\OAuth2Client $body (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\OAuth2Client, HTTP status code, HTTP response headers (array of strings) */ - public function updateOAuth2ClientAsyncWithHttpInfo($id, $body) - { - $returnType = '\Hydra\SDK\Model\OAuth2Client'; - $request = $this->updateOAuth2ClientRequest($id, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'updateOAuth2Client' - * - * @param string $id (required) - * @param \Hydra\SDK\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function updateOAuth2ClientRequest($id, $body) + public function updateOAuth2ClientWithHttpInfo($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 updateOAuth2Client' - ); + if ($id === null) { + 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' - ); + if ($body === null) { + throw new \InvalidArgumentException('Missing the required parameter $body when calling updateOAuth2Client'); } - - $resourcePath = '/clients/{id}'; - $formParams = []; + // parse inputs + $resourcePath = "/clients/{id}"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); // path params if ($id !== null) { $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), + "{" . "id" . "}", + $this->apiClient->getSerializer()->toPathValue($id), $resourcePath ); } - // body params $_tempBody = null; if (isset($body)) { $_tempBody = $body; } - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'PUT', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\OAuth2Client', + '/clients/{id}' + ); - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($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 [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\OAuth2Client', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\OAuth2Client', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; } - } - return $options; + throw $e; + } } } diff --git a/sdk/php/swagger/lib/Api/HealthApi.php b/sdk/php/swagger/lib/Api/HealthApi.php index 7e21ea8963..4f7969056f 100644 --- a/sdk/php/swagger/lib/Api/HealthApi.php +++ b/sdk/php/swagger/lib/Api/HealthApi.php @@ -4,7 +4,7 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -17,7 +17,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -26,65 +26,65 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Api; +namespace HydraSDK\Api; -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Hydra\SDK\ApiException; -use Hydra\SDK\Configuration; -use Hydra\SDK\HeaderSelector; -use Hydra\SDK\ObjectSerializer; +use \HydraSDK\ApiClient; +use \HydraSDK\ApiException; +use \HydraSDK\Configuration; +use \HydraSDK\ObjectSerializer; /** * HealthApi Class Doc Comment * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class HealthApi { /** - * @var ClientInterface + * API Client + * + * @var \HydraSDK\ApiClient instance of the ApiClient */ - protected $client; + protected $apiClient; /** - * @var Configuration + * Constructor + * + * @param \HydraSDK\ApiClient|null $apiClient The api client to use */ - protected $config; + public function __construct(\HydraSDK\ApiClient $apiClient = null) + { + if ($apiClient === null) { + $apiClient = new ApiClient(); + } - /** - * @var HeaderSelector - */ - protected $headerSelector; + $this->apiClient = $apiClient; + } /** - * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector + * Get API client + * + * @return \HydraSDK\ApiClient get the API client */ - public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null - ) { - $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); + public function getApiClient() + { + return $this->apiClient; } /** - * @return Configuration + * Set the API client + * + * @param \HydraSDK\ApiClient $apiClient set the API client + * + * @return HealthApi */ - public function getConfig() + public function setApiClient(\HydraSDK\ApiClient $apiClient) { - return $this->config; + $this->apiClient = $apiClient; + return $this; } /** @@ -94,10 +94,8 @@ public function getConfig() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\HealthStatus + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\HealthStatus */ public function isInstanceAlive() { @@ -112,240 +110,59 @@ public function isInstanceAlive() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\HealthStatus, HTTP status code, HTTP response headers (array of strings) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\HealthStatus, HTTP status code, HTTP response headers (array of strings) */ public function isInstanceAliveWithHttpInfo() { - $returnType = '\Hydra\SDK\Model\HealthStatus'; - $request = $this->isInstanceAliveRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // parse inputs + $resourcePath = "/health/alive"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\HealthStatus', + '/health/alive' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\HealthStatus', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\HealthStatus', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\HealthStatus', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } - /** - * Operation isInstanceAliveAsync - * - * Check alive status - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function isInstanceAliveAsync() - { - return $this->isInstanceAliveAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation isInstanceAliveAsyncWithHttpInfo - * - * Check alive status - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function isInstanceAliveAsyncWithHttpInfo() - { - $returnType = '\Hydra\SDK\Model\HealthStatus'; - $request = $this->isInstanceAliveRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'isInstanceAlive' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function isInstanceAliveRequest() - { - - $resourcePath = '/health/alive'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - /** * Operation isInstanceReady * @@ -353,10 +170,8 @@ protected function isInstanceAliveRequest() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\HealthStatus + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\HealthStatus */ public function isInstanceReady() { @@ -371,256 +186,56 @@ public function isInstanceReady() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\HealthStatus, HTTP status code, HTTP response headers (array of strings) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\HealthStatus, HTTP status code, HTTP response headers (array of strings) */ public function isInstanceReadyWithHttpInfo() { - $returnType = '\Hydra\SDK\Model\HealthStatus'; - $request = $this->isInstanceReadyRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // parse inputs + $resourcePath = "/health/ready"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\HealthStatus', + '/health/ready' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\HealthStatus', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\HealthStatus', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\HealthStatus', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 503: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\HealthNotReadyStatus', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\HealthNotReadyStatus', $e->getResponseHeaders()); $e->setResponseObject($data); break; } - throw $e; - } - } - - /** - * Operation isInstanceReadyAsync - * - * Check readiness status - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function isInstanceReadyAsync() - { - return $this->isInstanceReadyAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation isInstanceReadyAsyncWithHttpInfo - * - * Check readiness status - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function isInstanceReadyAsyncWithHttpInfo() - { - $returnType = '\Hydra\SDK\Model\HealthStatus'; - $request = $this->isInstanceReadyRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'isInstanceReady' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function isInstanceReadyRequest() - { - - $resourcePath = '/health/ready'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($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()); - } + throw $e; } - - return $options; } } diff --git a/sdk/php/swagger/lib/Api/PublicApi.php b/sdk/php/swagger/lib/Api/PublicApi.php index 529571abd0..3c714d363d 100644 --- a/sdk/php/swagger/lib/Api/PublicApi.php +++ b/sdk/php/swagger/lib/Api/PublicApi.php @@ -4,7 +4,7 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -17,7 +17,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -26,65 +26,65 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Api; +namespace HydraSDK\Api; -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Hydra\SDK\ApiException; -use Hydra\SDK\Configuration; -use Hydra\SDK\HeaderSelector; -use Hydra\SDK\ObjectSerializer; +use \HydraSDK\ApiClient; +use \HydraSDK\ApiException; +use \HydraSDK\Configuration; +use \HydraSDK\ObjectSerializer; /** * PublicApi Class Doc Comment * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class PublicApi { /** - * @var ClientInterface + * API Client + * + * @var \HydraSDK\ApiClient instance of the ApiClient */ - protected $client; + protected $apiClient; /** - * @var Configuration + * Constructor + * + * @param \HydraSDK\ApiClient|null $apiClient The api client to use */ - protected $config; + public function __construct(\HydraSDK\ApiClient $apiClient = null) + { + if ($apiClient === null) { + $apiClient = new ApiClient(); + } - /** - * @var HeaderSelector - */ - protected $headerSelector; + $this->apiClient = $apiClient; + } /** - * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector + * Get API client + * + * @return \HydraSDK\ApiClient get the API client */ - public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null - ) { - $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); + public function getApiClient() + { + return $this->apiClient; } /** - * @return Configuration + * Set the API client + * + * @param \HydraSDK\ApiClient $apiClient set the API client + * + * @return PublicApi */ - public function getConfig() + public function setApiClient(\HydraSDK\ApiClient $apiClient) { - return $this->config; + $this->apiClient = $apiClient; + return $this; } /** @@ -94,14 +94,13 @@ public function getConfig() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException + * @throws \HydraSDK\ApiException on non-2xx response * @return void */ public function disconnectUser() { - $this->disconnectUserWithHttpInfo(); + list($response) = $this->disconnectUserWithHttpInfo(); + return $response; } /** @@ -111,1532 +110,499 @@ public function disconnectUser() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException + * @throws \HydraSDK\ApiException on non-2xx response * @return array of null, HTTP status code, HTTP response headers (array of strings) */ public function disconnectUserWithHttpInfo() { - $returnType = ''; - $request = $this->disconnectUserRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); + // parse inputs + $resourcePath = "/oauth2/disconnect"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - return [null, $statusCode, $response->getHeaders()]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + null, + '/oauth2/disconnect' + ); + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { } + throw $e; } } /** - * Operation disconnectUserAsync + * Operation discoverOpenIDConfiguration * - * OpenID Connect Front-Backchannel enabled Logout + * OpenID Connect Discovery * * Client for Hydra * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\WellKnown */ - public function disconnectUserAsync() + public function discoverOpenIDConfiguration() { - return $this->disconnectUserAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->discoverOpenIDConfigurationWithHttpInfo(); + return $response; } /** - * Operation disconnectUserAsyncWithHttpInfo + * Operation discoverOpenIDConfigurationWithHttpInfo * - * OpenID Connect Front-Backchannel enabled Logout + * OpenID Connect Discovery * * Client for Hydra * - * - * @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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'disconnectUser' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\WellKnown, HTTP status code, HTTP response headers (array of strings) */ - protected function disconnectUserRequest() + public function discoverOpenIDConfigurationWithHttpInfo() { - - $resourcePath = '/oauth2/disconnect'; - $formParams = []; + // parse inputs + $resourcePath = "/.well-known/openid-configuration"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); + // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\WellKnown', + '/.well-known/openid-configuration' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\WellKnown', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\WellKnown', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation discoverOpenIDConfiguration + * Operation oauth2Token * - * OpenID Connect Discovery + * The OAuth 2.0 token endpoint * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\WellKnown + * @param string $grant_type (required) + * @param string $code (optional) + * @param string $redirect_uri (optional) + * @param string $client_id (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\Oauth2TokenResponse */ - public function discoverOpenIDConfiguration() + public function oauth2Token($grant_type, $code = null, $redirect_uri = null, $client_id = null) { - list($response) = $this->discoverOpenIDConfigurationWithHttpInfo(); + list($response) = $this->oauth2TokenWithHttpInfo($grant_type, $code, $redirect_uri, $client_id); return $response; } /** - * Operation discoverOpenIDConfigurationWithHttpInfo + * Operation oauth2TokenWithHttpInfo * - * OpenID Connect Discovery + * The OAuth 2.0 token endpoint * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\WellKnown, HTTP status code, HTTP response headers (array of strings) + * @param string $grant_type (required) + * @param string $code (optional) + * @param string $redirect_uri (optional) + * @param string $client_id (optional) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\Oauth2TokenResponse, HTTP status code, HTTP response headers (array of strings) */ - public function discoverOpenIDConfigurationWithHttpInfo() + public function oauth2TokenWithHttpInfo($grant_type, $code = null, $redirect_uri = null, $client_id = null) { - $returnType = '\Hydra\SDK\Model\WellKnown'; - $request = $this->discoverOpenIDConfigurationRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'grant_type' is set + if ($grant_type === null) { + throw new \InvalidArgumentException('Missing the required parameter $grant_type when calling oauth2Token'); + } + // parse inputs + $resourcePath = "/oauth2/token"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/x-www-form-urlencoded']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // form params + if ($grant_type !== null) { + $formParams['grant_type'] = $this->apiClient->getSerializer()->toFormValue($grant_type); + } + // form params + if ($code !== null) { + $formParams['code'] = $this->apiClient->getSerializer()->toFormValue($code); + } + // form params + if ($redirect_uri !== null) { + $formParams['redirect_uri'] = $this->apiClient->getSerializer()->toFormValue($redirect_uri); + } + // form params + if ($client_id !== null) { + $formParams['client_id'] = $this->apiClient->getSerializer()->toFormValue($client_id); + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\Oauth2TokenResponse', + '/oauth2/token' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\Oauth2TokenResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\WellKnown', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\Oauth2TokenResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation discoverOpenIDConfigurationAsync + * Operation oauthAuth * - * OpenID Connect Discovery + * The OAuth 2.0 authorize endpoint * * Client for Hydra * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function discoverOpenIDConfigurationAsync() + public function oauthAuth() { - return $this->discoverOpenIDConfigurationAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->oauthAuthWithHttpInfo(); + return $response; } /** - * Operation discoverOpenIDConfigurationAsyncWithHttpInfo + * Operation oauthAuthWithHttpInfo * - * OpenID Connect Discovery + * The OAuth 2.0 authorize endpoint * * Client for Hydra * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function discoverOpenIDConfigurationAsyncWithHttpInfo() - { - $returnType = '\Hydra\SDK\Model\WellKnown'; - $request = $this->discoverOpenIDConfigurationRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'discoverOpenIDConfiguration' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - protected function discoverOpenIDConfigurationRequest() + public function oauthAuthWithHttpInfo() { - - $resourcePath = '/.well-known/openid-configuration'; - $formParams = []; + // parse inputs + $resourcePath = "/oauth2/auth"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/x-www-form-urlencoded']); + // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + null, + '/oauth2/auth' + ); + return [null, $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 401: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + case 500: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; + } - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** - * Operation oauth2Token + * Operation revokeOAuth2Token * - * The OAuth 2.0 token endpoint + * Revoke OAuth2 tokens * * Client for Hydra * - * @param string $grant_type grant_type (required) - * @param string $code code (optional) - * @param string $redirect_uri redirect_uri (optional) - * @param string $client_id client_id (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\Oauth2TokenResponse + * @param string $token (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return void */ - public function oauth2Token($grant_type, $code = null, $redirect_uri = null, $client_id = null) + public function revokeOAuth2Token($token) { - list($response) = $this->oauth2TokenWithHttpInfo($grant_type, $code, $redirect_uri, $client_id); + list($response) = $this->revokeOAuth2TokenWithHttpInfo($token); return $response; } /** - * Operation oauth2TokenWithHttpInfo + * Operation revokeOAuth2TokenWithHttpInfo * - * The OAuth 2.0 token endpoint + * Revoke OAuth2 tokens * * Client for Hydra * - * @param string $grant_type (required) - * @param string $code (optional) - * @param string $redirect_uri (optional) - * @param string $client_id (optional) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\Oauth2TokenResponse, HTTP status code, HTTP response headers (array of strings) + * @param string $token (required) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function oauth2TokenWithHttpInfo($grant_type, $code = null, $redirect_uri = null, $client_id = null) + public function revokeOAuth2TokenWithHttpInfo($token) { - $returnType = '\Hydra\SDK\Model\Oauth2TokenResponse'; - $request = $this->oauth2TokenRequest($grant_type, $code, $redirect_uri, $client_id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // verify the required parameter 'token' is set + if ($token === null) { + throw new \InvalidArgumentException('Missing the required parameter $token when calling revokeOAuth2Token'); + } + // parse inputs + $resourcePath = "/oauth2/revoke"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/x-www-form-urlencoded']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } + // form params + if ($token !== null) { + $formParams['token'] = $this->apiClient->getSerializer()->toFormValue($token); + } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // this endpoint requires HTTP basic authentication + if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) { + $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword()); + } + // this endpoint requires OAuth (access token) + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'POST', + $queryParams, + $httpBody, + $headerParams, + null, + '/oauth2/revoke' + ); + return [null, $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\Oauth2TokenResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } + throw $e; } } /** - * Operation oauth2TokenAsync + * Operation userinfo * - * The OAuth 2.0 token endpoint + * OpenID Connect Userinfo * * Client for Hydra * - * @param string $grant_type (required) - * @param string $code (optional) - * @param string $redirect_uri (optional) - * @param string $client_id (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\UserinfoResponse */ - public function oauth2TokenAsync($grant_type, $code = null, $redirect_uri = null, $client_id = null) + public function userinfo() { - return $this->oauth2TokenAsyncWithHttpInfo($grant_type, $code, $redirect_uri, $client_id) - ->then( - function ($response) { - return $response[0]; - } - ); + list($response) = $this->userinfoWithHttpInfo(); + return $response; } /** - * Operation oauth2TokenAsyncWithHttpInfo + * Operation userinfoWithHttpInfo * - * The OAuth 2.0 token endpoint + * OpenID Connect Userinfo * * Client for Hydra * - * @param string $grant_type (required) - * @param string $code (optional) - * @param string $redirect_uri (optional) - * @param string $client_id (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\UserinfoResponse, HTTP status code, HTTP response headers (array of strings) */ - public function oauth2TokenAsyncWithHttpInfo($grant_type, $code = null, $redirect_uri = null, $client_id = null) + public function userinfoWithHttpInfo() { - $returnType = '\Hydra\SDK\Model\Oauth2TokenResponse'; - $request = $this->oauth2TokenRequest($grant_type, $code, $redirect_uri, $client_id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'oauth2Token' - * - * @param string $grant_type (required) - * @param string $code (optional) - * @param string $redirect_uri (optional) - * @param string $client_id (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function oauth2TokenRequest($grant_type, $code = null, $redirect_uri = null, $client_id = null) - { - // verify the required parameter 'grant_type' is set - if ($grant_type === null || (is_array($grant_type) && count($grant_type) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $grant_type when calling oauth2Token' - ); - } - - $resourcePath = '/oauth2/token'; - $formParams = []; - $queryParams = []; - $headerParams = []; + // parse inputs + $resourcePath = "/userinfo"; $httpBody = ''; - $multipart = false; - - - - // form params - if ($grant_type !== null) { - $formParams['grant_type'] = ObjectSerializer::toFormValue($grant_type); - } - // form params - if ($code !== null) { - $formParams['code'] = ObjectSerializer::toFormValue($code); - } - // form params - if ($redirect_uri !== null) { - $formParams['redirect_uri'] = ObjectSerializer::toFormValue($redirect_uri); - } - // form params - if ($client_id !== null) { - $formParams['client_id'] = ObjectSerializer::toFormValue($client_id); - } - // body params - $_tempBody = null; - - 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 (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - // this endpoint requires HTTP basic authentication - if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { - $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\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation oauthAuth - * - * The OAuth 2.0 authorize endpoint - * - * Client for Hydra - * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function oauthAuth() - { - $this->oauthAuthWithHttpInfo(); - } - - /** - * Operation oauthAuthWithHttpInfo - * - * The OAuth 2.0 authorize endpoint - * - * Client for Hydra - * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function oauthAuthWithHttpInfo() - { - $returnType = ''; - $request = $this->oauthAuthRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation oauthAuthAsync - * - * The OAuth 2.0 authorize endpoint - * - * Client for Hydra - * - * - * @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 - * - * Client for Hydra - * - * - * @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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'oauthAuth' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function oauthAuthRequest() - { - - $resourcePath = '/oauth2/auth'; - $formParams = []; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - 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 (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation revokeOAuth2Token - * - * Revoke OAuth2 tokens - * - * Client for Hydra - * - * @param string $token token (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function revokeOAuth2Token($token) - { - $this->revokeOAuth2TokenWithHttpInfo($token); - } - - /** - * Operation revokeOAuth2TokenWithHttpInfo - * - * Revoke OAuth2 tokens - * - * Client for Hydra - * - * @param string $token (required) - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function revokeOAuth2TokenWithHttpInfo($token) - { - $returnType = ''; - $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()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation revokeOAuth2TokenAsync - * - * Revoke OAuth2 tokens - * - * Client for Hydra - * - * @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 - * - * Client for Hydra - * - * @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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'revokeOAuth2Token' - * - * @param string $token (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected 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); + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } - // body params - $_tempBody = null; + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); - 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 (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - // this endpoint requires HTTP basic authentication - if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + $httpBody = $formParams; // for HTTP post (form) } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) { + $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken(); } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation userinfo - * - * OpenID Connect Userinfo - * - * Client for Hydra - * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\UserinfoResponse - */ - public function userinfo() - { - list($response) = $this->userinfoWithHttpInfo(); - return $response; - } - - /** - * Operation userinfoWithHttpInfo - * - * OpenID Connect Userinfo - * - * Client for Hydra - * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\UserinfoResponse, HTTP status code, HTTP response headers (array of strings) - */ - public function userinfoWithHttpInfo() - { - $returnType = '\Hydra\SDK\Model\UserinfoResponse'; - $request = $this->userinfoRequest(); - + // make the API Call try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\UserinfoResponse', + '/userinfo' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\UserinfoResponse', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\UserinfoResponse', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\UserinfoResponse', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } - throw $e; - } - } - - /** - * Operation userinfoAsync - * - * OpenID Connect Userinfo - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function userinfoAsync() - { - return $this->userinfoAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation userinfoAsyncWithHttpInfo - * - * OpenID Connect Userinfo - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function userinfoAsyncWithHttpInfo() - { - $returnType = '\Hydra\SDK\Model\UserinfoResponse'; - $request = $this->userinfoRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'userinfo' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function userinfoRequest() - { - - $resourcePath = '/userinfo'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($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(); + throw $e; } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); } /** @@ -1646,10 +612,8 @@ protected function userinfoRequest() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\JSONWebKeySet + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\JSONWebKeySet */ public function wellKnown() { @@ -1664,256 +628,56 @@ public function wellKnown() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\JSONWebKeySet, HTTP status code, HTTP response headers (array of strings) */ public function wellKnownWithHttpInfo() { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->wellKnownRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } + // parse inputs + $resourcePath = "/.well-known/jwks.json"; + $httpBody = ''; + $queryParams = []; + $headerParams = []; + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; + } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']); - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + // for model (json/xml) + if (isset($_tempBody)) { + $httpBody = $_tempBody; // $_tempBody is the method argument, if present + } elseif (count($formParams) > 0) { + $httpBody = $formParams; // for HTTP post (form) + } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\JSONWebKeySet', + '/.well-known/jwks.json' + ); + return [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\JSONWebKeySet', $httpHeader), $statusCode, $httpHeader]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\JSONWebKeySet', $e->getResponseHeaders()); $e->setResponseObject($data); break; case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\GenericError', - $e->getResponseHeaders() - ); + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\GenericError', $e->getResponseHeaders()); $e->setResponseObject($data); break; } - throw $e; - } - } - - /** - * Operation wellKnownAsync - * - * JSON Web Keys Discovery - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function wellKnownAsync() - { - return $this->wellKnownAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation wellKnownAsyncWithHttpInfo - * - * JSON Web Keys Discovery - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function wellKnownAsyncWithHttpInfo() - { - $returnType = '\Hydra\SDK\Model\JSONWebKeySet'; - $request = $this->wellKnownRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'wellKnown' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function wellKnownRequest() - { - - $resourcePath = '/.well-known/jwks.json'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($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()); - } + throw $e; } - - return $options; } } diff --git a/sdk/php/swagger/lib/Api/VersionApi.php b/sdk/php/swagger/lib/Api/VersionApi.php index 052e63c062..6e28933b03 100644 --- a/sdk/php/swagger/lib/Api/VersionApi.php +++ b/sdk/php/swagger/lib/Api/VersionApi.php @@ -4,7 +4,7 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -17,7 +17,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -26,65 +26,65 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Api; +namespace HydraSDK\Api; -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; -use GuzzleHttp\Psr7\Request; -use GuzzleHttp\RequestOptions; -use Hydra\SDK\ApiException; -use Hydra\SDK\Configuration; -use Hydra\SDK\HeaderSelector; -use Hydra\SDK\ObjectSerializer; +use \HydraSDK\ApiClient; +use \HydraSDK\ApiException; +use \HydraSDK\Configuration; +use \HydraSDK\ObjectSerializer; /** * VersionApi Class Doc Comment * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ class VersionApi { /** - * @var ClientInterface + * API Client + * + * @var \HydraSDK\ApiClient instance of the ApiClient */ - protected $client; + protected $apiClient; /** - * @var Configuration + * Constructor + * + * @param \HydraSDK\ApiClient|null $apiClient The api client to use */ - protected $config; + public function __construct(\HydraSDK\ApiClient $apiClient = null) + { + if ($apiClient === null) { + $apiClient = new ApiClient(); + } - /** - * @var HeaderSelector - */ - protected $headerSelector; + $this->apiClient = $apiClient; + } /** - * @param ClientInterface $client - * @param Configuration $config - * @param HeaderSelector $selector + * Get API client + * + * @return \HydraSDK\ApiClient get the API client */ - public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null - ) { - $this->client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); + public function getApiClient() + { + return $this->apiClient; } /** - * @return Configuration + * Set the API client + * + * @param \HydraSDK\ApiClient $apiClient set the API client + * + * @return VersionApi */ - public function getConfig() + public function setApiClient(\HydraSDK\ApiClient $apiClient) { - return $this->config; + $this->apiClient = $apiClient; + return $this; } /** @@ -94,10 +94,8 @@ public function getConfig() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Hydra\SDK\Model\Version + * @throws \HydraSDK\ApiException on non-2xx response + * @return \HydraSDK\Model\Version */ public function getVersion() { @@ -112,248 +110,52 @@ public function getVersion() * * Client for Hydra * - * - * @throws \Hydra\SDK\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Hydra\SDK\Model\Version, HTTP status code, HTTP response headers (array of strings) + * @throws \HydraSDK\ApiException on non-2xx response + * @return array of \HydraSDK\Model\Version, HTTP status code, HTTP response headers (array of strings) */ public function getVersionWithHttpInfo() { - $returnType = '\Hydra\SDK\Model\Version'; - $request = $this->getVersionRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Hydra\SDK\Model\Version', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getVersionAsync - * - * Get service version - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVersionAsync() - { - return $this->getVersionAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getVersionAsyncWithHttpInfo - * - * Get service version - * - * Client for Hydra - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getVersionAsyncWithHttpInfo() - { - $returnType = '\Hydra\SDK\Model\Version'; - $request = $this->getVersionRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = $responseBody->getContents(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - 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(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getVersion' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function getVersionRequest() - { - - $resourcePath = '/version'; - $formParams = []; + // parse inputs + $resourcePath = "/version"; + $httpBody = ''; $queryParams = []; $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] - ); + $formParams = []; + $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); + if (!is_null($_header_accept)) { + $headerParams['Accept'] = $_header_accept; } + $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/x-www-form-urlencoded']); + // for model (json/xml) if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - $httpBody = $_tempBody; - // \stdClass has no __toString(), so we should encode it manually - if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } + $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // 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\build_query($formParams); - } + $httpBody = $formParams; // for HTTP post (form) } + // make the API Call + try { + list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( + $resourcePath, + 'GET', + $queryParams, + $httpBody, + $headerParams, + '\HydraSDK\Model\Version', + '/version' + ); - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($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 [$this->apiClient->getSerializer()->deserialize($response, '\HydraSDK\Model\Version', $httpHeader), $statusCode, $httpHeader]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HydraSDK\Model\Version', $e->getResponseHeaders()); + $e->setResponseObject($data); + break; } - } - return $options; + throw $e; + } } } diff --git a/sdk/php/swagger/lib/ApiClient.php b/sdk/php/swagger/lib/ApiClient.php new file mode 100644 index 0000000000..99eda49d0f --- /dev/null +++ b/sdk/php/swagger/lib/ApiClient.php @@ -0,0 +1,371 @@ +config = $config; + $this->serializer = new ObjectSerializer(); + } + + /** + * Get the config + * + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Get the serializer + * + * @return ObjectSerializer + */ + public function getSerializer() + { + return $this->serializer; + } + + /** + * Get API key (with prefix if set) + * + * @param string $apiKeyIdentifier name of apikey + * + * @return string API key with the prefix + */ + public function getApiKeyWithPrefix($apiKeyIdentifier) + { + $prefix = $this->config->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->config->getApiKey($apiKeyIdentifier); + + if (!isset($apiKey)) { + return null; + } + + if (isset($prefix)) { + $keyWithPrefix = $prefix." ".$apiKey; + } else { + $keyWithPrefix = $apiKey; + } + + return $keyWithPrefix; + } + + /** + * Make the HTTP call (Sync) + * + * @param string $resourcePath path to method endpoint + * @param string $method method to call + * @param array $queryParams parameters to be place in query URL + * @param array $postData parameters to be placed in POST body + * @param array $headerParams parameters to be place in request header + * @param string $responseType expected response type of the endpoint + * @param string $endpointPath path to method endpoint before expanding parameters + * + * @throws \HydraSDK\ApiException on a non 2xx response + * @return mixed + */ + public function callApi($resourcePath, $method, $queryParams, $postData, $headerParams, $responseType = null, $endpointPath = null) + { + $headers = []; + + // construct the http header + $headerParams = array_merge( + (array)$this->config->getDefaultHeaders(), + (array)$headerParams + ); + + foreach ($headerParams as $key => $val) { + $headers[] = "$key: $val"; + } + + // form data + if ($postData and in_array('Content-Type: application/x-www-form-urlencoded', $headers, true)) { + $postData = http_build_query($postData); + } elseif ((is_object($postData) or is_array($postData)) and !in_array('Content-Type: multipart/form-data', $headers, true)) { // json model + $postData = json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($postData)); + } + + $url = $this->config->getHost() . $resourcePath; + + $curl = curl_init(); + // set timeout, if needed + if ($this->config->getCurlTimeout() !== 0) { + curl_setopt($curl, CURLOPT_TIMEOUT, $this->config->getCurlTimeout()); + } + // set connect timeout, if needed + if ($this->config->getCurlConnectTimeout() != 0) { + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->config->getCurlConnectTimeout()); + } + + // return the result on success, rather than just true + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); + + // disable SSL verification, if needed + if ($this->config->getSSLVerification() === false) { + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); + } + + if ($this->config->getCurlProxyHost()) { + curl_setopt($curl, CURLOPT_PROXY, $this->config->getCurlProxyHost()); + } + + if ($this->config->getCurlProxyPort()) { + curl_setopt($curl, CURLOPT_PROXYPORT, $this->config->getCurlProxyPort()); + } + + if ($this->config->getCurlProxyType()) { + curl_setopt($curl, CURLOPT_PROXYTYPE, $this->config->getCurlProxyType()); + } + + if ($this->config->getCurlProxyUser()) { + curl_setopt($curl, CURLOPT_PROXYUSERPWD, $this->config->getCurlProxyUser() . ':' .$this->config->getCurlProxyPassword()); + } + + if (!empty($queryParams)) { + $url = ($url . '?' . http_build_query($queryParams)); + } + + if ($this->config->getAllowEncoding()) { + curl_setopt($curl, CURLOPT_ENCODING, ''); + } + + if ($method === self::$POST) { + curl_setopt($curl, CURLOPT_POST, true); + curl_setopt($curl, CURLOPT_POSTFIELDS, $postData); + } elseif ($method === self::$HEAD) { + curl_setopt($curl, CURLOPT_NOBODY, true); + } elseif ($method === self::$OPTIONS) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "OPTIONS"); + curl_setopt($curl, CURLOPT_POSTFIELDS, $postData); + } elseif ($method === self::$PATCH) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PATCH"); + curl_setopt($curl, CURLOPT_POSTFIELDS, $postData); + } elseif ($method === self::$PUT) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT"); + curl_setopt($curl, CURLOPT_POSTFIELDS, $postData); + } elseif ($method === self::$DELETE) { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE"); + curl_setopt($curl, CURLOPT_POSTFIELDS, $postData); + } elseif ($method !== self::$GET) { + throw new ApiException('Method ' . $method . ' is not recognized.'); + } + curl_setopt($curl, CURLOPT_URL, $url); + + // Set user agent + curl_setopt($curl, CURLOPT_USERAGENT, $this->config->getUserAgent()); + + // debugging for curl + if ($this->config->getDebug()) { + error_log("[DEBUG] HTTP Request body ~BEGIN~".PHP_EOL.print_r($postData, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile()); + + curl_setopt($curl, CURLOPT_VERBOSE, 1); + curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a')); + } else { + curl_setopt($curl, CURLOPT_VERBOSE, 0); + } + + // obtain the HTTP response headers + curl_setopt($curl, CURLOPT_HEADER, 1); + + // Make the request + $response = curl_exec($curl); + $http_header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE); + $http_header = $this->httpParseHeaders(substr($response, 0, $http_header_size)); + $http_body = substr($response, $http_header_size); + $response_info = curl_getinfo($curl); + + // debug HTTP response body + if ($this->config->getDebug()) { + error_log("[DEBUG] HTTP Response body ~BEGIN~".PHP_EOL.print_r($http_body, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile()); + } + + // Handle the response + if ($response_info['http_code'] === 0) { + $curl_error_message = curl_error($curl); + + // curl_exec can sometimes fail but still return a blank message from curl_error(). + if (!empty($curl_error_message)) { + $error_message = "API call to $url failed: $curl_error_message"; + } else { + $error_message = "API call to $url failed, but for an unknown reason. " . + "This could happen if you are disconnected from the network."; + } + + $exception = new ApiException($error_message, 0, null, null); + $exception->setResponseObject($response_info); + throw $exception; + } elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299) { + // return raw body if response is a file + if ($responseType === '\SplFileObject' || $responseType === 'string') { + return [$http_body, $response_info['http_code'], $http_header]; + } + + $data = json_decode($http_body); + if (json_last_error() > 0) { // if response is a string + $data = $http_body; + } + } else { + $data = json_decode($http_body); + if (json_last_error() > 0) { // if response is a string + $data = $http_body; + } + + throw new ApiException( + "[".$response_info['http_code']."] Error connecting to the API ($url)", + $response_info['http_code'], + $http_header, + $data + ); + } + return [$data, $response_info['http_code'], $http_header]; + } + + /** + * Return the header 'Accept' based on an array of Accept provided + * + * @param string[] $accept Array of header + * + * @return string Accept (e.g. application/json) + */ + public function selectHeaderAccept($accept) + { + if (count($accept) === 0 or (count($accept) === 1 and $accept[0] === '')) { + return null; + } elseif (preg_grep("/application\/json/i", $accept)) { + return 'application/json'; + } else { + return implode(',', $accept); + } + } + + /** + * Return the content type based on an array of content-type provided + * + * @param string[] $content_type Array fo content-type + * + * @return string Content-Type (e.g. application/json) + */ + public function selectHeaderContentType($content_type) + { + if (count($content_type) === 0 or (count($content_type) === 1 and $content_type[0] === '')) { + return 'application/json'; + } elseif (preg_grep("/application\/json/i", $content_type)) { + return 'application/json'; + } else { + return implode(',', $content_type); + } + } + + /** + * Return an array of HTTP response headers + * + * @param string $raw_headers A string of raw HTTP response headers + * + * @return string[] Array of HTTP response heaers + */ + protected function httpParseHeaders($raw_headers) + { + // ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986 + $headers = []; + $key = ''; + + foreach (explode("\n", $raw_headers) as $h) { + $h = explode(':', $h, 2); + + if (isset($h[1])) { + if (!isset($headers[$h[0]])) { + $headers[$h[0]] = trim($h[1]); + } elseif (is_array($headers[$h[0]])) { + $headers[$h[0]] = array_merge($headers[$h[0]], [trim($h[1])]); + } else { + $headers[$h[0]] = array_merge([$headers[$h[0]]], [trim($h[1])]); + } + + $key = $h[0]; + } else { + if (substr($h[0], 0, 1) === "\t") { + $headers[$key] .= "\r\n\t".trim($h[0]); + } elseif (!$key) { + $headers[0] = trim($h[0]); + } + trim($h[0]); + } + } + + return $headers; + } +} diff --git a/sdk/php/swagger/lib/ApiException.php b/sdk/php/swagger/lib/ApiException.php index 84566fc127..a4dadcab2b 100644 --- a/sdk/php/swagger/lib/ApiException.php +++ b/sdk/php/swagger/lib/ApiException.php @@ -4,7 +4,7 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -17,7 +17,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -26,7 +26,7 @@ * Do not edit the class manually. */ -namespace Hydra\SDK; +namespace HydraSDK; use \Exception; @@ -34,7 +34,7 @@ * ApiException Class Doc Comment * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -51,7 +51,7 @@ class ApiException extends Exception /** * The HTTP header of the server response. * - * @var string[]|null + * @var string[] */ protected $responseHeaders; @@ -65,10 +65,10 @@ class ApiException extends Exception /** * Constructor * - * @param string $message Error message - * @param int $code HTTP status code - * @param string[]|null $responseHeaders HTTP response header - * @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string + * @param string $message Error message + * @param int $code HTTP status code + * @param string[] $responseHeaders HTTP response header + * @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string */ public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) { @@ -80,7 +80,7 @@ public function __construct($message = "", $code = 0, $responseHeaders = [], $re /** * Gets the HTTP response header * - * @return string[]|null HTTP response header + * @return string[] HTTP response headers */ public function getResponseHeaders() { diff --git a/sdk/php/swagger/lib/Configuration.php b/sdk/php/swagger/lib/Configuration.php index d47f8a2175..4b1732a73a 100644 --- a/sdk/php/swagger/lib/Configuration.php +++ b/sdk/php/swagger/lib/Configuration.php @@ -4,7 +4,7 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -17,7 +17,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -26,14 +26,14 @@ * Do not edit the class manually. */ -namespace Hydra\SDK; +namespace HydraSDK; /** * Configuration Class Doc Comment * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -76,6 +76,13 @@ class Configuration */ protected $password = ''; + /** + * The default header(s) + * + * @var array + */ + protected $defaultHeaders = []; + /** * The host * @@ -83,6 +90,20 @@ class Configuration */ protected $host = 'http://localhost'; + /** + * Timeout (second) of the HTTP request, by default set to 0, no timeout + * + * @var string + */ + protected $curlTimeout = 0; + + /** + * Timeout (second) of the HTTP connection, by default set to 0, no timeout + * + * @var string + */ + protected $curlConnectTimeout = 0; + /** * User agent of the HTTP request, set to "PHP-Swagger" by default * @@ -111,6 +132,58 @@ class Configuration */ protected $tempFolderPath; + /** + * Indicates if SSL verification should be enabled or disabled. + * + * This is useful if the host uses a self-signed SSL certificate. + * + * @var boolean True if the certificate should be validated, false otherwise. + */ + protected $sslVerification = true; + + /** + * Curl proxy host + * + * @var string + */ + protected $proxyHost; + + /** + * Curl proxy port + * + * @var integer + */ + protected $proxyPort; + + /** + * Curl proxy type, e.g. CURLPROXY_HTTP or CURLPROXY_SOCKS5 + * + * @see https://secure.php.net/manual/en/function.curl-setopt.php + * @var integer + */ + protected $proxyType; + + /** + * Curl proxy username + * + * @var string + */ + protected $proxyUser; + + /** + * Curl proxy password + * + * @var string + */ + protected $proxyPassword; + + /** + * Allow Curl encoding header + * + * @var bool + */ + protected $allowEncoding = false; + /** * Constructor */ @@ -240,6 +313,48 @@ public function getPassword() return $this->password; } + /** + * Adds a default header + * + * @param string $headerName header name (e.g. Token) + * @param string $headerValue header value (e.g. 1z8wp3) + * + * @throws \InvalidArgumentException + * @return $this + */ + public function addDefaultHeader($headerName, $headerValue) + { + if (!is_string($headerName)) { + throw new \InvalidArgumentException('Header name must be a string.'); + } + + $this->defaultHeaders[$headerName] = $headerValue; + return $this; + } + + /** + * Gets the default header + * + * @return array An array of default header(s) + */ + public function getDefaultHeaders() + { + return $this->defaultHeaders; + } + + /** + * Deletes a default header + * + * @param string $headerName the header to delete + * + * @return $this + */ + public function deleteDefaultHeader($headerName) + { + unset($this->defaultHeaders[$headerName]); + return $this; + } + /** * Sets the host * @@ -291,6 +406,199 @@ public function getUserAgent() return $this->userAgent; } + /** + * Sets the HTTP timeout value + * + * @param integer $seconds Number of seconds before timing out [set to 0 for no timeout] + * + * @throws \InvalidArgumentException + * @return $this + */ + public function setCurlTimeout($seconds) + { + if (!is_numeric($seconds) || $seconds < 0) { + throw new \InvalidArgumentException('Timeout value must be numeric and a non-negative number.'); + } + + $this->curlTimeout = $seconds; + return $this; + } + + /** + * Gets the HTTP timeout value + * + * @return string HTTP timeout value + */ + public function getCurlTimeout() + { + return $this->curlTimeout; + } + + /** + * Sets the HTTP connect timeout value + * + * @param integer $seconds Number of seconds before connection times out [set to 0 for no timeout] + * + * @throws \InvalidArgumentException + * @return $this + */ + public function setCurlConnectTimeout($seconds) + { + if (!is_numeric($seconds) || $seconds < 0) { + throw new \InvalidArgumentException('Connect timeout value must be numeric and a non-negative number.'); + } + + $this->curlConnectTimeout = $seconds; + return $this; + } + + /** + * Set whether to accept encoding + * @param bool $allowEncoding + * + * @return $this + */ + public function setAllowEncoding($allowEncoding) + { + $this->allowEncoding = $allowEncoding; + return $this; + } + + /** + * Gets the HTTP connect timeout value + * + * @return string HTTP connect timeout value + */ + public function getCurlConnectTimeout() + { + return $this->curlConnectTimeout; + } + + /** + * Get whether to allow encoding + * + * @return bool + */ + public function getAllowEncoding() + { + return $this->allowEncoding; + } + + /** + * Sets the HTTP Proxy Host + * + * @param string $proxyHost HTTP Proxy URL + * + * @return $this + */ + public function setCurlProxyHost($proxyHost) + { + $this->proxyHost = $proxyHost; + return $this; + } + + /** + * Gets the HTTP Proxy Host + * + * @return string + */ + public function getCurlProxyHost() + { + return $this->proxyHost; + } + + /** + * Sets the HTTP Proxy Port + * + * @param integer $proxyPort HTTP Proxy Port + * + * @return $this + */ + public function setCurlProxyPort($proxyPort) + { + $this->proxyPort = $proxyPort; + return $this; + } + + /** + * Gets the HTTP Proxy Port + * + * @return integer + */ + public function getCurlProxyPort() + { + return $this->proxyPort; + } + + /** + * Sets the HTTP Proxy Type + * + * @param integer $proxyType HTTP Proxy Type + * + * @return $this + */ + public function setCurlProxyType($proxyType) + { + $this->proxyType = $proxyType; + return $this; + } + + /** + * Gets the HTTP Proxy Type + * + * @return integer + */ + public function getCurlProxyType() + { + return $this->proxyType; + } + + /** + * Sets the HTTP Proxy User + * + * @param string $proxyUser HTTP Proxy User + * + * @return $this + */ + public function setCurlProxyUser($proxyUser) + { + $this->proxyUser = $proxyUser; + return $this; + } + + /** + * Gets the HTTP Proxy User + * + * @return string + */ + public function getCurlProxyUser() + { + return $this->proxyUser; + } + + /** + * Sets the HTTP Proxy Password + * + * @param string $proxyPassword HTTP Proxy Password + * + * @return $this + */ + public function setCurlProxyPassword($proxyPassword) + { + $this->proxyPassword = $proxyPassword; + return $this; + } + + /** + * Gets the HTTP Proxy Password + * + * @return string + */ + public function getCurlProxyPassword() + { + return $this->proxyPassword; + } + /** * Sets debug flag * @@ -360,6 +668,29 @@ public function getTempFolderPath() return $this->tempFolderPath; } + /** + * Sets if SSL verification should be enabled or disabled + * + * @param boolean $sslVerification True if the certificate should be validated, false otherwise + * + * @return $this + */ + public function setSSLVerification($sslVerification) + { + $this->sslVerification = $sslVerification; + return $this; + } + + /** + * Gets if SSL verification should be enabled or disabled + * + * @return boolean True if the certificate should be validated, false otherwise + */ + public function getSSLVerification() + { + return $this->sslVerification; + } + /** * Gets the default configuration instance * @@ -393,7 +724,7 @@ public static function setDefaultConfiguration(Configuration $config) */ public static function toDebugReport() { - $report = 'PHP SDK (Hydra\SDK) Debug Report:' . PHP_EOL; + $report = 'PHP SDK (HydraSDK) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' OpenAPI Spec Version: latest' . PHP_EOL; @@ -401,29 +732,4 @@ public static function toDebugReport() return $report; } - - /** - * Get API key (with prefix if set) - * - * @param string $apiKeyIdentifier name of apikey - * - * @return string API key with the prefix - */ - public function getApiKeyWithPrefix($apiKeyIdentifier) - { - $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); - $apiKey = $this->getApiKey($apiKeyIdentifier); - - if ($apiKey === null) { - return null; - } - - if ($prefix === null) { - $keyWithPrefix = $apiKey; - } else { - $keyWithPrefix = $prefix . ' ' . $apiKey; - } - - return $keyWithPrefix; - } } diff --git a/sdk/php/swagger/lib/HeaderSelector.php b/sdk/php/swagger/lib/HeaderSelector.php deleted file mode 100644 index 2b8882f2ca..0000000000 --- a/sdk/php/swagger/lib/HeaderSelector.php +++ /dev/null @@ -1,109 +0,0 @@ -selectAcceptHeader($accept); - if ($accept !== null) { - $headers['Accept'] = $accept; - } - - $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); - return $headers; - } - - /** - * @param string[] $accept - * @return array - */ - public function selectHeadersForMultipart($accept) - { - $headers = $this->selectHeaders($accept, []); - - unset($headers['Content-Type']); - return $headers; - } - - /** - * Return the header 'Accept' based on an array of Accept provided - * - * @param string[] $accept Array of header - * - * @return string Accept (e.g. application/json) - */ - private function selectAcceptHeader($accept) - { - if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) { - return null; - } elseif (preg_grep("/application\/json/i", $accept)) { - return 'application/json'; - } else { - return implode(',', $accept); - } - } - - /** - * Return the content type based on an array of content-type provided - * - * @param string[] $contentType Array fo content-type - * - * @return string Content-Type (e.g. application/json) - */ - private function selectContentTypeHeader($contentType) - { - if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) { - return 'application/json'; - } elseif (preg_grep("/application\/json/i", $contentType)) { - return 'application/json'; - } else { - return implode(',', $contentType); - } - } -} diff --git a/sdk/php/swagger/lib/Model/AcceptConsentRequest.php b/sdk/php/swagger/lib/Model/AcceptConsentRequest.php index 454a267983..4354446446 100644 --- a/sdk/php/swagger/lib/Model/AcceptConsentRequest.php +++ b/sdk/php/swagger/lib/Model/AcceptConsentRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * AcceptConsentRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class AcceptConsentRequest implements ModelInterface, ArrayAccess +class AcceptConsentRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'acceptConsentRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -61,12 +58,11 @@ class AcceptConsentRequest implements ModelInterface, ArrayAccess 'grant_scope' => 'string[]', 'remember' => 'bool', 'remember_for' => 'int', - 'session' => '\Hydra\SDK\Model\ConsentRequestSession' + 'session' => '\HydraSDK\Model\ConsentRequestSession' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -77,30 +73,18 @@ class AcceptConsentRequest implements ModelInterface, ArrayAccess 'session' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -111,9 +95,9 @@ public static function swaggerFormats() 'session' => 'session' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -124,9 +108,9 @@ public static function swaggerFormats() 'session' => 'setSession' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -137,63 +121,34 @@ public static function swaggerFormats() 'session' => 'getSession' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -205,32 +160,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets grant_access_token_audience - * * @return string[] */ public function getGrantAccessTokenAudience() @@ -240,9 +195,7 @@ public function getGrantAccessTokenAudience() /** * Sets grant_access_token_audience - * * @param string[] $grant_access_token_audience GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`. - * * @return $this */ public function setGrantAccessTokenAudience($grant_access_token_audience) @@ -254,7 +207,6 @@ public function setGrantAccessTokenAudience($grant_access_token_audience) /** * Gets grant_scope - * * @return string[] */ public function getGrantScope() @@ -264,9 +216,7 @@ public function getGrantScope() /** * Sets grant_scope - * * @param string[] $grant_scope GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`. - * * @return $this */ public function setGrantScope($grant_scope) @@ -278,7 +228,6 @@ public function setGrantScope($grant_scope) /** * Gets remember - * * @return bool */ public function getRemember() @@ -288,9 +237,7 @@ public function getRemember() /** * Sets remember - * * @param bool $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. - * * @return $this */ public function setRemember($remember) @@ -302,7 +249,6 @@ public function setRemember($remember) /** * Gets remember_for - * * @return int */ public function getRememberFor() @@ -312,9 +258,7 @@ public function getRememberFor() /** * Sets remember_for - * * @param int $remember_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 $this */ public function setRememberFor($remember_for) @@ -326,8 +270,7 @@ public function setRememberFor($remember_for) /** * Gets session - * - * @return \Hydra\SDK\Model\ConsentRequestSession + * @return \HydraSDK\Model\ConsentRequestSession */ public function getSession() { @@ -336,9 +279,7 @@ public function getSession() /** * Sets session - * - * @param \Hydra\SDK\Model\ConsentRequestSession $session session - * + * @param \HydraSDK\Model\ConsentRequestSession $session * @return $this */ public function setSession($session) @@ -349,9 +290,7 @@ public function setSession($session) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -361,9 +300,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -373,10 +310,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -390,9 +325,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -402,19 +335,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/AcceptLoginRequest.php b/sdk/php/swagger/lib/Model/AcceptLoginRequest.php index 2f2901e871..f3ddaaa51d 100644 --- a/sdk/php/swagger/lib/Model/AcceptLoginRequest.php +++ b/sdk/php/swagger/lib/Model/AcceptLoginRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * AcceptLoginRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class AcceptLoginRequest implements ModelInterface, ArrayAccess +class AcceptLoginRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'acceptLoginRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -67,7 +64,6 @@ class AcceptLoginRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -79,30 +75,18 @@ class AcceptLoginRequest implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -114,9 +98,9 @@ public static function swaggerFormats() 'subject' => 'subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -128,9 +112,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -142,63 +126,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -211,35 +166,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['subject'] === null) { - $invalidProperties[] = "'subject' can't be null"; + $invalid_properties[] = "'subject' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['subject'] === null) { + return false; + } + return true; } /** * Gets acr - * * @return string */ public function getAcr() @@ -249,9 +207,7 @@ public function getAcr() /** * Sets acr - * * @param string $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. - * * @return $this */ public function setAcr($acr) @@ -263,7 +219,6 @@ public function setAcr($acr) /** * Gets context - * * @return map[string,object] */ public function getContext() @@ -273,9 +228,7 @@ public function getContext() /** * Sets context - * * @param map[string,object] $context Context is an optional object which can hold arbitrary data. The data will be made available when fetching the consent request under the \"context\" field. This is useful in scenarios where login and consent endpoints share data. - * * @return $this */ public function setContext($context) @@ -287,7 +240,6 @@ public function setContext($context) /** * Gets force_subject_identifier - * * @return string */ public function getForceSubjectIdentifier() @@ -297,9 +249,7 @@ public function getForceSubjectIdentifier() /** * Sets force_subject_identifier - * * @param string $force_subject_identifier ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. - * * @return $this */ public function setForceSubjectIdentifier($force_subject_identifier) @@ -311,7 +261,6 @@ public function setForceSubjectIdentifier($force_subject_identifier) /** * Gets remember - * * @return bool */ public function getRemember() @@ -321,9 +270,7 @@ public function getRemember() /** * Sets remember - * * @param bool $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. - * * @return $this */ public function setRemember($remember) @@ -335,7 +282,6 @@ public function setRemember($remember) /** * Gets remember_for - * * @return int */ public function getRememberFor() @@ -345,9 +291,7 @@ public function getRememberFor() /** * Sets remember_for - * * @param int $remember_for RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. - * * @return $this */ public function setRememberFor($remember_for) @@ -359,7 +303,6 @@ public function setRememberFor($remember_for) /** * Gets subject - * * @return string */ public function getSubject() @@ -369,9 +312,7 @@ public function getSubject() /** * Sets subject - * * @param string $subject Subject is the user ID of the end-user that authenticated. - * * @return $this */ public function setSubject($subject) @@ -382,9 +323,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -394,9 +333,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -406,10 +343,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -423,9 +358,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -435,19 +368,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/AuthenticationRequest.php b/sdk/php/swagger/lib/Model/AuthenticationRequest.php index 9e45afe75d..685f62828a 100644 --- a/sdk/php/swagger/lib/Model/AuthenticationRequest.php +++ b/sdk/php/swagger/lib/Model/AuthenticationRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,39 +27,36 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * AuthenticationRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class AuthenticationRequest implements ModelInterface, ArrayAccess +class AuthenticationRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'AuthenticationRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ 'challenge' => 'string', - 'client' => '\Hydra\SDK\Model\Client', - 'oidc_context' => '\Hydra\SDK\Model\OpenIDConnectContext', + 'client' => '\HydraSDK\Model\Client', + 'oidc_context' => '\HydraSDK\Model\OpenIDConnectContext', 'request_url' => 'string', 'requested_access_token_audience' => 'string[]', 'requested_scope' => 'string[]', @@ -70,7 +67,6 @@ class AuthenticationRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -85,30 +81,18 @@ class AuthenticationRequest implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -123,9 +107,9 @@ public static function swaggerFormats() 'subject' => 'subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -140,9 +124,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -157,63 +141,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -229,32 +184,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets challenge - * * @return string */ public function getChallenge() @@ -264,9 +219,7 @@ public function getChallenge() /** * Sets challenge - * * @param string $challenge Challenge is the identifier (\"authentication challenge\") of the consent authentication request. It is used to identify the session. - * * @return $this */ public function setChallenge($challenge) @@ -278,8 +231,7 @@ public function setChallenge($challenge) /** * Gets client - * - * @return \Hydra\SDK\Model\Client + * @return \HydraSDK\Model\Client */ public function getClient() { @@ -288,9 +240,7 @@ public function getClient() /** * Sets client - * - * @param \Hydra\SDK\Model\Client $client client - * + * @param \HydraSDK\Model\Client $client * @return $this */ public function setClient($client) @@ -302,8 +252,7 @@ public function setClient($client) /** * Gets oidc_context - * - * @return \Hydra\SDK\Model\OpenIDConnectContext + * @return \HydraSDK\Model\OpenIDConnectContext */ public function getOidcContext() { @@ -312,9 +261,7 @@ public function getOidcContext() /** * Sets oidc_context - * - * @param \Hydra\SDK\Model\OpenIDConnectContext $oidc_context oidc_context - * + * @param \HydraSDK\Model\OpenIDConnectContext $oidc_context * @return $this */ public function setOidcContext($oidc_context) @@ -326,7 +273,6 @@ public function setOidcContext($oidc_context) /** * Gets request_url - * * @return string */ public function getRequestUrl() @@ -336,9 +282,7 @@ public function getRequestUrl() /** * Sets request_url - * * @param string $request_url RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. - * * @return $this */ public function setRequestUrl($request_url) @@ -350,7 +294,6 @@ public function setRequestUrl($request_url) /** * Gets requested_access_token_audience - * * @return string[] */ public function getRequestedAccessTokenAudience() @@ -360,9 +303,7 @@ public function getRequestedAccessTokenAudience() /** * Sets requested_access_token_audience - * * @param string[] $requested_access_token_audience RequestedScope contains the access token audience as requested by the OAuth 2.0 Client. - * * @return $this */ public function setRequestedAccessTokenAudience($requested_access_token_audience) @@ -374,7 +315,6 @@ public function setRequestedAccessTokenAudience($requested_access_token_audience /** * Gets requested_scope - * * @return string[] */ public function getRequestedScope() @@ -384,9 +324,7 @@ public function getRequestedScope() /** * Sets requested_scope - * * @param string[] $requested_scope RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client. - * * @return $this */ public function setRequestedScope($requested_scope) @@ -398,7 +336,6 @@ public function setRequestedScope($requested_scope) /** * Gets session_id - * * @return string */ public function getSessionId() @@ -408,9 +345,7 @@ public function getSessionId() /** * Sets session_id - * * @param string $session_id SessionID is the authentication session ID. It is set if the browser had a valid authentication session at ORY Hydra during the login flow. It can be used to associate consecutive login requests by a certain user. - * * @return $this */ public function setSessionId($session_id) @@ -422,7 +357,6 @@ public function setSessionId($session_id) /** * Gets skip - * * @return bool */ public function getSkip() @@ -432,9 +366,7 @@ public function getSkip() /** * Sets skip - * * @param bool $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. - * * @return $this */ public function setSkip($skip) @@ -446,7 +378,6 @@ public function setSkip($skip) /** * Gets subject - * * @return string */ public function getSubject() @@ -456,9 +387,7 @@ public function getSubject() /** * Sets subject - * * @param string $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. - * * @return $this */ public function setSubject($subject) @@ -469,9 +398,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -481,9 +408,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -493,10 +418,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -510,9 +433,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -522,19 +443,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/AuthenticationSession.php b/sdk/php/swagger/lib/Model/AuthenticationSession.php index e5792fbe1e..208608a85f 100644 --- a/sdk/php/swagger/lib/Model/AuthenticationSession.php +++ b/sdk/php/swagger/lib/Model/AuthenticationSession.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * AuthenticationSession Class Doc Comment * - * @category Class - * @description AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @description AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession AuthenticationSession authentication session + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class AuthenticationSession implements ModelInterface, ArrayAccess +class AuthenticationSession implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'AuthenticationSession'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -65,7 +62,6 @@ class AuthenticationSession implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -74,30 +70,18 @@ class AuthenticationSession implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -106,9 +90,9 @@ public static function swaggerFormats() 'subject' => 'Subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -117,9 +101,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -128,63 +112,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -194,32 +149,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets authenticated_at - * * @return \DateTime */ public function getAuthenticatedAt() @@ -229,9 +184,7 @@ public function getAuthenticatedAt() /** * Sets authenticated_at - * - * @param \DateTime $authenticated_at authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time - * + * @param \DateTime $authenticated_at authenticated at Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time Format: date-time * @return $this */ public function setAuthenticatedAt($authenticated_at) @@ -243,7 +196,6 @@ public function setAuthenticatedAt($authenticated_at) /** * Gets id - * * @return string */ public function getId() @@ -253,9 +205,7 @@ public function getId() /** * Sets id - * * @param string $id ID - * * @return $this */ public function setId($id) @@ -267,7 +217,6 @@ public function setId($id) /** * Gets subject - * * @return string */ public function getSubject() @@ -277,9 +226,7 @@ public function getSubject() /** * Sets subject - * * @param string $subject subject - * * @return $this */ public function setSubject($subject) @@ -290,9 +237,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -302,9 +247,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -314,10 +257,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -331,9 +272,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -343,19 +282,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/Client.php b/sdk/php/swagger/lib/Model/Client.php index 581ac94df8..eb067192ba 100644 --- a/sdk/php/swagger/lib/Model/Client.php +++ b/sdk/php/swagger/lib/Model/Client.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * Client Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class Client implements ModelInterface, ArrayAccess +class Client implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'Client'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -71,7 +68,7 @@ class Client implements ModelInterface, ArrayAccess 'frontchannel_logout_session_required' => 'bool', 'frontchannel_logout_uri' => 'string', 'grant_types' => 'string[]', - 'jwks' => '\Hydra\SDK\Model\SwaggerJSONWebKeySet', + 'jwks' => '\HydraSDK\Model\SwaggerJSONWebKeySet', 'jwks_uri' => 'string', 'logo_uri' => 'string', 'owner' => 'string', @@ -92,7 +89,6 @@ class Client implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -129,30 +125,18 @@ class Client implements ModelInterface, ArrayAccess 'userinfo_signed_response_alg' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -189,9 +173,9 @@ public static function swaggerFormats() 'userinfo_signed_response_alg' => 'userinfo_signed_response_alg' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -228,9 +212,9 @@ public static function swaggerFormats() 'userinfo_signed_response_alg' => 'setUserinfoSignedResponseAlg' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -267,63 +251,34 @@ public static function swaggerFormats() 'userinfo_signed_response_alg' => 'getUserinfoSignedResponseAlg' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -361,36 +316,39 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; 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?)+/."; + $invalid_properties[] = "invalid value for 'scope', must be conform to the pattern /([a-zA-Z0-9\\.\\*]+\\s?)+/."; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if (!preg_match("/([a-zA-Z0-9\\.\\*]+\\s?)+/", $this->container['scope'])) { + return false; + } + return true; } /** * Gets allowed_cors_origins - * * @return string[] */ public function getAllowedCorsOrigins() @@ -400,9 +358,7 @@ public function getAllowedCorsOrigins() /** * Sets allowed_cors_origins - * * @param string[] $allowed_cors_origins AllowedCORSOrigins are one or more URLs (scheme://host[:port]) which are allowed to make CORS requests to the /oauth/token endpoint. If this array is empty, the sever's CORS origin configuration (`CORS_ALLOWED_ORIGINS`) will be used instead. If this array is set, the allowed origins are appended to the server's CORS origin configuration. Be aware that environment variable `CORS_ENABLED` MUST be set to `true` for this to work. - * * @return $this */ public function setAllowedCorsOrigins($allowed_cors_origins) @@ -414,7 +370,6 @@ public function setAllowedCorsOrigins($allowed_cors_origins) /** * Gets audience - * * @return string[] */ public function getAudience() @@ -424,9 +379,7 @@ public function getAudience() /** * Sets audience - * * @param string[] $audience Audience is a whitelist defining the audiences this client is allowed to request tokens for. An audience limits the applicability of an OAuth 2.0 Access Token to, for example, certain API endpoints. The value is a list of URLs. URLs MUST NOT contain whitespaces. - * * @return $this */ public function setAudience($audience) @@ -438,7 +391,6 @@ public function setAudience($audience) /** * Gets backchannel_logout_session_required - * * @return bool */ public function getBackchannelLogoutSessionRequired() @@ -448,9 +400,7 @@ public function getBackchannelLogoutSessionRequired() /** * Sets backchannel_logout_session_required - * * @param bool $backchannel_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 $this */ public function setBackchannelLogoutSessionRequired($backchannel_logout_session_required) @@ -462,7 +412,6 @@ public function setBackchannelLogoutSessionRequired($backchannel_logout_session_ /** * Gets backchannel_logout_uri - * * @return string */ public function getBackchannelLogoutUri() @@ -472,9 +421,7 @@ public function getBackchannelLogoutUri() /** * Sets backchannel_logout_uri - * * @param string $backchannel_logout_uri RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. - * * @return $this */ public function setBackchannelLogoutUri($backchannel_logout_uri) @@ -486,7 +433,6 @@ public function setBackchannelLogoutUri($backchannel_logout_uri) /** * Gets client_id - * * @return string */ public function getClientId() @@ -496,9 +442,7 @@ public function getClientId() /** * Sets client_id - * * @param string $client_id ClientID is the id for this client. - * * @return $this */ public function setClientId($client_id) @@ -510,7 +454,6 @@ public function setClientId($client_id) /** * Gets client_name - * * @return string */ public function getClientName() @@ -520,9 +463,7 @@ public function getClientName() /** * Sets client_name - * * @param string $client_name Name is the human-readable string name of the client to be presented to the end-user during authorization. - * * @return $this */ public function setClientName($client_name) @@ -534,7 +475,6 @@ public function setClientName($client_name) /** * Gets client_secret - * * @return string */ public function getClientSecret() @@ -544,9 +484,7 @@ public function getClientSecret() /** * Sets client_secret - * * @param string $client_secret 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. - * * @return $this */ public function setClientSecret($client_secret) @@ -558,7 +496,6 @@ public function setClientSecret($client_secret) /** * Gets client_secret_expires_at - * * @return int */ public function getClientSecretExpiresAt() @@ -568,9 +505,7 @@ public function getClientSecretExpiresAt() /** * Sets client_secret_expires_at - * * @param int $client_secret_expires_at 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. - * * @return $this */ public function setClientSecretExpiresAt($client_secret_expires_at) @@ -582,7 +517,6 @@ public function setClientSecretExpiresAt($client_secret_expires_at) /** * Gets client_uri - * * @return string */ public function getClientUri() @@ -592,9 +526,7 @@ public function getClientUri() /** * Sets client_uri - * * @param string $client_uri 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. - * * @return $this */ public function setClientUri($client_uri) @@ -606,7 +538,6 @@ public function setClientUri($client_uri) /** * Gets contacts - * * @return string[] */ public function getContacts() @@ -616,9 +547,7 @@ public function getContacts() /** * Sets contacts - * * @param string[] $contacts Contacts is a array of strings representing ways to contact people responsible for this client, typically email addresses. - * * @return $this */ public function setContacts($contacts) @@ -630,7 +559,6 @@ public function setContacts($contacts) /** * Gets created_at - * * @return \DateTime */ public function getCreatedAt() @@ -640,9 +568,7 @@ public function getCreatedAt() /** * Sets created_at - * * @param \DateTime $created_at CreatedAt returns the timestamp of the client's creation. Format: date-time - * * @return $this */ public function setCreatedAt($created_at) @@ -654,7 +580,6 @@ public function setCreatedAt($created_at) /** * Gets frontchannel_logout_session_required - * * @return bool */ public function getFrontchannelLogoutSessionRequired() @@ -664,9 +589,7 @@ public function getFrontchannelLogoutSessionRequired() /** * Sets frontchannel_logout_session_required - * * @param bool $frontchannel_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 $this */ public function setFrontchannelLogoutSessionRequired($frontchannel_logout_session_required) @@ -678,7 +601,6 @@ public function setFrontchannelLogoutSessionRequired($frontchannel_logout_sessio /** * Gets frontchannel_logout_uri - * * @return string */ public function getFrontchannelLogoutUri() @@ -688,9 +610,7 @@ public function getFrontchannelLogoutUri() /** * Sets frontchannel_logout_uri - * * @param string $frontchannel_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 $this */ public function setFrontchannelLogoutUri($frontchannel_logout_uri) @@ -702,7 +622,6 @@ public function setFrontchannelLogoutUri($frontchannel_logout_uri) /** * Gets grant_types - * * @return string[] */ public function getGrantTypes() @@ -712,9 +631,7 @@ public function getGrantTypes() /** * Sets grant_types - * * @param string[] $grant_types GrantTypes is an array of grant types the client is allowed to use. - * * @return $this */ public function setGrantTypes($grant_types) @@ -726,8 +643,7 @@ public function setGrantTypes($grant_types) /** * Gets jwks - * - * @return \Hydra\SDK\Model\SwaggerJSONWebKeySet + * @return \HydraSDK\Model\SwaggerJSONWebKeySet */ public function getJwks() { @@ -736,9 +652,7 @@ public function getJwks() /** * Sets jwks - * - * @param \Hydra\SDK\Model\SwaggerJSONWebKeySet $jwks jwks - * + * @param \HydraSDK\Model\SwaggerJSONWebKeySet $jwks * @return $this */ public function setJwks($jwks) @@ -750,7 +664,6 @@ public function setJwks($jwks) /** * Gets jwks_uri - * * @return string */ public function getJwksUri() @@ -760,9 +673,7 @@ public function getJwksUri() /** * Sets jwks_uri - * * @param string $jwks_uri 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 $this */ public function setJwksUri($jwks_uri) @@ -774,7 +685,6 @@ public function setJwksUri($jwks_uri) /** * Gets logo_uri - * * @return string */ public function getLogoUri() @@ -784,9 +694,7 @@ public function getLogoUri() /** * Sets logo_uri - * * @param string $logo_uri LogoURI is an URL string that references a logo for the client. - * * @return $this */ public function setLogoUri($logo_uri) @@ -798,7 +706,6 @@ public function setLogoUri($logo_uri) /** * Gets owner - * * @return string */ public function getOwner() @@ -808,9 +715,7 @@ public function getOwner() /** * Sets owner - * * @param string $owner Owner is a string identifying the owner of the OAuth 2.0 Client. - * * @return $this */ public function setOwner($owner) @@ -822,7 +727,6 @@ public function setOwner($owner) /** * Gets policy_uri - * * @return string */ public function getPolicyUri() @@ -832,9 +736,7 @@ public function getPolicyUri() /** * Sets policy_uri - * * @param string $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 $this */ public function setPolicyUri($policy_uri) @@ -846,7 +748,6 @@ public function setPolicyUri($policy_uri) /** * Gets post_logout_redirect_uris - * * @return string[] */ public function getPostLogoutRedirectUris() @@ -856,9 +757,7 @@ public function getPostLogoutRedirectUris() /** * Sets post_logout_redirect_uris - * * @param string[] $post_logout_redirect_uris Array of URLs supplied by the RP to which it MAY request that the End-User's User Agent be redirected using the post_logout_redirect_uri parameter after a logout has been performed. - * * @return $this */ public function setPostLogoutRedirectUris($post_logout_redirect_uris) @@ -870,7 +769,6 @@ public function setPostLogoutRedirectUris($post_logout_redirect_uris) /** * Gets redirect_uris - * * @return string[] */ public function getRedirectUris() @@ -880,9 +778,7 @@ public function getRedirectUris() /** * Sets redirect_uris - * * @param string[] $redirect_uris RedirectURIs is an array of allowed redirect urls for the client, for example http://mydomain/oauth/callback . - * * @return $this */ public function setRedirectUris($redirect_uris) @@ -894,7 +790,6 @@ public function setRedirectUris($redirect_uris) /** * Gets request_object_signing_alg - * * @return string */ public function getRequestObjectSigningAlg() @@ -904,9 +799,7 @@ public function getRequestObjectSigningAlg() /** * Sets request_object_signing_alg - * * @param string $request_object_signing_alg 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 $this */ public function setRequestObjectSigningAlg($request_object_signing_alg) @@ -918,7 +811,6 @@ public function setRequestObjectSigningAlg($request_object_signing_alg) /** * Gets request_uris - * * @return string[] */ public function getRequestUris() @@ -928,9 +820,7 @@ public function getRequestUris() /** * Sets request_uris - * * @param string[] $request_uris Array of request_uri values that are pre-registered by the RP for use at the OP. Servers MAY cache the contents of the files referenced by these URIs and not retrieve them at the time they are used in a request. OPs can require that request_uri values used be pre-registered with the require_request_uri_registration discovery parameter. - * * @return $this */ public function setRequestUris($request_uris) @@ -942,7 +832,6 @@ public function setRequestUris($request_uris) /** * Gets response_types - * * @return string[] */ public function getResponseTypes() @@ -952,9 +841,7 @@ public function getResponseTypes() /** * Sets response_types - * * @param string[] $response_types ResponseTypes is an array of the OAuth 2.0 response type strings that the client can use at the authorization endpoint. - * * @return $this */ public function setResponseTypes($response_types) @@ -966,7 +853,6 @@ public function setResponseTypes($response_types) /** * Gets scope - * * @return string */ public function getScope() @@ -976,9 +862,7 @@ public function getScope() /** * Sets scope - * * @param 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. - * * @return $this */ public function setScope($scope) @@ -995,7 +879,6 @@ public function setScope($scope) /** * Gets sector_identifier_uri - * * @return string */ public function getSectorIdentifierUri() @@ -1005,9 +888,7 @@ public function getSectorIdentifierUri() /** * Sets sector_identifier_uri - * * @param string $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 $this */ public function setSectorIdentifierUri($sector_identifier_uri) @@ -1019,7 +900,6 @@ public function setSectorIdentifierUri($sector_identifier_uri) /** * Gets subject_type - * * @return string */ public function getSubjectType() @@ -1029,9 +909,7 @@ public function getSubjectType() /** * Sets subject_type - * * @param string $subject_type 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`. - * * @return $this */ public function setSubjectType($subject_type) @@ -1043,7 +921,6 @@ public function setSubjectType($subject_type) /** * Gets token_endpoint_auth_method - * * @return string */ public function getTokenEndpointAuthMethod() @@ -1053,9 +930,7 @@ public function getTokenEndpointAuthMethod() /** * Sets token_endpoint_auth_method - * * @param string $token_endpoint_auth_method Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. - * * @return $this */ public function setTokenEndpointAuthMethod($token_endpoint_auth_method) @@ -1067,7 +942,6 @@ public function setTokenEndpointAuthMethod($token_endpoint_auth_method) /** * Gets tos_uri - * * @return string */ public function getTosUri() @@ -1077,9 +951,7 @@ public function getTosUri() /** * Sets tos_uri - * * @param string $tos_uri 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. - * * @return $this */ public function setTosUri($tos_uri) @@ -1091,7 +963,6 @@ public function setTosUri($tos_uri) /** * Gets updated_at - * * @return \DateTime */ public function getUpdatedAt() @@ -1101,9 +972,7 @@ public function getUpdatedAt() /** * Sets updated_at - * * @param \DateTime $updated_at UpdatedAt returns the timestamp of the last update. Format: date-time - * * @return $this */ public function setUpdatedAt($updated_at) @@ -1115,7 +984,6 @@ public function setUpdatedAt($updated_at) /** * Gets userinfo_signed_response_alg - * * @return string */ public function getUserinfoSignedResponseAlg() @@ -1125,9 +993,7 @@ public function getUserinfoSignedResponseAlg() /** * Sets userinfo_signed_response_alg - * * @param string $userinfo_signed_response_alg 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 $this */ public function setUserinfoSignedResponseAlg($userinfo_signed_response_alg) @@ -1138,9 +1004,7 @@ public function setUserinfoSignedResponseAlg($userinfo_signed_response_alg) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -1150,9 +1014,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -1162,10 +1024,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -1179,9 +1039,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -1191,19 +1049,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/CompletedRequest.php b/sdk/php/swagger/lib/Model/CompletedRequest.php index 566fdbbb95..a886a94b21 100644 --- a/sdk/php/swagger/lib/Model/CompletedRequest.php +++ b/sdk/php/swagger/lib/Model/CompletedRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * CompletedRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class CompletedRequest implements ModelInterface, ArrayAccess +class CompletedRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'completedRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +59,76 @@ class CompletedRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'redirect_to' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'redirect_to' => 'redirect_to' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'redirect_to' => 'setRedirectTo' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'redirect_to' => '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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,32 +136,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets redirect_to - * * @return string */ public function getRedirectTo() @@ -216,9 +171,7 @@ public function getRedirectTo() /** * Sets redirect_to - * * @param string $redirect_to RedirectURL is the URL which you should redirect the user to once the authentication process is completed. - * * @return $this */ public function setRedirectTo($redirect_to) @@ -229,9 +182,7 @@ public function setRedirectTo($redirect_to) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +192,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +202,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +217,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +227,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/ConsentRequest.php b/sdk/php/swagger/lib/Model/ConsentRequest.php index 3d7f77641d..25c2ad59e6 100644 --- a/sdk/php/swagger/lib/Model/ConsentRequest.php +++ b/sdk/php/swagger/lib/Model/ConsentRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,43 +27,40 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * ConsentRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class ConsentRequest implements ModelInterface, ArrayAccess +class ConsentRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'consentRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ 'acr' => 'string', 'challenge' => 'string', - 'client' => '\Hydra\SDK\Model\OAuth2Client', + 'client' => '\HydraSDK\Model\OAuth2Client', 'context' => 'map[string,object]', 'login_challenge' => 'string', 'login_session_id' => 'string', - 'oidc_context' => '\Hydra\SDK\Model\OpenIDConnectContext', + 'oidc_context' => '\HydraSDK\Model\OpenIDConnectContext', 'request_url' => 'string', 'requested_access_token_audience' => 'string[]', 'requested_scope' => 'string[]', @@ -73,7 +70,6 @@ class ConsentRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -91,30 +87,18 @@ class ConsentRequest implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -132,9 +116,9 @@ public static function swaggerFormats() 'subject' => 'subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -152,9 +136,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -172,63 +156,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -247,32 +202,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets acr - * * @return string */ public function getAcr() @@ -282,9 +237,7 @@ public function getAcr() /** * Sets acr - * * @param string $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. - * * @return $this */ public function setAcr($acr) @@ -296,7 +249,6 @@ public function setAcr($acr) /** * Gets challenge - * * @return string */ public function getChallenge() @@ -306,9 +258,7 @@ public function getChallenge() /** * Sets challenge - * * @param string $challenge Challenge is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. - * * @return $this */ public function setChallenge($challenge) @@ -320,8 +270,7 @@ public function setChallenge($challenge) /** * Gets client - * - * @return \Hydra\SDK\Model\OAuth2Client + * @return \HydraSDK\Model\OAuth2Client */ public function getClient() { @@ -330,9 +279,7 @@ public function getClient() /** * Sets client - * - * @param \Hydra\SDK\Model\OAuth2Client $client client - * + * @param \HydraSDK\Model\OAuth2Client $client * @return $this */ public function setClient($client) @@ -344,7 +291,6 @@ public function setClient($client) /** * Gets context - * * @return map[string,object] */ public function getContext() @@ -354,9 +300,7 @@ public function getContext() /** * Sets context - * * @param map[string,object] $context Context contains arbitrary information set by the login endpoint or is empty if not set. - * * @return $this */ public function setContext($context) @@ -368,7 +312,6 @@ public function setContext($context) /** * Gets login_challenge - * * @return string */ public function getLoginChallenge() @@ -378,9 +321,7 @@ public function getLoginChallenge() /** * Sets login_challenge - * * @param string $login_challenge LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app. - * * @return $this */ public function setLoginChallenge($login_challenge) @@ -392,7 +333,6 @@ public function setLoginChallenge($login_challenge) /** * Gets login_session_id - * * @return string */ public function getLoginSessionId() @@ -402,9 +342,7 @@ public function getLoginSessionId() /** * Sets login_session_id - * * @param string $login_session_id LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. - * * @return $this */ public function setLoginSessionId($login_session_id) @@ -416,8 +354,7 @@ public function setLoginSessionId($login_session_id) /** * Gets oidc_context - * - * @return \Hydra\SDK\Model\OpenIDConnectContext + * @return \HydraSDK\Model\OpenIDConnectContext */ public function getOidcContext() { @@ -426,9 +363,7 @@ public function getOidcContext() /** * Sets oidc_context - * - * @param \Hydra\SDK\Model\OpenIDConnectContext $oidc_context oidc_context - * + * @param \HydraSDK\Model\OpenIDConnectContext $oidc_context * @return $this */ public function setOidcContext($oidc_context) @@ -440,7 +375,6 @@ public function setOidcContext($oidc_context) /** * Gets request_url - * * @return string */ public function getRequestUrl() @@ -450,9 +384,7 @@ public function getRequestUrl() /** * Sets request_url - * * @param string $request_url RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. - * * @return $this */ public function setRequestUrl($request_url) @@ -464,7 +396,6 @@ public function setRequestUrl($request_url) /** * Gets requested_access_token_audience - * * @return string[] */ public function getRequestedAccessTokenAudience() @@ -474,9 +405,7 @@ public function getRequestedAccessTokenAudience() /** * Sets requested_access_token_audience - * * @param string[] $requested_access_token_audience RequestedScope contains the access token audience as requested by the OAuth 2.0 Client. - * * @return $this */ public function setRequestedAccessTokenAudience($requested_access_token_audience) @@ -488,7 +417,6 @@ public function setRequestedAccessTokenAudience($requested_access_token_audience /** * Gets requested_scope - * * @return string[] */ public function getRequestedScope() @@ -498,9 +426,7 @@ public function getRequestedScope() /** * Sets requested_scope - * * @param string[] $requested_scope RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client. - * * @return $this */ public function setRequestedScope($requested_scope) @@ -512,7 +438,6 @@ public function setRequestedScope($requested_scope) /** * Gets skip - * * @return bool */ public function getSkip() @@ -522,9 +447,7 @@ public function getSkip() /** * Sets skip - * * @param bool $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. - * * @return $this */ public function setSkip($skip) @@ -536,7 +459,6 @@ public function setSkip($skip) /** * Gets subject - * * @return string */ public function getSubject() @@ -546,9 +468,7 @@ public function getSubject() /** * Sets subject - * * @param string $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. - * * @return $this */ public function setSubject($subject) @@ -559,9 +479,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -571,9 +489,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -583,10 +499,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -600,9 +514,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -612,19 +524,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/ConsentRequestSession.php b/sdk/php/swagger/lib/Model/ConsentRequestSession.php index e8ecacf4e7..71dc351e52 100644 --- a/sdk/php/swagger/lib/Model/ConsentRequestSession.php +++ b/sdk/php/swagger/lib/Model/ConsentRequestSession.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * ConsentRequestSession Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class ConsentRequestSession implements ModelInterface, ArrayAccess +class ConsentRequestSession implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'consentRequestSession'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,7 +60,6 @@ class ConsentRequestSession implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -71,30 +67,18 @@ class ConsentRequestSession implements ModelInterface, ArrayAccess 'id_token' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -102,9 +86,9 @@ public static function swaggerFormats() 'id_token' => 'id_token' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -112,9 +96,9 @@ public static function swaggerFormats() 'id_token' => 'setIdToken' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -122,63 +106,34 @@ public static function swaggerFormats() 'id_token' => 'getIdToken' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -187,32 +142,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets access_token - * * @return map[string,object] */ public function getAccessToken() @@ -222,9 +177,7 @@ public function getAccessToken() /** * Sets access_token - * * @param map[string,object] $access_token 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 $this */ public function setAccessToken($access_token) @@ -236,7 +189,6 @@ public function setAccessToken($access_token) /** * Gets id_token - * * @return map[string,object] */ public function getIdToken() @@ -246,9 +198,7 @@ public function getIdToken() /** * Sets id_token - * * @param map[string,object] $id_token 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 $this */ public function setIdToken($id_token) @@ -259,9 +209,7 @@ public function setIdToken($id_token) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -271,9 +219,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -283,10 +229,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -300,9 +244,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -312,19 +254,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/ConsentRequestSessionData.php b/sdk/php/swagger/lib/Model/ConsentRequestSessionData.php index efc95462da..35e4872be5 100644 --- a/sdk/php/swagger/lib/Model/ConsentRequestSessionData.php +++ b/sdk/php/swagger/lib/Model/ConsentRequestSessionData.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * ConsentRequestSessionData Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class ConsentRequestSessionData implements ModelInterface, ArrayAccess +class ConsentRequestSessionData implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'ConsentRequestSessionData'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,7 +60,6 @@ class ConsentRequestSessionData implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -71,30 +67,18 @@ class ConsentRequestSessionData implements ModelInterface, ArrayAccess 'id_token' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -102,9 +86,9 @@ public static function swaggerFormats() 'id_token' => 'id_token' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -112,9 +96,9 @@ public static function swaggerFormats() 'id_token' => 'setIdToken' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -122,63 +106,34 @@ public static function swaggerFormats() 'id_token' => 'getIdToken' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -187,32 +142,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets access_token - * * @return map[string,object] */ public function getAccessToken() @@ -222,9 +177,7 @@ public function getAccessToken() /** * Sets access_token - * * @param map[string,object] $access_token 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 $this */ public function setAccessToken($access_token) @@ -236,7 +189,6 @@ public function setAccessToken($access_token) /** * Gets id_token - * * @return map[string,object] */ public function getIdToken() @@ -246,9 +198,7 @@ public function getIdToken() /** * Sets id_token - * * @param map[string,object] $id_token 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 $this */ public function setIdToken($id_token) @@ -259,9 +209,7 @@ public function setIdToken($id_token) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -271,9 +219,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -283,10 +229,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -300,9 +244,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -312,19 +254,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/CreateRequest.php b/sdk/php/swagger/lib/Model/CreateRequest.php index 18bb07551f..10cd7b5c4d 100644 --- a/sdk/php/swagger/lib/Model/CreateRequest.php +++ b/sdk/php/swagger/lib/Model/CreateRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * CreateRequest Class Doc Comment * - * @category Class + * @category Class * @description CreateRequest create request - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class CreateRequest implements ModelInterface, ArrayAccess +class CreateRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'createRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -65,7 +62,6 @@ class CreateRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -74,30 +70,18 @@ class CreateRequest implements ModelInterface, ArrayAccess 'use' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -106,9 +90,9 @@ public static function swaggerFormats() 'use' => 'use' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -117,9 +101,9 @@ public static function swaggerFormats() 'use' => 'setUse' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -128,63 +112,34 @@ public static function swaggerFormats() 'use' => 'getUse' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -194,41 +149,50 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['alg'] === null) { - $invalidProperties[] = "'alg' can't be null"; + $invalid_properties[] = "'alg' can't be null"; } if ($this->container['kid'] === null) { - $invalidProperties[] = "'kid' can't be null"; + $invalid_properties[] = "'kid' can't be null"; } if ($this->container['use'] === null) { - $invalidProperties[] = "'use' can't be null"; + $invalid_properties[] = "'use' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['alg'] === null) { + return false; + } + if ($this->container['kid'] === null) { + return false; + } + if ($this->container['use'] === null) { + return false; + } + return true; } /** * Gets alg - * * @return string */ public function getAlg() @@ -238,9 +202,7 @@ public function getAlg() /** * Sets alg - * * @param string $alg The algorithm to be used for creating the key. Supports \"RS256\", \"ES512\", \"HS512\", and \"HS256\" - * * @return $this */ public function setAlg($alg) @@ -252,7 +214,6 @@ public function setAlg($alg) /** * Gets kid - * * @return string */ public function getKid() @@ -262,9 +223,7 @@ public function getKid() /** * Sets kid - * * @param string $kid The kid of the key to be created - * * @return $this */ public function setKid($kid) @@ -276,7 +235,6 @@ public function setKid($kid) /** * Gets use - * * @return string */ public function getUse() @@ -286,9 +244,7 @@ public function getUse() /** * Sets use - * * @param string $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 $this */ public function setUse($use) @@ -299,9 +255,7 @@ public function setUse($use) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -311,9 +265,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -323,10 +275,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -340,9 +290,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -352,19 +300,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/EmptyResponse.php b/sdk/php/swagger/lib/Model/EmptyResponse.php index c6ed9f21c1..81e3b52bd7 100644 --- a/sdk/php/swagger/lib/Model/EmptyResponse.php +++ b/sdk/php/swagger/lib/Model/EmptyResponse.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * EmptyResponse Class Doc Comment * - * @category Class - * @description Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @description EmptyResponse Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class EmptyResponse implements ModelInterface, ArrayAccess +class EmptyResponse implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'emptyResponse'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,151 +60,108 @@ class EmptyResponse implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -217,9 +171,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -229,10 +181,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -246,9 +196,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -258,19 +206,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/FlushInactiveOAuth2TokensRequest.php b/sdk/php/swagger/lib/Model/FlushInactiveOAuth2TokensRequest.php index ae86e3593f..585bdda499 100644 --- a/sdk/php/swagger/lib/Model/FlushInactiveOAuth2TokensRequest.php +++ b/sdk/php/swagger/lib/Model/FlushInactiveOAuth2TokensRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * FlushInactiveOAuth2TokensRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class FlushInactiveOAuth2TokensRequest implements ModelInterface, ArrayAccess +class FlushInactiveOAuth2TokensRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'flushInactiveOAuth2TokensRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +59,76 @@ class FlushInactiveOAuth2TokensRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'not_after' => 'date-time' ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'not_after' => 'notAfter' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'not_after' => 'setNotAfter' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'not_after' => 'getNotAfter' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,32 +136,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets not_after - * * @return \DateTime */ public function getNotAfter() @@ -216,9 +171,7 @@ public function getNotAfter() /** * Sets not_after - * * @param \DateTime $not_after 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 $this */ public function setNotAfter($not_after) @@ -229,9 +182,7 @@ public function setNotAfter($not_after) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +192,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +202,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +217,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +227,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/GenericError.php b/sdk/php/swagger/lib/Model/GenericError.php index 84dee4180c..4a7e66d3a7 100644 --- a/sdk/php/swagger/lib/Model/GenericError.php +++ b/sdk/php/swagger/lib/Model/GenericError.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * GenericError Class Doc Comment * - * @category Class + * @category Class * @description Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class GenericError implements ModelInterface, ArrayAccess +class GenericError implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'genericError'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -66,7 +63,6 @@ class GenericError implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -76,30 +72,18 @@ class GenericError implements ModelInterface, ArrayAccess 'error_hint' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -109,9 +93,9 @@ public static function swaggerFormats() 'error_hint' => 'error_hint' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -121,9 +105,9 @@ public static function swaggerFormats() 'error_hint' => 'setErrorHint' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -133,63 +117,34 @@ public static function swaggerFormats() 'error_hint' => 'getErrorHint' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -200,35 +155,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['error'] === null) { - $invalidProperties[] = "'error' can't be null"; + $invalid_properties[] = "'error' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['error'] === null) { + return false; + } + return true; } /** * Gets error - * * @return string */ public function getError() @@ -238,9 +196,7 @@ public function getError() /** * Sets error - * * @param string $error Name is the error name. - * * @return $this */ public function setError($error) @@ -252,7 +208,6 @@ public function setError($error) /** * Gets error_code - * * @return int */ public function getErrorCode() @@ -262,9 +217,7 @@ public function getErrorCode() /** * Sets error_code - * * @param int $error_code Code represents the error status code (404, 403, 401, ...). - * * @return $this */ public function setErrorCode($error_code) @@ -276,7 +229,6 @@ public function setErrorCode($error_code) /** * Gets error_debug - * * @return string */ public function getErrorDebug() @@ -286,9 +238,7 @@ public function getErrorDebug() /** * Sets error_debug - * * @param string $error_debug Debug contains debug information. This is usually not available and has to be enabled. - * * @return $this */ public function setErrorDebug($error_debug) @@ -300,7 +250,6 @@ public function setErrorDebug($error_debug) /** * Gets error_hint - * * @return string */ public function getErrorHint() @@ -310,9 +259,7 @@ public function getErrorHint() /** * Sets error_hint - * * @param string $error_hint Hint contains further information on the nature of the error. - * * @return $this */ public function setErrorHint($error_hint) @@ -323,9 +270,7 @@ public function setErrorHint($error_hint) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -335,9 +280,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -347,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -364,9 +305,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -376,19 +315,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/HandledAuthenticationRequest.php b/sdk/php/swagger/lib/Model/HandledAuthenticationRequest.php index c401c10420..fef5f227b6 100644 --- a/sdk/php/swagger/lib/Model/HandledAuthenticationRequest.php +++ b/sdk/php/swagger/lib/Model/HandledAuthenticationRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * HandledAuthenticationRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class HandledAuthenticationRequest implements ModelInterface, ArrayAccess +class HandledAuthenticationRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'HandledAuthenticationRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -66,7 +63,6 @@ class HandledAuthenticationRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -77,30 +73,18 @@ class HandledAuthenticationRequest implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -111,9 +95,9 @@ public static function swaggerFormats() 'subject' => 'subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -124,9 +108,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -137,63 +121,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -205,35 +160,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['subject'] === null) { - $invalidProperties[] = "'subject' can't be null"; + $invalid_properties[] = "'subject' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['subject'] === null) { + return false; + } + return true; } /** * Gets acr - * * @return string */ public function getAcr() @@ -243,9 +201,7 @@ public function getAcr() /** * Sets acr - * * @param string $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. - * * @return $this */ public function setAcr($acr) @@ -257,7 +213,6 @@ public function setAcr($acr) /** * Gets force_subject_identifier - * * @return string */ public function getForceSubjectIdentifier() @@ -267,9 +222,7 @@ public function getForceSubjectIdentifier() /** * Sets force_subject_identifier - * * @param string $force_subject_identifier ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. - * * @return $this */ public function setForceSubjectIdentifier($force_subject_identifier) @@ -281,7 +234,6 @@ public function setForceSubjectIdentifier($force_subject_identifier) /** * Gets remember - * * @return bool */ public function getRemember() @@ -291,9 +243,7 @@ public function getRemember() /** * Sets remember - * * @param bool $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. - * * @return $this */ public function setRemember($remember) @@ -305,7 +255,6 @@ public function setRemember($remember) /** * Gets remember_for - * * @return int */ public function getRememberFor() @@ -315,9 +264,7 @@ public function getRememberFor() /** * Sets remember_for - * * @param int $remember_for RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. - * * @return $this */ public function setRememberFor($remember_for) @@ -329,7 +276,6 @@ public function setRememberFor($remember_for) /** * Gets subject - * * @return string */ public function getSubject() @@ -339,9 +285,7 @@ public function getSubject() /** * Sets subject - * * @param string $subject Subject is the user ID of the end-user that authenticated. - * * @return $this */ public function setSubject($subject) @@ -352,9 +296,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -364,9 +306,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -376,10 +316,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -393,9 +331,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -405,19 +341,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/HandledConsentRequest.php b/sdk/php/swagger/lib/Model/HandledConsentRequest.php index d366bdaa5f..2c395dbee0 100644 --- a/sdk/php/swagger/lib/Model/HandledConsentRequest.php +++ b/sdk/php/swagger/lib/Model/HandledConsentRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * HandledConsentRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class HandledConsentRequest implements ModelInterface, ArrayAccess +class HandledConsentRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'HandledConsentRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -61,12 +58,11 @@ class HandledConsentRequest implements ModelInterface, ArrayAccess 'grant_scope' => 'string[]', 'remember' => 'bool', 'remember_for' => 'int', - 'session' => '\Hydra\SDK\Model\ConsentRequestSessionData' + 'session' => '\HydraSDK\Model\ConsentRequestSessionData' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -77,30 +73,18 @@ class HandledConsentRequest implements ModelInterface, ArrayAccess 'session' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -111,9 +95,9 @@ public static function swaggerFormats() 'session' => 'session' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -124,9 +108,9 @@ public static function swaggerFormats() 'session' => 'setSession' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -137,63 +121,34 @@ public static function swaggerFormats() 'session' => 'getSession' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -205,32 +160,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets grant_access_token_audience - * * @return string[] */ public function getGrantAccessTokenAudience() @@ -240,9 +195,7 @@ public function getGrantAccessTokenAudience() /** * Sets grant_access_token_audience - * * @param string[] $grant_access_token_audience GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`. - * * @return $this */ public function setGrantAccessTokenAudience($grant_access_token_audience) @@ -254,7 +207,6 @@ public function setGrantAccessTokenAudience($grant_access_token_audience) /** * Gets grant_scope - * * @return string[] */ public function getGrantScope() @@ -264,9 +216,7 @@ public function getGrantScope() /** * Sets grant_scope - * * @param string[] $grant_scope GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`. - * * @return $this */ public function setGrantScope($grant_scope) @@ -278,7 +228,6 @@ public function setGrantScope($grant_scope) /** * Gets remember - * * @return bool */ public function getRemember() @@ -288,9 +237,7 @@ public function getRemember() /** * Sets remember - * * @param bool $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. - * * @return $this */ public function setRemember($remember) @@ -302,7 +249,6 @@ public function setRemember($remember) /** * Gets remember_for - * * @return int */ public function getRememberFor() @@ -312,9 +258,7 @@ public function getRememberFor() /** * Sets remember_for - * * @param int $remember_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 $this */ public function setRememberFor($remember_for) @@ -326,8 +270,7 @@ public function setRememberFor($remember_for) /** * Gets session - * - * @return \Hydra\SDK\Model\ConsentRequestSessionData + * @return \HydraSDK\Model\ConsentRequestSessionData */ public function getSession() { @@ -336,9 +279,7 @@ public function getSession() /** * Sets session - * - * @param \Hydra\SDK\Model\ConsentRequestSessionData $session session - * + * @param \HydraSDK\Model\ConsentRequestSessionData $session * @return $this */ public function setSession($session) @@ -349,9 +290,7 @@ public function setSession($session) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -361,9 +300,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -373,10 +310,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -390,9 +325,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -402,19 +335,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/HandledLoginRequest.php b/sdk/php/swagger/lib/Model/HandledLoginRequest.php index 10d7d68f45..ecc86b12ea 100644 --- a/sdk/php/swagger/lib/Model/HandledLoginRequest.php +++ b/sdk/php/swagger/lib/Model/HandledLoginRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * HandledLoginRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class HandledLoginRequest implements ModelInterface, ArrayAccess +class HandledLoginRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'HandledLoginRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -67,7 +64,6 @@ class HandledLoginRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -79,30 +75,18 @@ class HandledLoginRequest implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -114,9 +98,9 @@ public static function swaggerFormats() 'subject' => 'subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -128,9 +112,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -142,63 +126,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -211,35 +166,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['subject'] === null) { - $invalidProperties[] = "'subject' can't be null"; + $invalid_properties[] = "'subject' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['subject'] === null) { + return false; + } + return true; } /** * Gets acr - * * @return string */ public function getAcr() @@ -249,9 +207,7 @@ public function getAcr() /** * Sets acr - * * @param string $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. - * * @return $this */ public function setAcr($acr) @@ -263,7 +219,6 @@ public function setAcr($acr) /** * Gets context - * * @return map[string,object] */ public function getContext() @@ -273,9 +228,7 @@ public function getContext() /** * Sets context - * * @param map[string,object] $context Context is an optional object which can hold arbitrary data. The data will be made available when fetching the consent request under the \"context\" field. This is useful in scenarios where login and consent endpoints share data. - * * @return $this */ public function setContext($context) @@ -287,7 +240,6 @@ public function setContext($context) /** * Gets force_subject_identifier - * * @return string */ public function getForceSubjectIdentifier() @@ -297,9 +249,7 @@ public function getForceSubjectIdentifier() /** * Sets force_subject_identifier - * * @param string $force_subject_identifier ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. - * * @return $this */ public function setForceSubjectIdentifier($force_subject_identifier) @@ -311,7 +261,6 @@ public function setForceSubjectIdentifier($force_subject_identifier) /** * Gets remember - * * @return bool */ public function getRemember() @@ -321,9 +270,7 @@ public function getRemember() /** * Sets remember - * * @param bool $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. - * * @return $this */ public function setRemember($remember) @@ -335,7 +282,6 @@ public function setRemember($remember) /** * Gets remember_for - * * @return int */ public function getRememberFor() @@ -345,9 +291,7 @@ public function getRememberFor() /** * Sets remember_for - * * @param int $remember_for RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. - * * @return $this */ public function setRememberFor($remember_for) @@ -359,7 +303,6 @@ public function setRememberFor($remember_for) /** * Gets subject - * * @return string */ public function getSubject() @@ -369,9 +312,7 @@ public function getSubject() /** * Sets subject - * * @param string $subject Subject is the user ID of the end-user that authenticated. - * * @return $this */ public function setSubject($subject) @@ -382,9 +323,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -394,9 +333,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -406,10 +343,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -423,9 +358,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -435,19 +368,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/HealthNotReadyStatus.php b/sdk/php/swagger/lib/Model/HealthNotReadyStatus.php index 1c491dada8..a27a375331 100644 --- a/sdk/php/swagger/lib/Model/HealthNotReadyStatus.php +++ b/sdk/php/swagger/lib/Model/HealthNotReadyStatus.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * HealthNotReadyStatus Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class HealthNotReadyStatus implements ModelInterface, ArrayAccess +class HealthNotReadyStatus implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'healthNotReadyStatus'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +59,76 @@ class HealthNotReadyStatus implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'errors' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'errors' => 'errors' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'errors' => 'setErrors' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'errors' => 'getErrors' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,32 +136,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets errors - * * @return map[string,string] */ public function getErrors() @@ -216,9 +171,7 @@ public function getErrors() /** * Sets errors - * * @param map[string,string] $errors Errors contains a list of errors that caused the not ready status. - * * @return $this */ public function setErrors($errors) @@ -229,9 +182,7 @@ public function setErrors($errors) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +192,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +202,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +217,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +227,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/HealthStatus.php b/sdk/php/swagger/lib/Model/HealthStatus.php index c24072797f..48d3ce7439 100644 --- a/sdk/php/swagger/lib/Model/HealthStatus.php +++ b/sdk/php/swagger/lib/Model/HealthStatus.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * HealthStatus Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class HealthStatus implements ModelInterface, ArrayAccess +class HealthStatus implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'healthStatus'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +59,76 @@ class HealthStatus implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'status' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'status' => 'status' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'status' => 'setStatus' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'status' => 'getStatus' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,32 +136,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets status - * * @return string */ public function getStatus() @@ -216,9 +171,7 @@ public function getStatus() /** * Sets status - * * @param string $status Status always contains \"ok\". - * * @return $this */ public function setStatus($status) @@ -229,9 +182,7 @@ public function setStatus($status) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +192,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +202,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +217,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +227,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/Introspection.php b/sdk/php/swagger/lib/Model/Introspection.php index 8efde05d01..cdc168c296 100644 --- a/sdk/php/swagger/lib/Model/Introspection.php +++ b/sdk/php/swagger/lib/Model/Introspection.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * Introspection Class Doc Comment * - * @category Class + * @category Class * @description https://tools.ietf.org/html/rfc7662 - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class Introspection implements ModelInterface, ArrayAccess +class Introspection implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'Introspection'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -75,7 +72,6 @@ class Introspection implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -94,30 +90,18 @@ class Introspection implements ModelInterface, ArrayAccess 'username' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -136,9 +120,9 @@ public static function swaggerFormats() 'username' => 'username' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -157,9 +141,9 @@ public static function swaggerFormats() 'username' => 'setUsername' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -178,63 +162,34 @@ public static function swaggerFormats() 'username' => 'getUsername' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -254,35 +209,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['active'] === null) { - $invalidProperties[] = "'active' can't be null"; + $invalid_properties[] = "'active' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['active'] === null) { + return false; + } + return true; } /** * Gets active - * * @return bool */ public function getActive() @@ -292,9 +250,7 @@ public function getActive() /** * Sets active - * * @param bool $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). - * * @return $this */ public function setActive($active) @@ -306,7 +262,6 @@ public function setActive($active) /** * Gets aud - * * @return string[] */ public function getAud() @@ -316,9 +271,7 @@ public function getAud() /** * Sets aud - * * @param string[] $aud Audience contains a list of the token's intended audiences. - * * @return $this */ public function setAud($aud) @@ -330,7 +283,6 @@ public function setAud($aud) /** * Gets client_id - * * @return string */ public function getClientId() @@ -340,9 +292,7 @@ public function getClientId() /** * Sets client_id - * * @param string $client_id ClientID is aclient identifier for the OAuth 2.0 client that requested this token. - * * @return $this */ public function setClientId($client_id) @@ -354,7 +304,6 @@ public function setClientId($client_id) /** * Gets exp - * * @return int */ public function getExp() @@ -364,9 +313,7 @@ public function getExp() /** * Sets exp - * * @param int $exp Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. - * * @return $this */ public function setExp($exp) @@ -378,7 +325,6 @@ public function setExp($exp) /** * Gets ext - * * @return map[string,object] */ public function getExt() @@ -388,9 +334,7 @@ public function getExt() /** * Sets ext - * * @param map[string,object] $ext Extra is arbitrary data set by the session. - * * @return $this */ public function setExt($ext) @@ -402,7 +346,6 @@ public function setExt($ext) /** * Gets iat - * * @return int */ public function getIat() @@ -412,9 +355,7 @@ public function getIat() /** * Sets iat - * * @param int $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. - * * @return $this */ public function setIat($iat) @@ -426,7 +367,6 @@ public function setIat($iat) /** * Gets iss - * * @return string */ public function getIss() @@ -436,9 +376,7 @@ public function getIss() /** * Sets iss - * * @param string $iss IssuerURL is a string representing the issuer of this token - * * @return $this */ public function setIss($iss) @@ -450,7 +388,6 @@ public function setIss($iss) /** * Gets nbf - * * @return int */ public function getNbf() @@ -460,9 +397,7 @@ public function getNbf() /** * Sets nbf - * * @param int $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. - * * @return $this */ public function setNbf($nbf) @@ -474,7 +409,6 @@ public function setNbf($nbf) /** * Gets obfuscated_subject - * * @return string */ public function getObfuscatedSubject() @@ -484,9 +418,7 @@ public function getObfuscatedSubject() /** * Sets obfuscated_subject - * * @param string $obfuscated_subject ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued. - * * @return $this */ public function setObfuscatedSubject($obfuscated_subject) @@ -498,7 +430,6 @@ public function setObfuscatedSubject($obfuscated_subject) /** * Gets scope - * * @return string */ public function getScope() @@ -508,9 +439,7 @@ public function getScope() /** * Sets scope - * * @param string $scope Scope is a JSON string containing a space-separated list of scopes associated with this token. - * * @return $this */ public function setScope($scope) @@ -522,7 +451,6 @@ public function setScope($scope) /** * Gets sub - * * @return string */ public function getSub() @@ -532,9 +460,7 @@ public function getSub() /** * Sets sub - * * @param string $sub Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. - * * @return $this */ public function setSub($sub) @@ -546,7 +472,6 @@ public function setSub($sub) /** * Gets token_type - * * @return string */ public function getTokenType() @@ -556,9 +481,7 @@ public function getTokenType() /** * Sets token_type - * * @param string $token_type TokenType is the introspected token's type, for example `access_token` or `refresh_token`. - * * @return $this */ public function setTokenType($token_type) @@ -570,7 +493,6 @@ public function setTokenType($token_type) /** * Gets username - * * @return string */ public function getUsername() @@ -580,9 +502,7 @@ public function getUsername() /** * Sets username - * * @param string $username Username is a human-readable identifier for the resource owner who authorized this token. - * * @return $this */ public function setUsername($username) @@ -593,9 +513,7 @@ public function setUsername($username) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -605,9 +523,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -617,10 +533,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -634,9 +548,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -646,19 +558,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/JSONWebKey.php b/sdk/php/swagger/lib/Model/JSONWebKey.php index 3cc84e2293..7d88f1069f 100644 --- a/sdk/php/swagger/lib/Model/JSONWebKey.php +++ b/sdk/php/swagger/lib/Model/JSONWebKey.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * JSONWebKey Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class JSONWebKey implements ModelInterface, ArrayAccess +class JSONWebKey implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'JSONWebKey'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -78,7 +75,6 @@ class JSONWebKey implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -101,30 +97,18 @@ class JSONWebKey implements ModelInterface, ArrayAccess 'y' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -147,9 +131,9 @@ public static function swaggerFormats() 'y' => 'y' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -172,9 +156,9 @@ public static function swaggerFormats() 'y' => 'setY' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -197,63 +181,34 @@ public static function swaggerFormats() 'y' => 'getY' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -277,44 +232,56 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['alg'] === null) { - $invalidProperties[] = "'alg' can't be null"; + $invalid_properties[] = "'alg' can't be null"; } if ($this->container['kid'] === null) { - $invalidProperties[] = "'kid' can't be null"; + $invalid_properties[] = "'kid' can't be null"; } if ($this->container['kty'] === null) { - $invalidProperties[] = "'kty' can't be null"; + $invalid_properties[] = "'kty' can't be null"; } if ($this->container['use'] === null) { - $invalidProperties[] = "'use' can't be null"; + $invalid_properties[] = "'use' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['alg'] === null) { + return false; + } + if ($this->container['kid'] === null) { + return false; + } + if ($this->container['kty'] === null) { + return false; + } + if ($this->container['use'] === null) { + return false; + } + return true; } /** * Gets alg - * * @return string */ public function getAlg() @@ -324,9 +291,7 @@ public function getAlg() /** * Sets alg - * * @param string $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. - * * @return $this */ public function setAlg($alg) @@ -338,7 +303,6 @@ public function setAlg($alg) /** * Gets crv - * * @return string */ public function getCrv() @@ -348,9 +312,7 @@ public function getCrv() /** * Sets crv - * - * @param string $crv crv - * + * @param string $crv * @return $this */ public function setCrv($crv) @@ -362,7 +324,6 @@ public function setCrv($crv) /** * Gets d - * * @return string */ public function getD() @@ -372,9 +333,7 @@ public function getD() /** * Sets d - * - * @param string $d d - * + * @param string $d * @return $this */ public function setD($d) @@ -386,7 +345,6 @@ public function setD($d) /** * Gets dp - * * @return string */ public function getDp() @@ -396,9 +354,7 @@ public function getDp() /** * Sets dp - * - * @param string $dp dp - * + * @param string $dp * @return $this */ public function setDp($dp) @@ -410,7 +366,6 @@ public function setDp($dp) /** * Gets dq - * * @return string */ public function getDq() @@ -420,9 +375,7 @@ public function getDq() /** * Sets dq - * - * @param string $dq dq - * + * @param string $dq * @return $this */ public function setDq($dq) @@ -434,7 +387,6 @@ public function setDq($dq) /** * Gets e - * * @return string */ public function getE() @@ -444,9 +396,7 @@ public function getE() /** * Sets e - * - * @param string $e e - * + * @param string $e * @return $this */ public function setE($e) @@ -458,7 +408,6 @@ public function setE($e) /** * Gets k - * * @return string */ public function getK() @@ -468,9 +417,7 @@ public function getK() /** * Sets k - * - * @param string $k k - * + * @param string $k * @return $this */ public function setK($k) @@ -482,7 +429,6 @@ public function setK($k) /** * Gets kid - * * @return string */ public function getKid() @@ -492,9 +438,7 @@ public function getKid() /** * Sets kid - * * @param string $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. - * * @return $this */ public function setKid($kid) @@ -506,7 +450,6 @@ public function setKid($kid) /** * Gets kty - * * @return string */ public function getKty() @@ -516,9 +459,7 @@ public function getKty() /** * Sets kty - * * @param 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. - * * @return $this */ public function setKty($kty) @@ -530,7 +471,6 @@ public function setKty($kty) /** * Gets n - * * @return string */ public function getN() @@ -540,9 +480,7 @@ public function getN() /** * Sets n - * - * @param string $n n - * + * @param string $n * @return $this */ public function setN($n) @@ -554,7 +492,6 @@ public function setN($n) /** * Gets p - * * @return string */ public function getP() @@ -564,9 +501,7 @@ public function getP() /** * Sets p - * - * @param string $p p - * + * @param string $p * @return $this */ public function setP($p) @@ -578,7 +513,6 @@ public function setP($p) /** * Gets q - * * @return string */ public function getQ() @@ -588,9 +522,7 @@ public function getQ() /** * Sets q - * - * @param string $q q - * + * @param string $q * @return $this */ public function setQ($q) @@ -602,7 +534,6 @@ public function setQ($q) /** * Gets qi - * * @return string */ public function getQi() @@ -612,9 +543,7 @@ public function getQi() /** * Sets qi - * - * @param string $qi qi - * + * @param string $qi * @return $this */ public function setQi($qi) @@ -626,7 +555,6 @@ public function setQi($qi) /** * Gets use - * * @return string */ public function getUse() @@ -636,9 +564,7 @@ public function getUse() /** * Sets use - * * @param string $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). - * * @return $this */ public function setUse($use) @@ -650,7 +576,6 @@ public function setUse($use) /** * Gets x - * * @return string */ public function getX() @@ -660,9 +585,7 @@ public function getX() /** * Sets x - * - * @param string $x x - * + * @param string $x * @return $this */ public function setX($x) @@ -674,7 +597,6 @@ public function setX($x) /** * Gets x5c - * * @return string[] */ public function getX5c() @@ -684,9 +606,7 @@ public function getX5c() /** * Sets x5c - * * @param string[] $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. - * * @return $this */ public function setX5c($x5c) @@ -698,7 +618,6 @@ public function setX5c($x5c) /** * Gets y - * * @return string */ public function getY() @@ -708,9 +627,7 @@ public function getY() /** * Sets y - * - * @param string $y y - * + * @param string $y * @return $this */ public function setY($y) @@ -721,9 +638,7 @@ public function setY($y) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -733,9 +648,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -745,10 +658,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -762,9 +673,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -774,19 +683,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/JSONWebKeySet.php b/sdk/php/swagger/lib/Model/JSONWebKeySet.php index 624215c99e..6586329c34 100644 --- a/sdk/php/swagger/lib/Model/JSONWebKeySet.php +++ b/sdk/php/swagger/lib/Model/JSONWebKeySet.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,153 +27,108 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * JSONWebKeySet Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class JSONWebKeySet implements ModelInterface, ArrayAccess +class JSONWebKeySet implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'JSONWebKeySet'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ - 'keys' => '\Hydra\SDK\Model\JSONWebKey[]' + 'keys' => '\HydraSDK\Model\JSONWebKey[]' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'keys' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'keys' => 'keys' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'keys' => 'setKeys' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'keys' => 'getKeys' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,33 +136,33 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets keys - * - * @return \Hydra\SDK\Model\JSONWebKey[] + * @return \HydraSDK\Model\JSONWebKey[] */ public function getKeys() { @@ -216,9 +171,7 @@ public function getKeys() /** * Sets keys - * - * @param \Hydra\SDK\Model\JSONWebKey[] $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 \HydraSDK\Model\JSONWebKey[] $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. * @return $this */ public function setKeys($keys) @@ -229,9 +182,7 @@ public function setKeys($keys) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +192,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +202,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +217,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +227,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/JsonWebKeySetGeneratorRequest.php b/sdk/php/swagger/lib/Model/JsonWebKeySetGeneratorRequest.php index 46eee41bd5..1678b6448d 100644 --- a/sdk/php/swagger/lib/Model/JsonWebKeySetGeneratorRequest.php +++ b/sdk/php/swagger/lib/Model/JsonWebKeySetGeneratorRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * JsonWebKeySetGeneratorRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class JsonWebKeySetGeneratorRequest implements ModelInterface, ArrayAccess +class JsonWebKeySetGeneratorRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'jsonWebKeySetGeneratorRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -64,7 +61,6 @@ class JsonWebKeySetGeneratorRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -73,30 +69,18 @@ class JsonWebKeySetGeneratorRequest implements ModelInterface, ArrayAccess 'use' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -105,9 +89,9 @@ public static function swaggerFormats() 'use' => 'use' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -116,9 +100,9 @@ public static function swaggerFormats() 'use' => 'setUse' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -127,63 +111,34 @@ public static function swaggerFormats() 'use' => 'getUse' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -193,41 +148,50 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['alg'] === null) { - $invalidProperties[] = "'alg' can't be null"; + $invalid_properties[] = "'alg' can't be null"; } if ($this->container['kid'] === null) { - $invalidProperties[] = "'kid' can't be null"; + $invalid_properties[] = "'kid' can't be null"; } if ($this->container['use'] === null) { - $invalidProperties[] = "'use' can't be null"; + $invalid_properties[] = "'use' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['alg'] === null) { + return false; + } + if ($this->container['kid'] === null) { + return false; + } + if ($this->container['use'] === null) { + return false; + } + return true; } /** * Gets alg - * * @return string */ public function getAlg() @@ -237,9 +201,7 @@ public function getAlg() /** * Sets alg - * * @param string $alg The algorithm to be used for creating the key. Supports \"RS256\", \"ES512\", \"HS512\", and \"HS256\" - * * @return $this */ public function setAlg($alg) @@ -251,7 +213,6 @@ public function setAlg($alg) /** * Gets kid - * * @return string */ public function getKid() @@ -261,9 +222,7 @@ public function getKid() /** * Sets kid - * * @param string $kid The kid of the key to be created - * * @return $this */ public function setKid($kid) @@ -275,7 +234,6 @@ public function setKid($kid) /** * Gets use - * * @return string */ public function getUse() @@ -285,9 +243,7 @@ public function getUse() /** * Sets use - * * @param string $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 $this */ public function setUse($use) @@ -298,9 +254,7 @@ public function setUse($use) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -310,9 +264,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -322,10 +274,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -339,9 +289,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -351,19 +299,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/LoginRequest.php b/sdk/php/swagger/lib/Model/LoginRequest.php index de24d784b0..b67bbfcbe6 100644 --- a/sdk/php/swagger/lib/Model/LoginRequest.php +++ b/sdk/php/swagger/lib/Model/LoginRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,39 +27,36 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * LoginRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class LoginRequest implements ModelInterface, ArrayAccess +class LoginRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'loginRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ 'challenge' => 'string', - 'client' => '\Hydra\SDK\Model\OAuth2Client', - 'oidc_context' => '\Hydra\SDK\Model\OpenIDConnectContext', + 'client' => '\HydraSDK\Model\OAuth2Client', + 'oidc_context' => '\HydraSDK\Model\OpenIDConnectContext', 'request_url' => 'string', 'requested_access_token_audience' => 'string[]', 'requested_scope' => 'string[]', @@ -70,7 +67,6 @@ class LoginRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -85,30 +81,18 @@ class LoginRequest implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -123,9 +107,9 @@ public static function swaggerFormats() 'subject' => 'subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -140,9 +124,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -157,63 +141,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -229,32 +184,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets challenge - * * @return string */ public function getChallenge() @@ -264,9 +219,7 @@ public function getChallenge() /** * Sets challenge - * * @param string $challenge Challenge is the identifier (\"login challenge\") of the login request. It is used to identify the session. - * * @return $this */ public function setChallenge($challenge) @@ -278,8 +231,7 @@ public function setChallenge($challenge) /** * Gets client - * - * @return \Hydra\SDK\Model\OAuth2Client + * @return \HydraSDK\Model\OAuth2Client */ public function getClient() { @@ -288,9 +240,7 @@ public function getClient() /** * Sets client - * - * @param \Hydra\SDK\Model\OAuth2Client $client client - * + * @param \HydraSDK\Model\OAuth2Client $client * @return $this */ public function setClient($client) @@ -302,8 +252,7 @@ public function setClient($client) /** * Gets oidc_context - * - * @return \Hydra\SDK\Model\OpenIDConnectContext + * @return \HydraSDK\Model\OpenIDConnectContext */ public function getOidcContext() { @@ -312,9 +261,7 @@ public function getOidcContext() /** * Sets oidc_context - * - * @param \Hydra\SDK\Model\OpenIDConnectContext $oidc_context oidc_context - * + * @param \HydraSDK\Model\OpenIDConnectContext $oidc_context * @return $this */ public function setOidcContext($oidc_context) @@ -326,7 +273,6 @@ public function setOidcContext($oidc_context) /** * Gets request_url - * * @return string */ public function getRequestUrl() @@ -336,9 +282,7 @@ public function getRequestUrl() /** * Sets request_url - * * @param string $request_url RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. - * * @return $this */ public function setRequestUrl($request_url) @@ -350,7 +294,6 @@ public function setRequestUrl($request_url) /** * Gets requested_access_token_audience - * * @return string[] */ public function getRequestedAccessTokenAudience() @@ -360,9 +303,7 @@ public function getRequestedAccessTokenAudience() /** * Sets requested_access_token_audience - * * @param string[] $requested_access_token_audience RequestedScope contains the access token audience as requested by the OAuth 2.0 Client. - * * @return $this */ public function setRequestedAccessTokenAudience($requested_access_token_audience) @@ -374,7 +315,6 @@ public function setRequestedAccessTokenAudience($requested_access_token_audience /** * Gets requested_scope - * * @return string[] */ public function getRequestedScope() @@ -384,9 +324,7 @@ public function getRequestedScope() /** * Sets requested_scope - * * @param string[] $requested_scope RequestedScope contains the OAuth 2.0 Scope requested by the OAuth 2.0 Client. - * * @return $this */ public function setRequestedScope($requested_scope) @@ -398,7 +336,6 @@ public function setRequestedScope($requested_scope) /** * Gets session_id - * * @return string */ public function getSessionId() @@ -408,9 +345,7 @@ public function getSessionId() /** * Sets session_id - * * @param string $session_id SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user. - * * @return $this */ public function setSessionId($session_id) @@ -422,7 +357,6 @@ public function setSessionId($session_id) /** * Gets skip - * * @return bool */ public function getSkip() @@ -432,9 +366,7 @@ public function getSkip() /** * Sets skip - * * @param bool $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. - * * @return $this */ public function setSkip($skip) @@ -446,7 +378,6 @@ public function setSkip($skip) /** * Gets subject - * * @return string */ public function getSubject() @@ -456,9 +387,7 @@ public function getSubject() /** * Sets subject - * * @param string $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. - * * @return $this */ public function setSubject($subject) @@ -469,9 +398,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -481,9 +408,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -493,10 +418,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -510,9 +433,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -522,19 +443,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/LogoutRequest.php b/sdk/php/swagger/lib/Model/LogoutRequest.php index bb8bf82cff..05a777c306 100644 --- a/sdk/php/swagger/lib/Model/LogoutRequest.php +++ b/sdk/php/swagger/lib/Model/LogoutRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * LogoutRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class LogoutRequest implements ModelInterface, ArrayAccess +class LogoutRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'logoutRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -65,7 +62,6 @@ class LogoutRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -75,30 +71,18 @@ class LogoutRequest implements ModelInterface, ArrayAccess 'subject' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -108,9 +92,9 @@ public static function swaggerFormats() 'subject' => 'subject' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -120,9 +104,9 @@ public static function swaggerFormats() 'subject' => 'setSubject' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -132,63 +116,34 @@ public static function swaggerFormats() 'subject' => 'getSubject' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -199,32 +154,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets request_url - * * @return string */ public function getRequestUrl() @@ -234,9 +189,7 @@ public function getRequestUrl() /** * Sets request_url - * * @param string $request_url RequestURL is the original Logout URL requested. - * * @return $this */ public function setRequestUrl($request_url) @@ -248,7 +201,6 @@ public function setRequestUrl($request_url) /** * Gets rp_initiated - * * @return bool */ public function getRpInitiated() @@ -258,9 +210,7 @@ public function getRpInitiated() /** * Sets rp_initiated - * * @param bool $rp_initiated RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. - * * @return $this */ public function setRpInitiated($rp_initiated) @@ -272,7 +222,6 @@ public function setRpInitiated($rp_initiated) /** * Gets sid - * * @return string */ public function getSid() @@ -282,9 +231,7 @@ public function getSid() /** * Sets sid - * * @param string $sid SessionID is the login session ID that was requested to log out. - * * @return $this */ public function setSid($sid) @@ -296,7 +243,6 @@ public function setSid($sid) /** * Gets subject - * * @return string */ public function getSubject() @@ -306,9 +252,7 @@ public function getSubject() /** * Sets subject - * * @param string $subject Subject is the user for whom the logout was request. - * * @return $this */ public function setSubject($subject) @@ -319,9 +263,7 @@ public function setSubject($subject) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -331,9 +273,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -343,10 +283,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -360,9 +298,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -372,19 +308,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/ModelInterface.php b/sdk/php/swagger/lib/Model/ModelInterface.php deleted file mode 100644 index 96bcfcd023..0000000000 --- a/sdk/php/swagger/lib/Model/ModelInterface.php +++ /dev/null @@ -1,96 +0,0 @@ - 'bool', 'frontchannel_logout_uri' => 'string', 'grant_types' => 'string[]', - 'jwks' => '\Hydra\SDK\Model\JSONWebKeySet', + 'jwks' => '\HydraSDK\Model\JSONWebKeySet', 'jwks_uri' => 'string', 'logo_uri' => 'string', 'owner' => 'string', @@ -92,7 +89,6 @@ class OAuth2Client implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -129,30 +125,18 @@ class OAuth2Client implements ModelInterface, ArrayAccess 'userinfo_signed_response_alg' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -189,9 +173,9 @@ public static function swaggerFormats() 'userinfo_signed_response_alg' => 'userinfo_signed_response_alg' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -228,9 +212,9 @@ public static function swaggerFormats() 'userinfo_signed_response_alg' => 'setUserinfoSignedResponseAlg' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -267,63 +251,34 @@ public static function swaggerFormats() 'userinfo_signed_response_alg' => 'getUserinfoSignedResponseAlg' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -361,36 +316,39 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; 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?)+/."; + $invalid_properties[] = "invalid value for 'scope', must be conform to the pattern /([a-zA-Z0-9\\.\\*]+\\s?)+/."; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if (!preg_match("/([a-zA-Z0-9\\.\\*]+\\s?)+/", $this->container['scope'])) { + return false; + } + return true; } /** * Gets allowed_cors_origins - * * @return string[] */ public function getAllowedCorsOrigins() @@ -400,9 +358,7 @@ public function getAllowedCorsOrigins() /** * Sets allowed_cors_origins - * * @param string[] $allowed_cors_origins AllowedCORSOrigins are one or more URLs (scheme://host[:port]) which are allowed to make CORS requests to the /oauth/token endpoint. If this array is empty, the sever's CORS origin configuration (`CORS_ALLOWED_ORIGINS`) will be used instead. If this array is set, the allowed origins are appended to the server's CORS origin configuration. Be aware that environment variable `CORS_ENABLED` MUST be set to `true` for this to work. - * * @return $this */ public function setAllowedCorsOrigins($allowed_cors_origins) @@ -414,7 +370,6 @@ public function setAllowedCorsOrigins($allowed_cors_origins) /** * Gets audience - * * @return string[] */ public function getAudience() @@ -424,9 +379,7 @@ public function getAudience() /** * Sets audience - * * @param string[] $audience Audience is a whitelist defining the audiences this client is allowed to request tokens for. An audience limits the applicability of an OAuth 2.0 Access Token to, for example, certain API endpoints. The value is a list of URLs. URLs MUST NOT contain whitespaces. - * * @return $this */ public function setAudience($audience) @@ -438,7 +391,6 @@ public function setAudience($audience) /** * Gets backchannel_logout_session_required - * * @return bool */ public function getBackchannelLogoutSessionRequired() @@ -448,9 +400,7 @@ public function getBackchannelLogoutSessionRequired() /** * Sets backchannel_logout_session_required - * * @param bool $backchannel_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 $this */ public function setBackchannelLogoutSessionRequired($backchannel_logout_session_required) @@ -462,7 +412,6 @@ public function setBackchannelLogoutSessionRequired($backchannel_logout_session_ /** * Gets backchannel_logout_uri - * * @return string */ public function getBackchannelLogoutUri() @@ -472,9 +421,7 @@ public function getBackchannelLogoutUri() /** * Sets backchannel_logout_uri - * * @param string $backchannel_logout_uri RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. - * * @return $this */ public function setBackchannelLogoutUri($backchannel_logout_uri) @@ -486,7 +433,6 @@ public function setBackchannelLogoutUri($backchannel_logout_uri) /** * Gets client_id - * * @return string */ public function getClientId() @@ -496,9 +442,7 @@ public function getClientId() /** * Sets client_id - * * @param string $client_id ClientID is the id for this client. - * * @return $this */ public function setClientId($client_id) @@ -510,7 +454,6 @@ public function setClientId($client_id) /** * Gets client_name - * * @return string */ public function getClientName() @@ -520,9 +463,7 @@ public function getClientName() /** * Sets client_name - * * @param string $client_name Name is the human-readable string name of the client to be presented to the end-user during authorization. - * * @return $this */ public function setClientName($client_name) @@ -534,7 +475,6 @@ public function setClientName($client_name) /** * Gets client_secret - * * @return string */ public function getClientSecret() @@ -544,9 +484,7 @@ public function getClientSecret() /** * Sets client_secret - * * @param string $client_secret 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. - * * @return $this */ public function setClientSecret($client_secret) @@ -558,7 +496,6 @@ public function setClientSecret($client_secret) /** * Gets client_secret_expires_at - * * @return int */ public function getClientSecretExpiresAt() @@ -568,9 +505,7 @@ public function getClientSecretExpiresAt() /** * Sets client_secret_expires_at - * * @param int $client_secret_expires_at 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. - * * @return $this */ public function setClientSecretExpiresAt($client_secret_expires_at) @@ -582,7 +517,6 @@ public function setClientSecretExpiresAt($client_secret_expires_at) /** * Gets client_uri - * * @return string */ public function getClientUri() @@ -592,9 +526,7 @@ public function getClientUri() /** * Sets client_uri - * * @param string $client_uri 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. - * * @return $this */ public function setClientUri($client_uri) @@ -606,7 +538,6 @@ public function setClientUri($client_uri) /** * Gets contacts - * * @return string[] */ public function getContacts() @@ -616,9 +547,7 @@ public function getContacts() /** * Sets contacts - * * @param string[] $contacts Contacts is a array of strings representing ways to contact people responsible for this client, typically email addresses. - * * @return $this */ public function setContacts($contacts) @@ -630,7 +559,6 @@ public function setContacts($contacts) /** * Gets created_at - * * @return \DateTime */ public function getCreatedAt() @@ -640,9 +568,7 @@ public function getCreatedAt() /** * Sets created_at - * * @param \DateTime $created_at CreatedAt returns the timestamp of the client's creation. - * * @return $this */ public function setCreatedAt($created_at) @@ -654,7 +580,6 @@ public function setCreatedAt($created_at) /** * Gets frontchannel_logout_session_required - * * @return bool */ public function getFrontchannelLogoutSessionRequired() @@ -664,9 +589,7 @@ public function getFrontchannelLogoutSessionRequired() /** * Sets frontchannel_logout_session_required - * * @param bool $frontchannel_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 $this */ public function setFrontchannelLogoutSessionRequired($frontchannel_logout_session_required) @@ -678,7 +601,6 @@ public function setFrontchannelLogoutSessionRequired($frontchannel_logout_sessio /** * Gets frontchannel_logout_uri - * * @return string */ public function getFrontchannelLogoutUri() @@ -688,9 +610,7 @@ public function getFrontchannelLogoutUri() /** * Sets frontchannel_logout_uri - * * @param string $frontchannel_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 $this */ public function setFrontchannelLogoutUri($frontchannel_logout_uri) @@ -702,7 +622,6 @@ public function setFrontchannelLogoutUri($frontchannel_logout_uri) /** * Gets grant_types - * * @return string[] */ public function getGrantTypes() @@ -712,9 +631,7 @@ public function getGrantTypes() /** * Sets grant_types - * * @param string[] $grant_types GrantTypes is an array of grant types the client is allowed to use. - * * @return $this */ public function setGrantTypes($grant_types) @@ -726,8 +643,7 @@ public function setGrantTypes($grant_types) /** * Gets jwks - * - * @return \Hydra\SDK\Model\JSONWebKeySet + * @return \HydraSDK\Model\JSONWebKeySet */ public function getJwks() { @@ -736,9 +652,7 @@ public function getJwks() /** * Sets jwks - * - * @param \Hydra\SDK\Model\JSONWebKeySet $jwks jwks - * + * @param \HydraSDK\Model\JSONWebKeySet $jwks * @return $this */ public function setJwks($jwks) @@ -750,7 +664,6 @@ public function setJwks($jwks) /** * Gets jwks_uri - * * @return string */ public function getJwksUri() @@ -760,9 +673,7 @@ public function getJwksUri() /** * Sets jwks_uri - * * @param string $jwks_uri 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 $this */ public function setJwksUri($jwks_uri) @@ -774,7 +685,6 @@ public function setJwksUri($jwks_uri) /** * Gets logo_uri - * * @return string */ public function getLogoUri() @@ -784,9 +694,7 @@ public function getLogoUri() /** * Sets logo_uri - * * @param string $logo_uri LogoURI is an URL string that references a logo for the client. - * * @return $this */ public function setLogoUri($logo_uri) @@ -798,7 +706,6 @@ public function setLogoUri($logo_uri) /** * Gets owner - * * @return string */ public function getOwner() @@ -808,9 +715,7 @@ public function getOwner() /** * Sets owner - * * @param string $owner Owner is a string identifying the owner of the OAuth 2.0 Client. - * * @return $this */ public function setOwner($owner) @@ -822,7 +727,6 @@ public function setOwner($owner) /** * Gets policy_uri - * * @return string */ public function getPolicyUri() @@ -832,9 +736,7 @@ public function getPolicyUri() /** * Sets policy_uri - * * @param string $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 $this */ public function setPolicyUri($policy_uri) @@ -846,7 +748,6 @@ public function setPolicyUri($policy_uri) /** * Gets post_logout_redirect_uris - * * @return string[] */ public function getPostLogoutRedirectUris() @@ -856,9 +757,7 @@ public function getPostLogoutRedirectUris() /** * Sets post_logout_redirect_uris - * * @param string[] $post_logout_redirect_uris Array of URLs supplied by the RP to which it MAY request that the End-User's User Agent be redirected using the post_logout_redirect_uri parameter after a logout has been performed. - * * @return $this */ public function setPostLogoutRedirectUris($post_logout_redirect_uris) @@ -870,7 +769,6 @@ public function setPostLogoutRedirectUris($post_logout_redirect_uris) /** * Gets redirect_uris - * * @return string[] */ public function getRedirectUris() @@ -880,9 +778,7 @@ public function getRedirectUris() /** * Sets redirect_uris - * * @param string[] $redirect_uris RedirectURIs is an array of allowed redirect urls for the client, for example http://mydomain/oauth/callback . - * * @return $this */ public function setRedirectUris($redirect_uris) @@ -894,7 +790,6 @@ public function setRedirectUris($redirect_uris) /** * Gets request_object_signing_alg - * * @return string */ public function getRequestObjectSigningAlg() @@ -904,9 +799,7 @@ public function getRequestObjectSigningAlg() /** * Sets request_object_signing_alg - * * @param string $request_object_signing_alg 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 $this */ public function setRequestObjectSigningAlg($request_object_signing_alg) @@ -918,7 +811,6 @@ public function setRequestObjectSigningAlg($request_object_signing_alg) /** * Gets request_uris - * * @return string[] */ public function getRequestUris() @@ -928,9 +820,7 @@ public function getRequestUris() /** * Sets request_uris - * * @param string[] $request_uris Array of request_uri values that are pre-registered by the RP for use at the OP. Servers MAY cache the contents of the files referenced by these URIs and not retrieve them at the time they are used in a request. OPs can require that request_uri values used be pre-registered with the require_request_uri_registration discovery parameter. - * * @return $this */ public function setRequestUris($request_uris) @@ -942,7 +832,6 @@ public function setRequestUris($request_uris) /** * Gets response_types - * * @return string[] */ public function getResponseTypes() @@ -952,9 +841,7 @@ public function getResponseTypes() /** * Sets response_types - * * @param string[] $response_types ResponseTypes is an array of the OAuth 2.0 response type strings that the client can use at the authorization endpoint. - * * @return $this */ public function setResponseTypes($response_types) @@ -966,7 +853,6 @@ public function setResponseTypes($response_types) /** * Gets scope - * * @return string */ public function getScope() @@ -976,9 +862,7 @@ public function getScope() /** * Sets scope - * * @param 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. - * * @return $this */ public function setScope($scope) @@ -995,7 +879,6 @@ public function setScope($scope) /** * Gets sector_identifier_uri - * * @return string */ public function getSectorIdentifierUri() @@ -1005,9 +888,7 @@ public function getSectorIdentifierUri() /** * Sets sector_identifier_uri - * * @param string $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 $this */ public function setSectorIdentifierUri($sector_identifier_uri) @@ -1019,7 +900,6 @@ public function setSectorIdentifierUri($sector_identifier_uri) /** * Gets subject_type - * * @return string */ public function getSubjectType() @@ -1029,9 +909,7 @@ public function getSubjectType() /** * Sets subject_type - * * @param string $subject_type 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`. - * * @return $this */ public function setSubjectType($subject_type) @@ -1043,7 +921,6 @@ public function setSubjectType($subject_type) /** * Gets token_endpoint_auth_method - * * @return string */ public function getTokenEndpointAuthMethod() @@ -1053,9 +930,7 @@ public function getTokenEndpointAuthMethod() /** * Sets token_endpoint_auth_method - * * @param string $token_endpoint_auth_method Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. - * * @return $this */ public function setTokenEndpointAuthMethod($token_endpoint_auth_method) @@ -1067,7 +942,6 @@ public function setTokenEndpointAuthMethod($token_endpoint_auth_method) /** * Gets tos_uri - * * @return string */ public function getTosUri() @@ -1077,9 +951,7 @@ public function getTosUri() /** * Sets tos_uri - * * @param string $tos_uri 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. - * * @return $this */ public function setTosUri($tos_uri) @@ -1091,7 +963,6 @@ public function setTosUri($tos_uri) /** * Gets updated_at - * * @return \DateTime */ public function getUpdatedAt() @@ -1101,9 +972,7 @@ public function getUpdatedAt() /** * Sets updated_at - * * @param \DateTime $updated_at UpdatedAt returns the timestamp of the last update. - * * @return $this */ public function setUpdatedAt($updated_at) @@ -1115,7 +984,6 @@ public function setUpdatedAt($updated_at) /** * Gets userinfo_signed_response_alg - * * @return string */ public function getUserinfoSignedResponseAlg() @@ -1125,9 +993,7 @@ public function getUserinfoSignedResponseAlg() /** * Sets userinfo_signed_response_alg - * * @param string $userinfo_signed_response_alg 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 $this */ public function setUserinfoSignedResponseAlg($userinfo_signed_response_alg) @@ -1138,9 +1004,7 @@ public function setUserinfoSignedResponseAlg($userinfo_signed_response_alg) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -1150,9 +1014,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -1162,10 +1024,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -1179,9 +1039,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -1191,19 +1049,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/OAuth2TokenIntrospection.php b/sdk/php/swagger/lib/Model/OAuth2TokenIntrospection.php index b553e8cb11..4d13bf0671 100644 --- a/sdk/php/swagger/lib/Model/OAuth2TokenIntrospection.php +++ b/sdk/php/swagger/lib/Model/OAuth2TokenIntrospection.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * OAuth2TokenIntrospection Class Doc Comment * - * @category Class + * @category Class * @description https://tools.ietf.org/html/rfc7662 - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class OAuth2TokenIntrospection implements ModelInterface, ArrayAccess +class OAuth2TokenIntrospection implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'oAuth2TokenIntrospection'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -75,7 +72,6 @@ class OAuth2TokenIntrospection implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -94,30 +90,18 @@ class OAuth2TokenIntrospection implements ModelInterface, ArrayAccess 'username' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -136,9 +120,9 @@ public static function swaggerFormats() 'username' => 'username' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -157,9 +141,9 @@ public static function swaggerFormats() 'username' => 'setUsername' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -178,63 +162,34 @@ public static function swaggerFormats() 'username' => 'getUsername' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -254,35 +209,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['active'] === null) { - $invalidProperties[] = "'active' can't be null"; + $invalid_properties[] = "'active' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['active'] === null) { + return false; + } + return true; } /** * Gets active - * * @return bool */ public function getActive() @@ -292,9 +250,7 @@ public function getActive() /** * Sets active - * * @param bool $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). - * * @return $this */ public function setActive($active) @@ -306,7 +262,6 @@ public function setActive($active) /** * Gets aud - * * @return string[] */ public function getAud() @@ -316,9 +271,7 @@ public function getAud() /** * Sets aud - * * @param string[] $aud Audience contains a list of the token's intended audiences. - * * @return $this */ public function setAud($aud) @@ -330,7 +283,6 @@ public function setAud($aud) /** * Gets client_id - * * @return string */ public function getClientId() @@ -340,9 +292,7 @@ public function getClientId() /** * Sets client_id - * * @param string $client_id ClientID is aclient identifier for the OAuth 2.0 client that requested this token. - * * @return $this */ public function setClientId($client_id) @@ -354,7 +304,6 @@ public function setClientId($client_id) /** * Gets exp - * * @return int */ public function getExp() @@ -364,9 +313,7 @@ public function getExp() /** * Sets exp - * * @param int $exp Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. - * * @return $this */ public function setExp($exp) @@ -378,7 +325,6 @@ public function setExp($exp) /** * Gets ext - * * @return map[string,object] */ public function getExt() @@ -388,9 +334,7 @@ public function getExt() /** * Sets ext - * * @param map[string,object] $ext Extra is arbitrary data set by the session. - * * @return $this */ public function setExt($ext) @@ -402,7 +346,6 @@ public function setExt($ext) /** * Gets iat - * * @return int */ public function getIat() @@ -412,9 +355,7 @@ public function getIat() /** * Sets iat - * * @param int $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. - * * @return $this */ public function setIat($iat) @@ -426,7 +367,6 @@ public function setIat($iat) /** * Gets iss - * * @return string */ public function getIss() @@ -436,9 +376,7 @@ public function getIss() /** * Sets iss - * * @param string $iss IssuerURL is a string representing the issuer of this token - * * @return $this */ public function setIss($iss) @@ -450,7 +388,6 @@ public function setIss($iss) /** * Gets nbf - * * @return int */ public function getNbf() @@ -460,9 +397,7 @@ public function getNbf() /** * Sets nbf - * * @param int $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. - * * @return $this */ public function setNbf($nbf) @@ -474,7 +409,6 @@ public function setNbf($nbf) /** * Gets obfuscated_subject - * * @return string */ public function getObfuscatedSubject() @@ -484,9 +418,7 @@ public function getObfuscatedSubject() /** * Sets obfuscated_subject - * * @param string $obfuscated_subject ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued. - * * @return $this */ public function setObfuscatedSubject($obfuscated_subject) @@ -498,7 +430,6 @@ public function setObfuscatedSubject($obfuscated_subject) /** * Gets scope - * * @return string */ public function getScope() @@ -508,9 +439,7 @@ public function getScope() /** * Sets scope - * * @param string $scope Scope is a JSON string containing a space-separated list of scopes associated with this token. - * * @return $this */ public function setScope($scope) @@ -522,7 +451,6 @@ public function setScope($scope) /** * Gets sub - * * @return string */ public function getSub() @@ -532,9 +460,7 @@ public function getSub() /** * Sets sub - * * @param string $sub Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. - * * @return $this */ public function setSub($sub) @@ -546,7 +472,6 @@ public function setSub($sub) /** * Gets token_type - * * @return string */ public function getTokenType() @@ -556,9 +481,7 @@ public function getTokenType() /** * Sets token_type - * * @param string $token_type TokenType is the introspected token's type, for example `access_token` or `refresh_token`. - * * @return $this */ public function setTokenType($token_type) @@ -570,7 +493,6 @@ public function setTokenType($token_type) /** * Gets username - * * @return string */ public function getUsername() @@ -580,9 +502,7 @@ public function getUsername() /** * Sets username - * * @param string $username Username is a human-readable identifier for the resource owner who authorized this token. - * * @return $this */ public function setUsername($username) @@ -593,9 +513,7 @@ public function setUsername($username) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -605,9 +523,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -617,10 +533,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -634,9 +548,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -646,19 +558,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/Oauth2TokenResponse.php b/sdk/php/swagger/lib/Model/Oauth2TokenResponse.php index 7523af1f54..f73cd748d2 100644 --- a/sdk/php/swagger/lib/Model/Oauth2TokenResponse.php +++ b/sdk/php/swagger/lib/Model/Oauth2TokenResponse.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * Oauth2TokenResponse Class Doc Comment * - * @category Class + * @category Class * @description The Access Token Response - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class Oauth2TokenResponse implements ModelInterface, ArrayAccess +class Oauth2TokenResponse implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'oauth2TokenResponse'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -66,7 +63,6 @@ class Oauth2TokenResponse implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -76,30 +72,18 @@ class Oauth2TokenResponse implements ModelInterface, ArrayAccess 'redirect_uri' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -109,9 +93,9 @@ public static function swaggerFormats() 'redirect_uri' => 'redirect_uri' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -121,9 +105,9 @@ public static function swaggerFormats() 'redirect_uri' => 'setRedirectUri' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -133,63 +117,34 @@ public static function swaggerFormats() 'redirect_uri' => 'getRedirectUri' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -200,32 +155,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets access_token - * * @return string */ public function getAccessToken() @@ -235,9 +190,7 @@ public function getAccessToken() /** * Sets access_token - * - * @param string $access_token access_token - * + * @param string $access_token * @return $this */ public function setAccessToken($access_token) @@ -249,7 +202,6 @@ public function setAccessToken($access_token) /** * Gets client_id - * * @return string */ public function getClientId() @@ -259,9 +211,7 @@ public function getClientId() /** * Sets client_id - * - * @param string $client_id client_id - * + * @param string $client_id * @return $this */ public function setClientId($client_id) @@ -273,7 +223,6 @@ public function setClientId($client_id) /** * Gets code - * * @return string */ public function getCode() @@ -283,9 +232,7 @@ public function getCode() /** * Sets code - * - * @param string $code code - * + * @param string $code * @return $this */ public function setCode($code) @@ -297,7 +244,6 @@ public function setCode($code) /** * Gets redirect_uri - * * @return string */ public function getRedirectUri() @@ -307,9 +253,7 @@ public function getRedirectUri() /** * Sets redirect_uri - * - * @param string $redirect_uri redirect_uri - * + * @param string $redirect_uri * @return $this */ public function setRedirectUri($redirect_uri) @@ -320,9 +264,7 @@ public function setRedirectUri($redirect_uri) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -332,9 +274,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -344,10 +284,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -361,9 +299,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -373,19 +309,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/OauthTokenResponse.php b/sdk/php/swagger/lib/Model/OauthTokenResponse.php index 581045200a..6ee9cd341e 100644 --- a/sdk/php/swagger/lib/Model/OauthTokenResponse.php +++ b/sdk/php/swagger/lib/Model/OauthTokenResponse.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * OauthTokenResponse Class Doc Comment * - * @category Class + * @category Class * @description The token response - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class OauthTokenResponse implements ModelInterface, ArrayAccess +class OauthTokenResponse implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'oauthTokenResponse'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -68,7 +65,6 @@ class OauthTokenResponse implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -80,30 +76,18 @@ class OauthTokenResponse implements ModelInterface, ArrayAccess 'token_type' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -115,9 +99,9 @@ public static function swaggerFormats() 'token_type' => 'token_type' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -129,9 +113,9 @@ public static function swaggerFormats() 'token_type' => 'setTokenType' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -143,63 +127,34 @@ public static function swaggerFormats() 'token_type' => 'getTokenType' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -212,32 +167,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets access_token - * * @return string */ public function getAccessToken() @@ -247,9 +202,7 @@ public function getAccessToken() /** * Sets access_token - * * @param string $access_token The access token issued by the authorization server. - * * @return $this */ public function setAccessToken($access_token) @@ -261,7 +214,6 @@ public function setAccessToken($access_token) /** * Gets expires_in - * * @return int */ public function getExpiresIn() @@ -271,9 +223,7 @@ public function getExpiresIn() /** * Sets expires_in - * * @param int $expires_in 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 $this */ public function setExpiresIn($expires_in) @@ -285,7 +235,6 @@ public function setExpiresIn($expires_in) /** * Gets id_token - * * @return int */ public function getIdToken() @@ -295,9 +244,7 @@ public function getIdToken() /** * Sets id_token - * * @param int $id_token To retrieve a refresh token request the id_token scope. - * * @return $this */ public function setIdToken($id_token) @@ -309,7 +256,6 @@ public function setIdToken($id_token) /** * Gets refresh_token - * * @return string */ public function getRefreshToken() @@ -319,9 +265,7 @@ public function getRefreshToken() /** * Sets refresh_token - * * @param string $refresh_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. - * * @return $this */ public function setRefreshToken($refresh_token) @@ -333,7 +277,6 @@ public function setRefreshToken($refresh_token) /** * Gets scope - * * @return int */ public function getScope() @@ -343,9 +286,7 @@ public function getScope() /** * Sets scope - * * @param int $scope The scope of the access token - * * @return $this */ public function setScope($scope) @@ -357,7 +298,6 @@ public function setScope($scope) /** * Gets token_type - * * @return string */ public function getTokenType() @@ -367,9 +307,7 @@ public function getTokenType() /** * Sets token_type - * * @param string $token_type The type of the token issued - * * @return $this */ public function setTokenType($token_type) @@ -380,9 +318,7 @@ public function setTokenType($token_type) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -392,9 +328,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -404,10 +338,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -421,9 +353,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -433,19 +363,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/OpenIDConnectContext.php b/sdk/php/swagger/lib/Model/OpenIDConnectContext.php index 2dca549741..97af8c9145 100644 --- a/sdk/php/swagger/lib/Model/OpenIDConnectContext.php +++ b/sdk/php/swagger/lib/Model/OpenIDConnectContext.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * OpenIDConnectContext Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class OpenIDConnectContext implements ModelInterface, ArrayAccess +class OpenIDConnectContext implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'openIDConnectContext'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -66,7 +63,6 @@ class OpenIDConnectContext implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -77,30 +73,18 @@ class OpenIDConnectContext implements ModelInterface, ArrayAccess 'ui_locales' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -111,9 +95,9 @@ public static function swaggerFormats() 'ui_locales' => 'ui_locales' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -124,9 +108,9 @@ public static function swaggerFormats() 'ui_locales' => 'setUiLocales' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -137,63 +121,34 @@ public static function swaggerFormats() 'ui_locales' => 'getUiLocales' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -205,32 +160,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets acr_values - * * @return string[] */ public function getAcrValues() @@ -240,9 +195,7 @@ public function getAcrValues() /** * Sets acr_values - * * @param string[] $acr_values ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter. - * * @return $this */ public function setAcrValues($acr_values) @@ -254,7 +207,6 @@ public function setAcrValues($acr_values) /** * Gets display - * * @return string */ public function getDisplay() @@ -264,9 +216,7 @@ public function getDisplay() /** * Sets display - * * @param string $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. - * * @return $this */ public function setDisplay($display) @@ -278,7 +228,6 @@ public function setDisplay($display) /** * Gets id_token_hint_claims - * * @return map[string,object] */ public function getIdTokenHintClaims() @@ -288,9 +237,7 @@ public function getIdTokenHintClaims() /** * Sets id_token_hint_claims - * * @param map[string,object] $id_token_hint_claims 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 $this */ public function setIdTokenHintClaims($id_token_hint_claims) @@ -302,7 +249,6 @@ public function setIdTokenHintClaims($id_token_hint_claims) /** * Gets login_hint - * * @return string */ public function getLoginHint() @@ -312,9 +258,7 @@ public function getLoginHint() /** * Sets login_hint - * * @param string $login_hint LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional. - * * @return $this */ public function setLoginHint($login_hint) @@ -326,7 +270,6 @@ public function setLoginHint($login_hint) /** * Gets ui_locales - * * @return string[] */ public function getUiLocales() @@ -336,9 +279,7 @@ public function getUiLocales() /** * Sets ui_locales - * * @param string[] $ui_locales UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider. - * * @return $this */ public function setUiLocales($ui_locales) @@ -349,9 +290,7 @@ public function setUiLocales($ui_locales) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -361,9 +300,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -373,10 +310,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -390,9 +325,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -402,19 +335,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/PreviousConsentSession.php b/sdk/php/swagger/lib/Model/PreviousConsentSession.php index a207860a74..833475cfd1 100644 --- a/sdk/php/swagger/lib/Model/PreviousConsentSession.php +++ b/sdk/php/swagger/lib/Model/PreviousConsentSession.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,48 +27,44 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * PreviousConsentSession Class Doc Comment * - * @category Class - * @description PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @description The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class PreviousConsentSession implements ModelInterface, ArrayAccess +class PreviousConsentSession implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'PreviousConsentSession'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ - 'consent_request' => '\Hydra\SDK\Model\ConsentRequest', + 'consent_request' => '\HydraSDK\Model\ConsentRequest', 'grant_access_token_audience' => 'string[]', 'grant_scope' => 'string[]', 'remember' => 'bool', 'remember_for' => 'int', - 'session' => '\Hydra\SDK\Model\ConsentRequestSessionData' + 'session' => '\HydraSDK\Model\ConsentRequestSession' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -80,30 +76,18 @@ class PreviousConsentSession implements ModelInterface, ArrayAccess 'session' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -115,9 +99,9 @@ public static function swaggerFormats() 'session' => 'session' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -129,9 +113,9 @@ public static function swaggerFormats() 'session' => 'setSession' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -143,63 +127,34 @@ public static function swaggerFormats() 'session' => 'getSession' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -212,33 +167,33 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets consent_request - * - * @return \Hydra\SDK\Model\ConsentRequest + * @return \HydraSDK\Model\ConsentRequest */ public function getConsentRequest() { @@ -247,9 +202,7 @@ public function getConsentRequest() /** * Sets consent_request - * - * @param \Hydra\SDK\Model\ConsentRequest $consent_request consent_request - * + * @param \HydraSDK\Model\ConsentRequest $consent_request * @return $this */ public function setConsentRequest($consent_request) @@ -261,7 +214,6 @@ public function setConsentRequest($consent_request) /** * Gets grant_access_token_audience - * * @return string[] */ public function getGrantAccessTokenAudience() @@ -271,9 +223,7 @@ public function getGrantAccessTokenAudience() /** * Sets grant_access_token_audience - * * @param string[] $grant_access_token_audience GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`. - * * @return $this */ public function setGrantAccessTokenAudience($grant_access_token_audience) @@ -285,7 +235,6 @@ public function setGrantAccessTokenAudience($grant_access_token_audience) /** * Gets grant_scope - * * @return string[] */ public function getGrantScope() @@ -295,9 +244,7 @@ public function getGrantScope() /** * Sets grant_scope - * * @param string[] $grant_scope GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope` - * * @return $this */ public function setGrantScope($grant_scope) @@ -309,7 +256,6 @@ public function setGrantScope($grant_scope) /** * Gets remember - * * @return bool */ public function getRemember() @@ -319,9 +265,7 @@ public function getRemember() /** * Sets remember - * * @param bool $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. - * * @return $this */ public function setRemember($remember) @@ -333,7 +277,6 @@ public function setRemember($remember) /** * Gets remember_for - * * @return int */ public function getRememberFor() @@ -343,9 +286,7 @@ public function getRememberFor() /** * Sets remember_for - * * @param int $remember_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 $this */ public function setRememberFor($remember_for) @@ -357,8 +298,7 @@ public function setRememberFor($remember_for) /** * Gets session - * - * @return \Hydra\SDK\Model\ConsentRequestSessionData + * @return \HydraSDK\Model\ConsentRequestSession */ public function getSession() { @@ -367,9 +307,7 @@ public function getSession() /** * Sets session - * - * @param \Hydra\SDK\Model\ConsentRequestSessionData $session session - * + * @param \HydraSDK\Model\ConsentRequestSession $session * @return $this */ public function setSession($session) @@ -380,9 +318,7 @@ public function setSession($session) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -392,9 +328,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -404,10 +338,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -421,9 +353,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -433,19 +363,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/RejectRequest.php b/sdk/php/swagger/lib/Model/RejectRequest.php index e1a08277e3..9fcec63fea 100644 --- a/sdk/php/swagger/lib/Model/RejectRequest.php +++ b/sdk/php/swagger/lib/Model/RejectRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * RejectRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class RejectRequest implements ModelInterface, ArrayAccess +class RejectRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'rejectRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -66,7 +63,6 @@ class RejectRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -77,30 +73,18 @@ class RejectRequest implements ModelInterface, ArrayAccess 'status_code' => 'int64' ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -111,9 +95,9 @@ public static function swaggerFormats() 'status_code' => 'status_code' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -124,9 +108,9 @@ public static function swaggerFormats() 'status_code' => 'setStatusCode' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -137,63 +121,34 @@ public static function swaggerFormats() 'status_code' => 'getStatusCode' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -205,32 +160,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets error - * * @return string */ public function getError() @@ -240,9 +195,7 @@ public function getError() /** * Sets error - * - * @param string $error error - * + * @param string $error * @return $this */ public function setError($error) @@ -254,7 +207,6 @@ public function setError($error) /** * Gets error_debug - * * @return string */ public function getErrorDebug() @@ -264,9 +216,7 @@ public function getErrorDebug() /** * Sets error_debug - * - * @param string $error_debug error_debug - * + * @param string $error_debug * @return $this */ public function setErrorDebug($error_debug) @@ -278,7 +228,6 @@ public function setErrorDebug($error_debug) /** * Gets error_description - * * @return string */ public function getErrorDescription() @@ -288,9 +237,7 @@ public function getErrorDescription() /** * Sets error_description - * - * @param string $error_description error_description - * + * @param string $error_description * @return $this */ public function setErrorDescription($error_description) @@ -302,7 +249,6 @@ public function setErrorDescription($error_description) /** * Gets error_hint - * * @return string */ public function getErrorHint() @@ -312,9 +258,7 @@ public function getErrorHint() /** * Sets error_hint - * - * @param string $error_hint error_hint - * + * @param string $error_hint * @return $this */ public function setErrorHint($error_hint) @@ -326,7 +270,6 @@ public function setErrorHint($error_hint) /** * Gets status_code - * * @return int */ public function getStatusCode() @@ -336,9 +279,7 @@ public function getStatusCode() /** * Sets status_code - * - * @param int $status_code status_code - * + * @param int $status_code * @return $this */ public function setStatusCode($status_code) @@ -349,9 +290,7 @@ public function setStatusCode($status_code) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -361,9 +300,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -373,10 +310,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -390,9 +325,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -402,19 +335,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/RequestDeniedError.php b/sdk/php/swagger/lib/Model/RequestDeniedError.php index 8c28758f08..a58016a852 100644 --- a/sdk/php/swagger/lib/Model/RequestDeniedError.php +++ b/sdk/php/swagger/lib/Model/RequestDeniedError.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * RequestDeniedError Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class RequestDeniedError implements ModelInterface, ArrayAccess +class RequestDeniedError implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'RequestDeniedError'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -66,7 +63,6 @@ class RequestDeniedError implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -77,30 +73,18 @@ class RequestDeniedError implements ModelInterface, ArrayAccess 'status_code' => 'int64' ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -111,9 +95,9 @@ public static function swaggerFormats() 'status_code' => 'status_code' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -124,9 +108,9 @@ public static function swaggerFormats() 'status_code' => 'setStatusCode' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -137,63 +121,34 @@ public static function swaggerFormats() 'status_code' => 'getStatusCode' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -205,32 +160,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets error - * * @return string */ public function getError() @@ -240,9 +195,7 @@ public function getError() /** * Sets error - * * @param string $error name - * * @return $this */ public function setError($error) @@ -254,7 +207,6 @@ public function setError($error) /** * Gets error_debug - * * @return string */ public function getErrorDebug() @@ -264,9 +216,7 @@ public function getErrorDebug() /** * Sets error_debug - * * @param string $error_debug debug - * * @return $this */ public function setErrorDebug($error_debug) @@ -278,7 +228,6 @@ public function setErrorDebug($error_debug) /** * Gets error_description - * * @return string */ public function getErrorDescription() @@ -288,9 +237,7 @@ public function getErrorDescription() /** * Sets error_description - * * @param string $error_description description - * * @return $this */ public function setErrorDescription($error_description) @@ -302,7 +249,6 @@ public function setErrorDescription($error_description) /** * Gets error_hint - * * @return string */ public function getErrorHint() @@ -312,9 +258,7 @@ public function getErrorHint() /** * Sets error_hint - * * @param string $error_hint hint - * * @return $this */ public function setErrorHint($error_hint) @@ -326,7 +270,6 @@ public function setErrorHint($error_hint) /** * Gets status_code - * * @return int */ public function getStatusCode() @@ -336,9 +279,7 @@ public function getStatusCode() /** * Sets status_code - * * @param int $status_code code - * * @return $this */ public function setStatusCode($status_code) @@ -349,9 +290,7 @@ public function setStatusCode($status_code) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -361,9 +300,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -373,10 +310,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -390,9 +325,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -402,19 +335,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/RequestHandlerResponse.php b/sdk/php/swagger/lib/Model/RequestHandlerResponse.php index 6cf93b0dff..6f08bd3025 100644 --- a/sdk/php/swagger/lib/Model/RequestHandlerResponse.php +++ b/sdk/php/swagger/lib/Model/RequestHandlerResponse.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * RequestHandlerResponse Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class RequestHandlerResponse implements ModelInterface, ArrayAccess +class RequestHandlerResponse implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'RequestHandlerResponse'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +59,76 @@ class RequestHandlerResponse implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'redirect_to' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'redirect_to' => 'redirect_to' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'redirect_to' => 'setRedirectTo' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'redirect_to' => '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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,32 +136,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets redirect_to - * * @return string */ public function getRedirectTo() @@ -216,9 +171,7 @@ public function getRedirectTo() /** * Sets redirect_to - * * @param string $redirect_to RedirectURL is the URL which you should redirect the user to once the authentication process is completed. - * * @return $this */ public function setRedirectTo($redirect_to) @@ -229,9 +182,7 @@ public function setRedirectTo($redirect_to) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +192,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +202,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +217,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +227,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerFlushInactiveAccessTokens.php b/sdk/php/swagger/lib/Model/SwaggerFlushInactiveAccessTokens.php index bb53829ff4..3e1a388d6c 100644 --- a/sdk/php/swagger/lib/Model/SwaggerFlushInactiveAccessTokens.php +++ b/sdk/php/swagger/lib/Model/SwaggerFlushInactiveAccessTokens.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,153 +27,109 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerFlushInactiveAccessTokens Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @description SwaggerFlushInactiveAccessTokens swagger flush inactive access tokens + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerFlushInactiveAccessTokens implements ModelInterface, ArrayAccess +class SwaggerFlushInactiveAccessTokens implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerFlushInactiveAccessTokens'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ - 'body' => '\Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest' + 'body' => '\HydraSDK\Model\FlushInactiveOAuth2TokensRequest' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'body' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'body' => 'Body' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'body' => 'setBody' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'body' => 'getBody' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,33 +137,33 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets body - * - * @return \Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest + * @return \HydraSDK\Model\FlushInactiveOAuth2TokensRequest */ public function getBody() { @@ -216,9 +172,7 @@ public function getBody() /** * Sets body - * - * @param \Hydra\SDK\Model\FlushInactiveOAuth2TokensRequest $body body - * + * @param \HydraSDK\Model\FlushInactiveOAuth2TokensRequest $body * @return $this */ public function setBody($body) @@ -229,9 +183,7 @@ public function setBody($body) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +193,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +203,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +218,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +228,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerHealthStatus.php b/sdk/php/swagger/lib/Model/SwaggerHealthStatus.php index 3c14ccae4c..f8abb9375b 100644 --- a/sdk/php/swagger/lib/Model/SwaggerHealthStatus.php +++ b/sdk/php/swagger/lib/Model/SwaggerHealthStatus.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerHealthStatus Class Doc Comment * - * @category Class + * @category Class * @description SwaggerHealthStatus swagger health status - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerHealthStatus implements ModelInterface, ArrayAccess +class SwaggerHealthStatus implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerHealthStatus'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,118 +60,76 @@ class SwaggerHealthStatus implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'status' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'status' => 'status' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'status' => 'setStatus' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'status' => 'getStatus' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -182,32 +137,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets status - * * @return string */ public function getStatus() @@ -217,9 +172,7 @@ public function getStatus() /** * Sets status - * * @param string $status Status always contains \"ok\". - * * @return $this */ public function setStatus($status) @@ -230,9 +183,7 @@ public function setStatus($status) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -242,9 +193,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -254,10 +203,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -271,9 +218,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -283,19 +228,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerJSONWebKey.php b/sdk/php/swagger/lib/Model/SwaggerJSONWebKey.php index c555360feb..a9ba70dba4 100644 --- a/sdk/php/swagger/lib/Model/SwaggerJSONWebKey.php +++ b/sdk/php/swagger/lib/Model/SwaggerJSONWebKey.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerJSONWebKey Class Doc Comment * - * @category Class + * @category Class * @description SwaggerJSONWebKey swagger JSON web key - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerJSONWebKey implements ModelInterface, ArrayAccess +class SwaggerJSONWebKey implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerJSONWebKey'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -79,7 +76,6 @@ class SwaggerJSONWebKey implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -102,30 +98,18 @@ class SwaggerJSONWebKey implements ModelInterface, ArrayAccess 'y' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -148,9 +132,9 @@ public static function swaggerFormats() 'y' => 'y' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -173,9 +157,9 @@ public static function swaggerFormats() 'y' => 'setY' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -198,63 +182,34 @@ public static function swaggerFormats() 'y' => 'getY' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -278,44 +233,56 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['alg'] === null) { - $invalidProperties[] = "'alg' can't be null"; + $invalid_properties[] = "'alg' can't be null"; } if ($this->container['kid'] === null) { - $invalidProperties[] = "'kid' can't be null"; + $invalid_properties[] = "'kid' can't be null"; } if ($this->container['kty'] === null) { - $invalidProperties[] = "'kty' can't be null"; + $invalid_properties[] = "'kty' can't be null"; } if ($this->container['use'] === null) { - $invalidProperties[] = "'use' can't be null"; + $invalid_properties[] = "'use' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['alg'] === null) { + return false; + } + if ($this->container['kid'] === null) { + return false; + } + if ($this->container['kty'] === null) { + return false; + } + if ($this->container['use'] === null) { + return false; + } + return true; } /** * Gets alg - * * @return string */ public function getAlg() @@ -325,9 +292,7 @@ public function getAlg() /** * Sets alg - * * @param string $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. - * * @return $this */ public function setAlg($alg) @@ -339,7 +304,6 @@ public function setAlg($alg) /** * Gets crv - * * @return string */ public function getCrv() @@ -349,9 +313,7 @@ public function getCrv() /** * Sets crv - * * @param string $crv crv - * * @return $this */ public function setCrv($crv) @@ -363,7 +325,6 @@ public function setCrv($crv) /** * Gets d - * * @return string */ public function getD() @@ -373,9 +334,7 @@ public function getD() /** * Sets d - * * @param string $d d - * * @return $this */ public function setD($d) @@ -387,7 +346,6 @@ public function setD($d) /** * Gets dp - * * @return string */ public function getDp() @@ -397,9 +355,7 @@ public function getDp() /** * Sets dp - * * @param string $dp dp - * * @return $this */ public function setDp($dp) @@ -411,7 +367,6 @@ public function setDp($dp) /** * Gets dq - * * @return string */ public function getDq() @@ -421,9 +376,7 @@ public function getDq() /** * Sets dq - * * @param string $dq dq - * * @return $this */ public function setDq($dq) @@ -435,7 +388,6 @@ public function setDq($dq) /** * Gets e - * * @return string */ public function getE() @@ -445,9 +397,7 @@ public function getE() /** * Sets e - * * @param string $e e - * * @return $this */ public function setE($e) @@ -459,7 +409,6 @@ public function setE($e) /** * Gets k - * * @return string */ public function getK() @@ -469,9 +418,7 @@ public function getK() /** * Sets k - * * @param string $k k - * * @return $this */ public function setK($k) @@ -483,7 +430,6 @@ public function setK($k) /** * Gets kid - * * @return string */ public function getKid() @@ -493,9 +439,7 @@ public function getKid() /** * Sets kid - * * @param string $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. - * * @return $this */ public function setKid($kid) @@ -507,7 +451,6 @@ public function setKid($kid) /** * Gets kty - * * @return string */ public function getKty() @@ -517,9 +460,7 @@ public function getKty() /** * Sets kty - * * @param 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. - * * @return $this */ public function setKty($kty) @@ -531,7 +472,6 @@ public function setKty($kty) /** * Gets n - * * @return string */ public function getN() @@ -541,9 +481,7 @@ public function getN() /** * Sets n - * * @param string $n n - * * @return $this */ public function setN($n) @@ -555,7 +493,6 @@ public function setN($n) /** * Gets p - * * @return string */ public function getP() @@ -565,9 +502,7 @@ public function getP() /** * Sets p - * * @param string $p p - * * @return $this */ public function setP($p) @@ -579,7 +514,6 @@ public function setP($p) /** * Gets q - * * @return string */ public function getQ() @@ -589,9 +523,7 @@ public function getQ() /** * Sets q - * * @param string $q q - * * @return $this */ public function setQ($q) @@ -603,7 +535,6 @@ public function setQ($q) /** * Gets qi - * * @return string */ public function getQi() @@ -613,9 +544,7 @@ public function getQi() /** * Sets qi - * * @param string $qi qi - * * @return $this */ public function setQi($qi) @@ -627,7 +556,6 @@ public function setQi($qi) /** * Gets use - * * @return string */ public function getUse() @@ -637,9 +565,7 @@ public function getUse() /** * Sets use - * * @param string $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). - * * @return $this */ public function setUse($use) @@ -651,7 +577,6 @@ public function setUse($use) /** * Gets x - * * @return string */ public function getX() @@ -661,9 +586,7 @@ public function getX() /** * Sets x - * * @param string $x x - * * @return $this */ public function setX($x) @@ -675,7 +598,6 @@ public function setX($x) /** * Gets x5c - * * @return string[] */ public function getX5c() @@ -685,9 +607,7 @@ public function getX5c() /** * Sets x5c - * * @param string[] $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. - * * @return $this */ public function setX5c($x5c) @@ -699,7 +619,6 @@ public function setX5c($x5c) /** * Gets y - * * @return string */ public function getY() @@ -709,9 +628,7 @@ public function getY() /** * Sets y - * * @param string $y y - * * @return $this */ public function setY($y) @@ -722,9 +639,7 @@ public function setY($y) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -734,9 +649,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -746,10 +659,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -763,9 +674,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -775,19 +684,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerJSONWebKeySet.php b/sdk/php/swagger/lib/Model/SwaggerJSONWebKeySet.php index 4ae5bee7ad..4dc4546972 100644 --- a/sdk/php/swagger/lib/Model/SwaggerJSONWebKeySet.php +++ b/sdk/php/swagger/lib/Model/SwaggerJSONWebKeySet.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,154 +27,109 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerJSONWebKeySet Class Doc Comment * - * @category Class + * @category Class * @description SwaggerJSONWebKeySet swagger JSON web key set - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerJSONWebKeySet implements ModelInterface, ArrayAccess +class SwaggerJSONWebKeySet implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerJSONWebKeySet'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ - 'keys' => '\Hydra\SDK\Model\SwaggerJSONWebKey[]' + 'keys' => '\HydraSDK\Model\SwaggerJSONWebKey[]' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'keys' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'keys' => 'keys' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'keys' => 'setKeys' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'keys' => 'getKeys' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -182,33 +137,33 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets keys - * - * @return \Hydra\SDK\Model\SwaggerJSONWebKey[] + * @return \HydraSDK\Model\SwaggerJSONWebKey[] */ public function getKeys() { @@ -217,9 +172,7 @@ public function getKeys() /** * Sets keys - * - * @param \Hydra\SDK\Model\SwaggerJSONWebKey[] $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 \HydraSDK\Model\SwaggerJSONWebKey[] $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. * @return $this */ public function setKeys($keys) @@ -230,9 +183,7 @@ public function setKeys($keys) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -242,9 +193,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -254,10 +203,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -271,9 +218,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -283,19 +228,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerJsonWebKeyQuery.php b/sdk/php/swagger/lib/Model/SwaggerJsonWebKeyQuery.php index a3be0f5591..397a427e1f 100644 --- a/sdk/php/swagger/lib/Model/SwaggerJsonWebKeyQuery.php +++ b/sdk/php/swagger/lib/Model/SwaggerJsonWebKeyQuery.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerJsonWebKeyQuery Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerJsonWebKeyQuery implements ModelInterface, ArrayAccess +class SwaggerJsonWebKeyQuery implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerJsonWebKeyQuery'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,7 +60,6 @@ class SwaggerJsonWebKeyQuery implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -71,30 +67,18 @@ class SwaggerJsonWebKeyQuery implements ModelInterface, ArrayAccess 'set' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -102,9 +86,9 @@ public static function swaggerFormats() 'set' => 'set' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -112,9 +96,9 @@ public static function swaggerFormats() 'set' => 'setSet' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -122,63 +106,34 @@ public static function swaggerFormats() 'set' => 'getSet' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -187,38 +142,44 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['kid'] === null) { - $invalidProperties[] = "'kid' can't be null"; + $invalid_properties[] = "'kid' can't be null"; } if ($this->container['set'] === null) { - $invalidProperties[] = "'set' can't be null"; + $invalid_properties[] = "'set' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['kid'] === null) { + return false; + } + if ($this->container['set'] === null) { + return false; + } + return true; } /** * Gets kid - * * @return string */ public function getKid() @@ -228,9 +189,7 @@ public function getKid() /** * Sets kid - * * @param string $kid The kid of the desired key in: path - * * @return $this */ public function setKid($kid) @@ -242,7 +201,6 @@ public function setKid($kid) /** * Gets set - * * @return string */ public function getSet() @@ -252,9 +210,7 @@ public function getSet() /** * Sets set - * * @param string $set The set in: path - * * @return $this */ public function setSet($set) @@ -265,9 +221,7 @@ public function setSet($set) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -277,9 +231,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -289,10 +241,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -306,9 +256,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -318,19 +266,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerJwkCreateSet.php b/sdk/php/swagger/lib/Model/SwaggerJwkCreateSet.php index 9dbd35ae19..decafa53cd 100644 --- a/sdk/php/swagger/lib/Model/SwaggerJwkCreateSet.php +++ b/sdk/php/swagger/lib/Model/SwaggerJwkCreateSet.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,43 +27,39 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerJwkCreateSet Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerJwkCreateSet implements ModelInterface, ArrayAccess +class SwaggerJwkCreateSet implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerJwkCreateSet'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ - 'body' => '\Hydra\SDK\Model\JsonWebKeySetGeneratorRequest', + 'body' => '\HydraSDK\Model\JsonWebKeySetGeneratorRequest', 'set' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -71,30 +67,18 @@ class SwaggerJwkCreateSet implements ModelInterface, ArrayAccess 'set' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -102,9 +86,9 @@ public static function swaggerFormats() 'set' => 'set' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -112,9 +96,9 @@ public static function swaggerFormats() 'set' => 'setSet' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -122,63 +106,34 @@ public static function swaggerFormats() 'set' => 'getSet' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -187,36 +142,39 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['set'] === null) { - $invalidProperties[] = "'set' can't be null"; + $invalid_properties[] = "'set' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['set'] === null) { + return false; + } + return true; } /** * Gets body - * - * @return \Hydra\SDK\Model\JsonWebKeySetGeneratorRequest + * @return \HydraSDK\Model\JsonWebKeySetGeneratorRequest */ public function getBody() { @@ -225,9 +183,7 @@ public function getBody() /** * Sets body - * - * @param \Hydra\SDK\Model\JsonWebKeySetGeneratorRequest $body body - * + * @param \HydraSDK\Model\JsonWebKeySetGeneratorRequest $body * @return $this */ public function setBody($body) @@ -239,7 +195,6 @@ public function setBody($body) /** * Gets set - * * @return string */ public function getSet() @@ -249,9 +204,7 @@ public function getSet() /** * Sets set - * * @param string $set The set in: path - * * @return $this */ public function setSet($set) @@ -262,9 +215,7 @@ public function setSet($set) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -274,9 +225,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -286,10 +235,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -303,9 +250,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -315,19 +260,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerJwkSetQuery.php b/sdk/php/swagger/lib/Model/SwaggerJwkSetQuery.php index a43c94e19d..e7998f9546 100644 --- a/sdk/php/swagger/lib/Model/SwaggerJwkSetQuery.php +++ b/sdk/php/swagger/lib/Model/SwaggerJwkSetQuery.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerJwkSetQuery Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerJwkSetQuery implements ModelInterface, ArrayAccess +class SwaggerJwkSetQuery implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerJwkSetQuery'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +59,76 @@ class SwaggerJwkSetQuery implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'set' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'set' => 'set' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'set' => 'setSet' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'set' => 'getSet' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,35 +136,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['set'] === null) { - $invalidProperties[] = "'set' can't be null"; + $invalid_properties[] = "'set' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['set'] === null) { + return false; + } + return true; } /** * Gets set - * * @return string */ public function getSet() @@ -219,9 +177,7 @@ public function getSet() /** * Sets set - * * @param string $set The set in: path - * * @return $this */ public function setSet($set) @@ -232,9 +188,7 @@ public function setSet($set) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -244,9 +198,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -256,10 +208,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -273,9 +223,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -285,19 +233,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSet.php b/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSet.php index 3354be0812..65d23be50a 100644 --- a/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSet.php +++ b/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSet.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,43 +27,39 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerJwkUpdateSet Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerJwkUpdateSet implements ModelInterface, ArrayAccess +class SwaggerJwkUpdateSet implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerJwkUpdateSet'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ - 'body' => '\Hydra\SDK\Model\JSONWebKeySet', + 'body' => '\HydraSDK\Model\JSONWebKeySet', 'set' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -71,30 +67,18 @@ class SwaggerJwkUpdateSet implements ModelInterface, ArrayAccess 'set' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -102,9 +86,9 @@ public static function swaggerFormats() 'set' => 'set' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -112,9 +96,9 @@ public static function swaggerFormats() 'set' => 'setSet' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -122,63 +106,34 @@ public static function swaggerFormats() 'set' => 'getSet' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -187,36 +142,39 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['set'] === null) { - $invalidProperties[] = "'set' can't be null"; + $invalid_properties[] = "'set' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['set'] === null) { + return false; + } + return true; } /** * Gets body - * - * @return \Hydra\SDK\Model\JSONWebKeySet + * @return \HydraSDK\Model\JSONWebKeySet */ public function getBody() { @@ -225,9 +183,7 @@ public function getBody() /** * Sets body - * - * @param \Hydra\SDK\Model\JSONWebKeySet $body body - * + * @param \HydraSDK\Model\JSONWebKeySet $body * @return $this */ public function setBody($body) @@ -239,7 +195,6 @@ public function setBody($body) /** * Gets set - * * @return string */ public function getSet() @@ -249,9 +204,7 @@ public function getSet() /** * Sets set - * * @param string $set The set in: path - * * @return $this */ public function setSet($set) @@ -262,9 +215,7 @@ public function setSet($set) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -274,9 +225,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -286,10 +235,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -303,9 +250,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -315,19 +260,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSetKey.php b/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSetKey.php index cb085a0b2f..e4d9801b86 100644 --- a/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSetKey.php +++ b/sdk/php/swagger/lib/Model/SwaggerJwkUpdateSetKey.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,44 +27,40 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerJwkUpdateSetKey Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerJwkUpdateSetKey implements ModelInterface, ArrayAccess +class SwaggerJwkUpdateSetKey implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerJwkUpdateSetKey'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ - 'body' => '\Hydra\SDK\Model\JSONWebKey', + 'body' => '\HydraSDK\Model\JSONWebKey', 'kid' => 'string', 'set' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -73,30 +69,18 @@ class SwaggerJwkUpdateSetKey implements ModelInterface, ArrayAccess 'set' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -105,9 +89,9 @@ public static function swaggerFormats() 'set' => 'set' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -116,9 +100,9 @@ public static function swaggerFormats() 'set' => 'setSet' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -127,63 +111,34 @@ public static function swaggerFormats() 'set' => 'getSet' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -193,39 +148,45 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['kid'] === null) { - $invalidProperties[] = "'kid' can't be null"; + $invalid_properties[] = "'kid' can't be null"; } if ($this->container['set'] === null) { - $invalidProperties[] = "'set' can't be null"; + $invalid_properties[] = "'set' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['kid'] === null) { + return false; + } + if ($this->container['set'] === null) { + return false; + } + return true; } /** * Gets body - * - * @return \Hydra\SDK\Model\JSONWebKey + * @return \HydraSDK\Model\JSONWebKey */ public function getBody() { @@ -234,9 +195,7 @@ public function getBody() /** * Sets body - * - * @param \Hydra\SDK\Model\JSONWebKey $body body - * + * @param \HydraSDK\Model\JSONWebKey $body * @return $this */ public function setBody($body) @@ -248,7 +207,6 @@ public function setBody($body) /** * Gets kid - * * @return string */ public function getKid() @@ -258,9 +216,7 @@ public function getKid() /** * Sets kid - * * @param string $kid The kid of the desired key in: path - * * @return $this */ public function setKid($kid) @@ -272,7 +228,6 @@ public function setKid($kid) /** * Gets set - * * @return string */ public function getSet() @@ -282,9 +237,7 @@ public function getSet() /** * Sets set - * * @param string $set The set in: path - * * @return $this */ public function setSet($set) @@ -295,9 +248,7 @@ public function setSet($set) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -307,9 +258,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -319,10 +268,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -336,9 +283,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -348,19 +293,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerNotReadyStatus.php b/sdk/php/swagger/lib/Model/SwaggerNotReadyStatus.php index 3b63759eba..27330eb8c9 100644 --- a/sdk/php/swagger/lib/Model/SwaggerNotReadyStatus.php +++ b/sdk/php/swagger/lib/Model/SwaggerNotReadyStatus.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerNotReadyStatus Class Doc Comment * - * @category Class + * @category Class * @description SwaggerNotReadyStatus swagger not ready status - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerNotReadyStatus implements ModelInterface, ArrayAccess +class SwaggerNotReadyStatus implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerNotReadyStatus'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,118 +60,76 @@ class SwaggerNotReadyStatus implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'errors' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'errors' => 'errors' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'errors' => 'setErrors' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'errors' => 'getErrors' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -182,32 +137,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets errors - * * @return map[string,string] */ public function getErrors() @@ -217,9 +172,7 @@ public function getErrors() /** * Sets errors - * * @param map[string,string] $errors Errors contains a list of errors that caused the not ready status. - * * @return $this */ public function setErrors($errors) @@ -230,9 +183,7 @@ public function setErrors($errors) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -242,9 +193,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -254,10 +203,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -271,9 +218,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -283,19 +228,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerOAuthIntrospectionRequest.php b/sdk/php/swagger/lib/Model/SwaggerOAuthIntrospectionRequest.php index 5b5718e024..62bd928a2d 100644 --- a/sdk/php/swagger/lib/Model/SwaggerOAuthIntrospectionRequest.php +++ b/sdk/php/swagger/lib/Model/SwaggerOAuthIntrospectionRequest.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerOAuthIntrospectionRequest Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @description SwaggerOAuthIntrospectionRequest swagger o auth introspection request + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerOAuthIntrospectionRequest implements ModelInterface, ArrayAccess +class SwaggerOAuthIntrospectionRequest implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerOAuthIntrospectionRequest'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,7 +61,6 @@ class SwaggerOAuthIntrospectionRequest implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -71,30 +68,18 @@ class SwaggerOAuthIntrospectionRequest implements ModelInterface, ArrayAccess 'token' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -102,9 +87,9 @@ public static function swaggerFormats() 'token' => 'token' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -112,9 +97,9 @@ public static function swaggerFormats() 'token' => 'setToken' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -122,63 +107,34 @@ public static function swaggerFormats() 'token' => 'getToken' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -187,35 +143,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['token'] === null) { - $invalidProperties[] = "'token' can't be null"; + $invalid_properties[] = "'token' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['token'] === null) { + return false; + } + return true; } /** * Gets scope - * * @return string */ public function getScope() @@ -225,9 +184,7 @@ public function getScope() /** * Sets scope - * * @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. in: formData - * * @return $this */ public function setScope($scope) @@ -239,7 +196,6 @@ public function setScope($scope) /** * Gets token - * * @return string */ public function getToken() @@ -249,9 +205,7 @@ public function getToken() /** * Sets token - * * @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 [RFC6749], Section 5.1. This endpoint DOES NOT accept refresh tokens for validation. - * * @return $this */ public function setToken($token) @@ -262,9 +216,7 @@ public function setToken($token) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -274,9 +226,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -286,10 +236,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -303,9 +251,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -315,19 +261,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerOAuthTokenResponse.php b/sdk/php/swagger/lib/Model/SwaggerOAuthTokenResponse.php index af32f8b5f1..1510590e40 100644 --- a/sdk/php/swagger/lib/Model/SwaggerOAuthTokenResponse.php +++ b/sdk/php/swagger/lib/Model/SwaggerOAuthTokenResponse.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerOAuthTokenResponse Class Doc Comment * - * @category Class + * @category Class * @description SwaggerOAuthTokenResponse The token response - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerOAuthTokenResponse implements ModelInterface, ArrayAccess +class SwaggerOAuthTokenResponse implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerOAuthTokenResponse'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -68,7 +65,6 @@ class SwaggerOAuthTokenResponse implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -80,30 +76,18 @@ class SwaggerOAuthTokenResponse implements ModelInterface, ArrayAccess 'token_type' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -115,9 +99,9 @@ public static function swaggerFormats() 'token_type' => 'token_type' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -129,9 +113,9 @@ public static function swaggerFormats() 'token_type' => 'setTokenType' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -143,63 +127,34 @@ public static function swaggerFormats() 'token_type' => 'getTokenType' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -212,32 +167,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets access_token - * * @return string */ public function getAccessToken() @@ -247,9 +202,7 @@ public function getAccessToken() /** * Sets access_token - * * @param string $access_token The access token issued by the authorization server. - * * @return $this */ public function setAccessToken($access_token) @@ -261,7 +214,6 @@ public function setAccessToken($access_token) /** * Gets expires_in - * * @return int */ public function getExpiresIn() @@ -271,9 +223,7 @@ public function getExpiresIn() /** * Sets expires_in - * * @param int $expires_in 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 $this */ public function setExpiresIn($expires_in) @@ -285,7 +235,6 @@ public function setExpiresIn($expires_in) /** * Gets id_token - * * @return int */ public function getIdToken() @@ -295,9 +244,7 @@ public function getIdToken() /** * Sets id_token - * * @param int $id_token To retrieve a refresh token request the id_token scope. - * * @return $this */ public function setIdToken($id_token) @@ -309,7 +256,6 @@ public function setIdToken($id_token) /** * Gets refresh_token - * * @return string */ public function getRefreshToken() @@ -319,9 +265,7 @@ public function getRefreshToken() /** * Sets refresh_token - * * @param string $refresh_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. - * * @return $this */ public function setRefreshToken($refresh_token) @@ -333,7 +277,6 @@ public function setRefreshToken($refresh_token) /** * Gets scope - * * @return int */ public function getScope() @@ -343,9 +286,7 @@ public function getScope() /** * Sets scope - * * @param int $scope The scope of the access token - * * @return $this */ public function setScope($scope) @@ -357,7 +298,6 @@ public function setScope($scope) /** * Gets token_type - * * @return string */ public function getTokenType() @@ -367,9 +307,7 @@ public function getTokenType() /** * Sets token_type - * * @param string $token_type The type of the token issued - * * @return $this */ public function setTokenType($token_type) @@ -380,9 +318,7 @@ public function setTokenType($token_type) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -392,9 +328,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -404,10 +338,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -421,9 +353,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -433,19 +363,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerRevokeOAuth2TokenParameters.php b/sdk/php/swagger/lib/Model/SwaggerRevokeOAuth2TokenParameters.php index dbbf230943..01f2004739 100644 --- a/sdk/php/swagger/lib/Model/SwaggerRevokeOAuth2TokenParameters.php +++ b/sdk/php/swagger/lib/Model/SwaggerRevokeOAuth2TokenParameters.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerRevokeOAuth2TokenParameters Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @description SwaggerRevokeOAuth2TokenParameters swagger revoke o auth2 token parameters + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerRevokeOAuth2TokenParameters implements ModelInterface, ArrayAccess +class SwaggerRevokeOAuth2TokenParameters implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerRevokeOAuth2TokenParameters'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +60,76 @@ class SwaggerRevokeOAuth2TokenParameters implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'token' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'token' => 'token' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'token' => 'setToken' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ 'token' => 'getToken' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,35 +137,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['token'] === null) { - $invalidProperties[] = "'token' can't be null"; + $invalid_properties[] = "'token' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['token'] === null) { + return false; + } + return true; } /** * Gets token - * * @return string */ public function getToken() @@ -219,9 +178,7 @@ public function getToken() /** * Sets token - * * @param string $token in: formData - * * @return $this */ public function setToken($token) @@ -232,9 +189,7 @@ public function setToken($token) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -244,9 +199,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -256,10 +209,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -273,9 +224,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -285,19 +234,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggerVersion.php b/sdk/php/swagger/lib/Model/SwaggerVersion.php index e744e2649b..a2f94d1e33 100644 --- a/sdk/php/swagger/lib/Model/SwaggerVersion.php +++ b/sdk/php/swagger/lib/Model/SwaggerVersion.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggerVersion Class Doc Comment * - * @category Class + * @category Class * @description SwaggerVersion swagger version - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggerVersion implements ModelInterface, ArrayAccess +class SwaggerVersion implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggerVersion'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -63,118 +60,76 @@ class SwaggerVersion implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'version' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'version' => 'version' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'version' => 'setVersion' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ '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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -182,32 +137,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets version - * * @return string */ public function getVersion() @@ -217,9 +172,7 @@ public function getVersion() /** * Sets version - * * @param string $version Version is the service's version. - * * @return $this */ public function setVersion($version) @@ -230,9 +183,7 @@ public function setVersion($version) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -242,9 +193,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -254,10 +203,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -271,9 +218,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -283,19 +228,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/Swaggeroauth2TokenParameters.php b/sdk/php/swagger/lib/Model/Swaggeroauth2TokenParameters.php index 3769a95b9a..2ead5f2748 100644 --- a/sdk/php/swagger/lib/Model/Swaggeroauth2TokenParameters.php +++ b/sdk/php/swagger/lib/Model/Swaggeroauth2TokenParameters.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * Swaggeroauth2TokenParameters Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @description Swaggeroauth2TokenParameters swaggeroauth2 token parameters + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class Swaggeroauth2TokenParameters implements ModelInterface, ArrayAccess +class Swaggeroauth2TokenParameters implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggeroauth2TokenParameters'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -65,7 +63,6 @@ class Swaggeroauth2TokenParameters implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -75,30 +72,18 @@ class Swaggeroauth2TokenParameters implements ModelInterface, ArrayAccess 'redirect_uri' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -108,9 +93,9 @@ public static function swaggerFormats() 'redirect_uri' => 'redirect_uri' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -120,9 +105,9 @@ public static function swaggerFormats() 'redirect_uri' => 'setRedirectUri' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -132,63 +117,34 @@ public static function swaggerFormats() 'redirect_uri' => 'getRedirectUri' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -199,35 +155,38 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['grant_type'] === null) { - $invalidProperties[] = "'grant_type' can't be null"; + $invalid_properties[] = "'grant_type' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['grant_type'] === null) { + return false; + } + return true; } /** * Gets client_id - * * @return string */ public function getClientId() @@ -237,9 +196,7 @@ public function getClientId() /** * Sets client_id - * * @param string $client_id in: formData - * * @return $this */ public function setClientId($client_id) @@ -251,7 +208,6 @@ public function setClientId($client_id) /** * Gets code - * * @return string */ public function getCode() @@ -261,9 +217,7 @@ public function getCode() /** * Sets code - * * @param string $code in: formData - * * @return $this */ public function setCode($code) @@ -275,7 +229,6 @@ public function setCode($code) /** * Gets grant_type - * * @return string */ public function getGrantType() @@ -285,9 +238,7 @@ public function getGrantType() /** * Sets grant_type - * * @param string $grant_type in: formData - * * @return $this */ public function setGrantType($grant_type) @@ -299,7 +250,6 @@ public function setGrantType($grant_type) /** * Gets redirect_uri - * * @return string */ public function getRedirectUri() @@ -309,9 +259,7 @@ public function getRedirectUri() /** * Sets redirect_uri - * * @param string $redirect_uri in: formData - * * @return $this */ public function setRedirectUri($redirect_uri) @@ -322,9 +270,7 @@ public function setRedirectUri($redirect_uri) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -334,9 +280,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -346,10 +290,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -363,9 +305,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -375,19 +315,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/Swaggeroauth2TokenResponse.php b/sdk/php/swagger/lib/Model/Swaggeroauth2TokenResponse.php index fd54aaef88..8912f1d61f 100644 --- a/sdk/php/swagger/lib/Model/Swaggeroauth2TokenResponse.php +++ b/sdk/php/swagger/lib/Model/Swaggeroauth2TokenResponse.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * Swaggeroauth2TokenResponse Class Doc Comment * - * @category Class + * @category Class * @description Swaggeroauth2TokenResponse The Access Token Response - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class Swaggeroauth2TokenResponse implements ModelInterface, ArrayAccess +class Swaggeroauth2TokenResponse implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggeroauth2TokenResponse'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -66,7 +63,6 @@ class Swaggeroauth2TokenResponse implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -76,30 +72,18 @@ class Swaggeroauth2TokenResponse implements ModelInterface, ArrayAccess 'redirect_uri' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -109,9 +93,9 @@ public static function swaggerFormats() 'redirect_uri' => 'redirect_uri' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -121,9 +105,9 @@ public static function swaggerFormats() 'redirect_uri' => 'setRedirectUri' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -133,63 +117,34 @@ public static function swaggerFormats() 'redirect_uri' => 'getRedirectUri' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -200,32 +155,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets access_token - * * @return string */ public function getAccessToken() @@ -235,9 +190,7 @@ public function getAccessToken() /** * Sets access_token - * * @param string $access_token access token - * * @return $this */ public function setAccessToken($access_token) @@ -249,7 +202,6 @@ public function setAccessToken($access_token) /** * Gets client_id - * * @return string */ public function getClientId() @@ -259,9 +211,7 @@ public function getClientId() /** * Sets client_id - * * @param string $client_id refresh token - * * @return $this */ public function setClientId($client_id) @@ -273,7 +223,6 @@ public function setClientId($client_id) /** * Gets code - * * @return string */ public function getCode() @@ -283,9 +232,7 @@ public function getCode() /** * Sets code - * * @param string $code token type - * * @return $this */ public function setCode($code) @@ -297,7 +244,6 @@ public function setCode($code) /** * Gets redirect_uri - * * @return string */ public function getRedirectUri() @@ -307,9 +253,7 @@ public function getRedirectUri() /** * Sets redirect_uri - * * @param string $redirect_uri expires in - * * @return $this */ public function setRedirectUri($redirect_uri) @@ -320,9 +264,7 @@ public function setRedirectUri($redirect_uri) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -332,9 +274,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -344,10 +284,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -361,9 +299,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -373,19 +309,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/SwaggeruserinfoResponsePayload.php b/sdk/php/swagger/lib/Model/SwaggeruserinfoResponsePayload.php index f035307236..8f994b6abc 100644 --- a/sdk/php/swagger/lib/Model/SwaggeruserinfoResponsePayload.php +++ b/sdk/php/swagger/lib/Model/SwaggeruserinfoResponsePayload.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * SwaggeruserinfoResponsePayload Class Doc Comment * - * @category Class + * @category Class * @description SwaggeruserinfoResponsePayload The userinfo response - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class SwaggeruserinfoResponsePayload implements ModelInterface, ArrayAccess +class SwaggeruserinfoResponsePayload implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'swaggeruserinfoResponsePayload'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -81,7 +78,6 @@ class SwaggeruserinfoResponsePayload implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -106,30 +102,18 @@ class SwaggeruserinfoResponsePayload implements ModelInterface, ArrayAccess 'zoneinfo' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -154,9 +138,9 @@ public static function swaggerFormats() 'zoneinfo' => 'zoneinfo' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -181,9 +165,9 @@ public static function swaggerFormats() 'zoneinfo' => 'setZoneinfo' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -208,63 +192,34 @@ public static function swaggerFormats() 'zoneinfo' => 'getZoneinfo' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -290,32 +245,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets birthdate - * * @return string */ public function getBirthdate() @@ -325,9 +280,7 @@ public function getBirthdate() /** * Sets birthdate - * * @param string $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. - * * @return $this */ public function setBirthdate($birthdate) @@ -339,7 +292,6 @@ public function setBirthdate($birthdate) /** * Gets email - * * @return string */ public function getEmail() @@ -349,9 +301,7 @@ public function getEmail() /** * Sets email - * * @param string $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. - * * @return $this */ public function setEmail($email) @@ -363,7 +313,6 @@ public function setEmail($email) /** * Gets email_verified - * * @return bool */ public function getEmailVerified() @@ -373,9 +322,7 @@ public function getEmailVerified() /** * Sets email_verified - * * @param bool $email_verified True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. - * * @return $this */ public function setEmailVerified($email_verified) @@ -387,7 +334,6 @@ public function setEmailVerified($email_verified) /** * Gets family_name - * * @return string */ public function getFamilyName() @@ -397,9 +343,7 @@ public function getFamilyName() /** * Sets family_name - * * @param string $family_name Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. - * * @return $this */ public function setFamilyName($family_name) @@ -411,7 +355,6 @@ public function setFamilyName($family_name) /** * Gets gender - * * @return string */ public function getGender() @@ -421,9 +364,7 @@ public function getGender() /** * Sets gender - * * @param string $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. - * * @return $this */ public function setGender($gender) @@ -435,7 +376,6 @@ public function setGender($gender) /** * Gets given_name - * * @return string */ public function getGivenName() @@ -445,9 +385,7 @@ public function getGivenName() /** * Sets given_name - * * @param string $given_name Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. - * * @return $this */ public function setGivenName($given_name) @@ -459,7 +397,6 @@ public function setGivenName($given_name) /** * Gets locale - * * @return string */ public function getLocale() @@ -469,9 +406,7 @@ public function getLocale() /** * Sets locale - * * @param string $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. - * * @return $this */ public function setLocale($locale) @@ -483,7 +418,6 @@ public function setLocale($locale) /** * Gets middle_name - * * @return string */ public function getMiddleName() @@ -493,9 +427,7 @@ public function getMiddleName() /** * Sets middle_name - * * @param string $middle_name Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. - * * @return $this */ public function setMiddleName($middle_name) @@ -507,7 +439,6 @@ public function setMiddleName($middle_name) /** * Gets name - * * @return string */ public function getName() @@ -517,9 +448,7 @@ public function getName() /** * Sets name - * * @param string $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. - * * @return $this */ public function setName($name) @@ -531,7 +460,6 @@ public function setName($name) /** * Gets nickname - * * @return string */ public function getNickname() @@ -541,9 +469,7 @@ public function getNickname() /** * Sets nickname - * * @param string $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. - * * @return $this */ public function setNickname($nickname) @@ -555,7 +481,6 @@ public function setNickname($nickname) /** * Gets phone_number - * * @return string */ public function getPhoneNumber() @@ -565,9 +490,7 @@ public function getPhoneNumber() /** * Sets phone_number - * * @param string $phone_number End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. - * * @return $this */ public function setPhoneNumber($phone_number) @@ -579,7 +502,6 @@ public function setPhoneNumber($phone_number) /** * Gets phone_number_verified - * * @return bool */ public function getPhoneNumberVerified() @@ -589,9 +511,7 @@ public function getPhoneNumberVerified() /** * Sets phone_number_verified - * * @param bool $phone_number_verified True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. - * * @return $this */ public function setPhoneNumberVerified($phone_number_verified) @@ -603,7 +523,6 @@ public function setPhoneNumberVerified($phone_number_verified) /** * Gets picture - * * @return string */ public function getPicture() @@ -613,9 +532,7 @@ public function getPicture() /** * Sets picture - * * @param string $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. - * * @return $this */ public function setPicture($picture) @@ -627,7 +544,6 @@ public function setPicture($picture) /** * Gets preferred_username - * * @return string */ public function getPreferredUsername() @@ -637,9 +553,7 @@ public function getPreferredUsername() /** * Sets preferred_username - * * @param string $preferred_username Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. - * * @return $this */ public function setPreferredUsername($preferred_username) @@ -651,7 +565,6 @@ public function setPreferredUsername($preferred_username) /** * Gets profile - * * @return string */ public function getProfile() @@ -661,9 +574,7 @@ public function getProfile() /** * Sets profile - * * @param string $profile URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. - * * @return $this */ public function setProfile($profile) @@ -675,7 +586,6 @@ public function setProfile($profile) /** * Gets sub - * * @return string */ public function getSub() @@ -685,9 +595,7 @@ public function getSub() /** * Sets sub - * * @param string $sub Subject - Identifier for the End-User at the IssuerURL. - * * @return $this */ public function setSub($sub) @@ -699,7 +607,6 @@ public function setSub($sub) /** * Gets updated_at - * * @return int */ public function getUpdatedAt() @@ -709,9 +616,7 @@ public function getUpdatedAt() /** * Sets updated_at - * * @param int $updated_at Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. - * * @return $this */ public function setUpdatedAt($updated_at) @@ -723,7 +628,6 @@ public function setUpdatedAt($updated_at) /** * Gets website - * * @return string */ public function getWebsite() @@ -733,9 +637,7 @@ public function getWebsite() /** * Sets website - * * @param string $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. - * * @return $this */ public function setWebsite($website) @@ -747,7 +649,6 @@ public function setWebsite($website) /** * Gets zoneinfo - * * @return string */ public function getZoneinfo() @@ -757,9 +658,7 @@ public function getZoneinfo() /** * Sets zoneinfo - * * @param string $zoneinfo String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. - * * @return $this */ public function setZoneinfo($zoneinfo) @@ -770,9 +669,7 @@ public function setZoneinfo($zoneinfo) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -782,9 +679,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -794,10 +689,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -811,9 +704,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -823,19 +714,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/UserinfoResponse.php b/sdk/php/swagger/lib/Model/UserinfoResponse.php index 143021994e..fb503998de 100644 --- a/sdk/php/swagger/lib/Model/UserinfoResponse.php +++ b/sdk/php/swagger/lib/Model/UserinfoResponse.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * UserinfoResponse Class Doc Comment * - * @category Class + * @category Class * @description The userinfo response - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class UserinfoResponse implements ModelInterface, ArrayAccess +class UserinfoResponse implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'userinfoResponse'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -81,7 +78,6 @@ class UserinfoResponse implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -106,30 +102,18 @@ class UserinfoResponse implements ModelInterface, ArrayAccess 'zoneinfo' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -154,9 +138,9 @@ public static function swaggerFormats() 'zoneinfo' => 'zoneinfo' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -181,9 +165,9 @@ public static function swaggerFormats() 'zoneinfo' => 'setZoneinfo' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -208,63 +192,34 @@ public static function swaggerFormats() 'zoneinfo' => 'getZoneinfo' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -290,32 +245,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets birthdate - * * @return string */ public function getBirthdate() @@ -325,9 +280,7 @@ public function getBirthdate() /** * Sets birthdate - * * @param string $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. - * * @return $this */ public function setBirthdate($birthdate) @@ -339,7 +292,6 @@ public function setBirthdate($birthdate) /** * Gets email - * * @return string */ public function getEmail() @@ -349,9 +301,7 @@ public function getEmail() /** * Sets email - * * @param string $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. - * * @return $this */ public function setEmail($email) @@ -363,7 +313,6 @@ public function setEmail($email) /** * Gets email_verified - * * @return bool */ public function getEmailVerified() @@ -373,9 +322,7 @@ public function getEmailVerified() /** * Sets email_verified - * * @param bool $email_verified True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. - * * @return $this */ public function setEmailVerified($email_verified) @@ -387,7 +334,6 @@ public function setEmailVerified($email_verified) /** * Gets family_name - * * @return string */ public function getFamilyName() @@ -397,9 +343,7 @@ public function getFamilyName() /** * Sets family_name - * * @param string $family_name Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. - * * @return $this */ public function setFamilyName($family_name) @@ -411,7 +355,6 @@ public function setFamilyName($family_name) /** * Gets gender - * * @return string */ public function getGender() @@ -421,9 +364,7 @@ public function getGender() /** * Sets gender - * * @param string $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. - * * @return $this */ public function setGender($gender) @@ -435,7 +376,6 @@ public function setGender($gender) /** * Gets given_name - * * @return string */ public function getGivenName() @@ -445,9 +385,7 @@ public function getGivenName() /** * Sets given_name - * * @param string $given_name Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. - * * @return $this */ public function setGivenName($given_name) @@ -459,7 +397,6 @@ public function setGivenName($given_name) /** * Gets locale - * * @return string */ public function getLocale() @@ -469,9 +406,7 @@ public function getLocale() /** * Sets locale - * * @param string $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. - * * @return $this */ public function setLocale($locale) @@ -483,7 +418,6 @@ public function setLocale($locale) /** * Gets middle_name - * * @return string */ public function getMiddleName() @@ -493,9 +427,7 @@ public function getMiddleName() /** * Sets middle_name - * * @param string $middle_name Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. - * * @return $this */ public function setMiddleName($middle_name) @@ -507,7 +439,6 @@ public function setMiddleName($middle_name) /** * Gets name - * * @return string */ public function getName() @@ -517,9 +448,7 @@ public function getName() /** * Sets name - * * @param string $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. - * * @return $this */ public function setName($name) @@ -531,7 +460,6 @@ public function setName($name) /** * Gets nickname - * * @return string */ public function getNickname() @@ -541,9 +469,7 @@ public function getNickname() /** * Sets nickname - * * @param string $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. - * * @return $this */ public function setNickname($nickname) @@ -555,7 +481,6 @@ public function setNickname($nickname) /** * Gets phone_number - * * @return string */ public function getPhoneNumber() @@ -565,9 +490,7 @@ public function getPhoneNumber() /** * Sets phone_number - * * @param string $phone_number End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. - * * @return $this */ public function setPhoneNumber($phone_number) @@ -579,7 +502,6 @@ public function setPhoneNumber($phone_number) /** * Gets phone_number_verified - * * @return bool */ public function getPhoneNumberVerified() @@ -589,9 +511,7 @@ public function getPhoneNumberVerified() /** * Sets phone_number_verified - * * @param bool $phone_number_verified True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. - * * @return $this */ public function setPhoneNumberVerified($phone_number_verified) @@ -603,7 +523,6 @@ public function setPhoneNumberVerified($phone_number_verified) /** * Gets picture - * * @return string */ public function getPicture() @@ -613,9 +532,7 @@ public function getPicture() /** * Sets picture - * * @param string $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. - * * @return $this */ public function setPicture($picture) @@ -627,7 +544,6 @@ public function setPicture($picture) /** * Gets preferred_username - * * @return string */ public function getPreferredUsername() @@ -637,9 +553,7 @@ public function getPreferredUsername() /** * Sets preferred_username - * * @param string $preferred_username Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. - * * @return $this */ public function setPreferredUsername($preferred_username) @@ -651,7 +565,6 @@ public function setPreferredUsername($preferred_username) /** * Gets profile - * * @return string */ public function getProfile() @@ -661,9 +574,7 @@ public function getProfile() /** * Sets profile - * * @param string $profile URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. - * * @return $this */ public function setProfile($profile) @@ -675,7 +586,6 @@ public function setProfile($profile) /** * Gets sub - * * @return string */ public function getSub() @@ -685,9 +595,7 @@ public function getSub() /** * Sets sub - * * @param string $sub Subject - Identifier for the End-User at the IssuerURL. - * * @return $this */ public function setSub($sub) @@ -699,7 +607,6 @@ public function setSub($sub) /** * Gets updated_at - * * @return int */ public function getUpdatedAt() @@ -709,9 +616,7 @@ public function getUpdatedAt() /** * Sets updated_at - * * @param int $updated_at Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. - * * @return $this */ public function setUpdatedAt($updated_at) @@ -723,7 +628,6 @@ public function setUpdatedAt($updated_at) /** * Gets website - * * @return string */ public function getWebsite() @@ -733,9 +637,7 @@ public function getWebsite() /** * Sets website - * * @param string $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. - * * @return $this */ public function setWebsite($website) @@ -747,7 +649,6 @@ public function setWebsite($website) /** * Gets zoneinfo - * * @return string */ public function getZoneinfo() @@ -757,9 +658,7 @@ public function getZoneinfo() /** * Sets zoneinfo - * * @param string $zoneinfo String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. - * * @return $this */ public function setZoneinfo($zoneinfo) @@ -770,9 +669,7 @@ public function setZoneinfo($zoneinfo) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -782,9 +679,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -794,10 +689,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -811,9 +704,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -823,19 +714,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/Version.php b/sdk/php/swagger/lib/Model/Version.php index c243182fab..42dfdfde69 100644 --- a/sdk/php/swagger/lib/Model/Version.php +++ b/sdk/php/swagger/lib/Model/Version.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,33 +27,30 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * Version Class Doc Comment * - * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @category Class + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class Version implements ModelInterface, ArrayAccess +class Version implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'version'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -62,118 +59,76 @@ class Version implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ 'version' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ 'version' => 'version' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ 'version' => 'setVersion' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ '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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -181,32 +136,32 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + return true; } /** * Gets version - * * @return string */ public function getVersion() @@ -216,9 +171,7 @@ public function getVersion() /** * Sets version - * * @param string $version Version is the service's version. - * * @return $this */ public function setVersion($version) @@ -229,9 +182,7 @@ public function setVersion($version) } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -241,9 +192,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -253,10 +202,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -270,9 +217,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -282,19 +227,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/Model/WellKnown.php b/sdk/php/swagger/lib/Model/WellKnown.php index 373e962cfe..355c2b092f 100644 --- a/sdk/php/swagger/lib/Model/WellKnown.php +++ b/sdk/php/swagger/lib/Model/WellKnown.php @@ -5,8 +5,8 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK - * @author Swagger Codegen team + * @package HydraSDK + * @author Swaagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,34 +27,31 @@ * Do not edit the class manually. */ -namespace Hydra\SDK\Model; +namespace HydraSDK\Model; use \ArrayAccess; -use \Hydra\SDK\ObjectSerializer; /** * WellKnown Class Doc Comment * - * @category Class + * @category Class * @description It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - * @package Hydra\SDK - * @author Swagger Codegen team - * @link https://github.com/swagger-api/swagger-codegen + * @package HydraSDK + * @author Swagger Codegen team + * @link https://github.com/swagger-api/swagger-codegen */ -class WellKnown implements ModelInterface, ArrayAccess +class WellKnown implements ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. - * * @var string */ protected static $swaggerModelName = 'wellKnown'; /** * Array of property to type mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerTypes = [ @@ -87,7 +84,6 @@ class WellKnown implements ModelInterface, ArrayAccess /** * Array of property to format mappings. Used for (de)serialization - * * @var string[] */ protected static $swaggerFormats = [ @@ -118,30 +114,18 @@ class WellKnown implements ModelInterface, ArrayAccess 'userinfo_signing_alg_values_supported' => null ]; - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerTypes() { return self::$swaggerTypes; } - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ public static function swaggerFormats() { return self::$swaggerFormats; } /** - * Array of attributes where the key is the local name, - * and the value is the original name - * + * Array of attributes where the key is the local name, and the value is the original name * @var string[] */ protected static $attributeMap = [ @@ -172,9 +156,9 @@ public static function swaggerFormats() 'userinfo_signing_alg_values_supported' => 'userinfo_signing_alg_values_supported' ]; + /** * Array of attributes to setter functions (for deserialization of responses) - * * @var string[] */ protected static $setters = [ @@ -205,9 +189,9 @@ public static function swaggerFormats() 'userinfo_signing_alg_values_supported' => 'setUserinfoSigningAlgValuesSupported' ]; + /** * Array of attributes to getter functions (for serialization of requests) - * * @var string[] */ protected static $getters = [ @@ -238,63 +222,34 @@ public static function swaggerFormats() 'userinfo_signing_alg_values_supported' => 'getUserinfoSigningAlgValuesSupported' ]; - /** - * 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::$swaggerModelName; - } - /** * Associative array for storing property values - * * @var mixed[] */ protected $container = []; /** * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model + * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { @@ -326,53 +281,74 @@ public function __construct(array $data = null) } /** - * Show all the invalid properties with reasons. + * show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { - $invalidProperties = []; + $invalid_properties = []; if ($this->container['authorization_endpoint'] === null) { - $invalidProperties[] = "'authorization_endpoint' can't be null"; + $invalid_properties[] = "'authorization_endpoint' can't be null"; } if ($this->container['id_token_signing_alg_values_supported'] === null) { - $invalidProperties[] = "'id_token_signing_alg_values_supported' can't be null"; + $invalid_properties[] = "'id_token_signing_alg_values_supported' can't be null"; } if ($this->container['issuer'] === null) { - $invalidProperties[] = "'issuer' can't be null"; + $invalid_properties[] = "'issuer' can't be null"; } if ($this->container['jwks_uri'] === null) { - $invalidProperties[] = "'jwks_uri' can't be null"; + $invalid_properties[] = "'jwks_uri' can't be null"; } if ($this->container['response_types_supported'] === null) { - $invalidProperties[] = "'response_types_supported' can't be null"; + $invalid_properties[] = "'response_types_supported' can't be null"; } if ($this->container['subject_types_supported'] === null) { - $invalidProperties[] = "'subject_types_supported' can't be null"; + $invalid_properties[] = "'subject_types_supported' can't be null"; } if ($this->container['token_endpoint'] === null) { - $invalidProperties[] = "'token_endpoint' can't be null"; + $invalid_properties[] = "'token_endpoint' can't be null"; } - return $invalidProperties; + return $invalid_properties; } /** - * Validate all the properties in the model + * 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; + + if ($this->container['authorization_endpoint'] === null) { + return false; + } + if ($this->container['id_token_signing_alg_values_supported'] === null) { + return false; + } + if ($this->container['issuer'] === null) { + return false; + } + if ($this->container['jwks_uri'] === null) { + return false; + } + if ($this->container['response_types_supported'] === null) { + return false; + } + if ($this->container['subject_types_supported'] === null) { + return false; + } + if ($this->container['token_endpoint'] === null) { + return false; + } + return true; } /** * Gets authorization_endpoint - * * @return string */ public function getAuthorizationEndpoint() @@ -382,9 +358,7 @@ public function getAuthorizationEndpoint() /** * Sets authorization_endpoint - * * @param string $authorization_endpoint URL of the OP's OAuth 2.0 Authorization Endpoint. - * * @return $this */ public function setAuthorizationEndpoint($authorization_endpoint) @@ -396,7 +370,6 @@ public function setAuthorizationEndpoint($authorization_endpoint) /** * Gets backchannel_logout_session_supported - * * @return bool */ public function getBackchannelLogoutSessionSupported() @@ -406,9 +379,7 @@ public function getBackchannelLogoutSessionSupported() /** * Sets backchannel_logout_session_supported - * * @param bool $backchannel_logout_session_supported 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 $this */ public function setBackchannelLogoutSessionSupported($backchannel_logout_session_supported) @@ -420,7 +391,6 @@ public function setBackchannelLogoutSessionSupported($backchannel_logout_session /** * Gets backchannel_logout_supported - * * @return bool */ public function getBackchannelLogoutSupported() @@ -430,9 +400,7 @@ public function getBackchannelLogoutSupported() /** * Sets backchannel_logout_supported - * * @param bool $backchannel_logout_supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. - * * @return $this */ public function setBackchannelLogoutSupported($backchannel_logout_supported) @@ -444,7 +412,6 @@ public function setBackchannelLogoutSupported($backchannel_logout_supported) /** * Gets claims_parameter_supported - * * @return bool */ public function getClaimsParameterSupported() @@ -454,9 +421,7 @@ public function getClaimsParameterSupported() /** * Sets claims_parameter_supported - * * @param bool $claims_parameter_supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. - * * @return $this */ public function setClaimsParameterSupported($claims_parameter_supported) @@ -468,7 +433,6 @@ public function setClaimsParameterSupported($claims_parameter_supported) /** * Gets claims_supported - * * @return string[] */ public function getClaimsSupported() @@ -478,9 +442,7 @@ public function getClaimsSupported() /** * Sets claims_supported - * * @param string[] $claims_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. - * * @return $this */ public function setClaimsSupported($claims_supported) @@ -492,7 +454,6 @@ public function setClaimsSupported($claims_supported) /** * Gets end_session_endpoint - * * @return string */ public function getEndSessionEndpoint() @@ -502,9 +463,7 @@ public function getEndSessionEndpoint() /** * Sets end_session_endpoint - * * @param string $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 $this */ public function setEndSessionEndpoint($end_session_endpoint) @@ -516,7 +475,6 @@ public function setEndSessionEndpoint($end_session_endpoint) /** * Gets frontchannel_logout_session_supported - * * @return bool */ public function getFrontchannelLogoutSessionSupported() @@ -526,9 +484,7 @@ public function getFrontchannelLogoutSessionSupported() /** * Sets frontchannel_logout_session_supported - * * @param bool $frontchannel_logout_session_supported 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 $this */ public function setFrontchannelLogoutSessionSupported($frontchannel_logout_session_supported) @@ -540,7 +496,6 @@ public function setFrontchannelLogoutSessionSupported($frontchannel_logout_sessi /** * Gets frontchannel_logout_supported - * * @return bool */ public function getFrontchannelLogoutSupported() @@ -550,9 +505,7 @@ public function getFrontchannelLogoutSupported() /** * Sets frontchannel_logout_supported - * * @param bool $frontchannel_logout_supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. - * * @return $this */ public function setFrontchannelLogoutSupported($frontchannel_logout_supported) @@ -564,7 +517,6 @@ public function setFrontchannelLogoutSupported($frontchannel_logout_supported) /** * Gets grant_types_supported - * * @return string[] */ public function getGrantTypesSupported() @@ -574,9 +526,7 @@ public function getGrantTypesSupported() /** * Sets grant_types_supported - * * @param string[] $grant_types_supported JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. - * * @return $this */ public function setGrantTypesSupported($grant_types_supported) @@ -588,7 +538,6 @@ public function setGrantTypesSupported($grant_types_supported) /** * Gets id_token_signing_alg_values_supported - * * @return string[] */ public function getIdTokenSigningAlgValuesSupported() @@ -598,9 +547,7 @@ public function getIdTokenSigningAlgValuesSupported() /** * Sets id_token_signing_alg_values_supported - * * @param string[] $id_token_signing_alg_values_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. - * * @return $this */ public function setIdTokenSigningAlgValuesSupported($id_token_signing_alg_values_supported) @@ -612,7 +559,6 @@ public function setIdTokenSigningAlgValuesSupported($id_token_signing_alg_values /** * Gets issuer - * * @return string */ public function getIssuer() @@ -622,9 +568,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. - * * @return $this */ public function setIssuer($issuer) @@ -636,7 +580,6 @@ public function setIssuer($issuer) /** * Gets jwks_uri - * * @return string */ public function getJwksUri() @@ -646,9 +589,7 @@ public function getJwksUri() /** * Sets jwks_uri - * * @param string $jwks_uri 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 $this */ public function setJwksUri($jwks_uri) @@ -660,7 +601,6 @@ public function setJwksUri($jwks_uri) /** * Gets registration_endpoint - * * @return string */ public function getRegistrationEndpoint() @@ -670,9 +610,7 @@ public function getRegistrationEndpoint() /** * Sets registration_endpoint - * * @param string $registration_endpoint URL of the OP's Dynamic Client Registration Endpoint. - * * @return $this */ public function setRegistrationEndpoint($registration_endpoint) @@ -684,7 +622,6 @@ public function setRegistrationEndpoint($registration_endpoint) /** * Gets request_parameter_supported - * * @return bool */ public function getRequestParameterSupported() @@ -694,9 +631,7 @@ public function getRequestParameterSupported() /** * Sets request_parameter_supported - * * @param bool $request_parameter_supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. - * * @return $this */ public function setRequestParameterSupported($request_parameter_supported) @@ -708,7 +643,6 @@ public function setRequestParameterSupported($request_parameter_supported) /** * Gets request_uri_parameter_supported - * * @return bool */ public function getRequestUriParameterSupported() @@ -718,9 +652,7 @@ public function getRequestUriParameterSupported() /** * Sets request_uri_parameter_supported - * * @param bool $request_uri_parameter_supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. - * * @return $this */ public function setRequestUriParameterSupported($request_uri_parameter_supported) @@ -732,7 +664,6 @@ public function setRequestUriParameterSupported($request_uri_parameter_supported /** * Gets require_request_uri_registration - * * @return bool */ public function getRequireRequestUriRegistration() @@ -742,9 +673,7 @@ public function getRequireRequestUriRegistration() /** * Sets require_request_uri_registration - * * @param bool $require_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 $this */ public function setRequireRequestUriRegistration($require_request_uri_registration) @@ -756,7 +685,6 @@ public function setRequireRequestUriRegistration($require_request_uri_registrati /** * Gets response_modes_supported - * * @return string[] */ public function getResponseModesSupported() @@ -766,9 +694,7 @@ public function getResponseModesSupported() /** * Sets response_modes_supported - * * @param string[] $response_modes_supported JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. - * * @return $this */ public function setResponseModesSupported($response_modes_supported) @@ -780,7 +706,6 @@ public function setResponseModesSupported($response_modes_supported) /** * Gets response_types_supported - * * @return string[] */ public function getResponseTypesSupported() @@ -790,9 +715,7 @@ public function getResponseTypesSupported() /** * Sets response_types_supported - * * @param string[] $response_types_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. - * * @return $this */ public function setResponseTypesSupported($response_types_supported) @@ -804,7 +727,6 @@ public function setResponseTypesSupported($response_types_supported) /** * Gets revocation_endpoint - * * @return string */ public function getRevocationEndpoint() @@ -814,9 +736,7 @@ public function getRevocationEndpoint() /** * Sets revocation_endpoint - * * @param string $revocation_endpoint URL of the authorization server's OAuth 2.0 revocation endpoint. - * * @return $this */ public function setRevocationEndpoint($revocation_endpoint) @@ -828,7 +748,6 @@ public function setRevocationEndpoint($revocation_endpoint) /** * Gets scopes_supported - * * @return string[] */ public function getScopesSupported() @@ -838,9 +757,7 @@ public function getScopesSupported() /** * Sets scopes_supported - * * @param string[] $scopes_supported 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 $this */ public function setScopesSupported($scopes_supported) @@ -852,7 +769,6 @@ public function setScopesSupported($scopes_supported) /** * Gets subject_types_supported - * * @return string[] */ public function getSubjectTypesSupported() @@ -862,9 +778,7 @@ public function getSubjectTypesSupported() /** * Sets subject_types_supported - * * @param string[] $subject_types_supported JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - * * @return $this */ public function setSubjectTypesSupported($subject_types_supported) @@ -876,7 +790,6 @@ public function setSubjectTypesSupported($subject_types_supported) /** * Gets token_endpoint - * * @return string */ public function getTokenEndpoint() @@ -886,9 +799,7 @@ public function getTokenEndpoint() /** * Sets token_endpoint - * * @param string $token_endpoint URL of the OP's OAuth 2.0 Token Endpoint - * * @return $this */ public function setTokenEndpoint($token_endpoint) @@ -900,7 +811,6 @@ public function setTokenEndpoint($token_endpoint) /** * Gets token_endpoint_auth_methods_supported - * * @return string[] */ public function getTokenEndpointAuthMethodsSupported() @@ -910,9 +820,7 @@ public function getTokenEndpointAuthMethodsSupported() /** * Sets token_endpoint_auth_methods_supported - * * @param string[] $token_endpoint_auth_methods_supported 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 $this */ public function setTokenEndpointAuthMethodsSupported($token_endpoint_auth_methods_supported) @@ -924,7 +832,6 @@ public function setTokenEndpointAuthMethodsSupported($token_endpoint_auth_method /** * Gets userinfo_endpoint - * * @return string */ public function getUserinfoEndpoint() @@ -934,9 +841,7 @@ public function getUserinfoEndpoint() /** * Sets userinfo_endpoint - * * @param string $userinfo_endpoint URL of the OP's UserInfo Endpoint. - * * @return $this */ public function setUserinfoEndpoint($userinfo_endpoint) @@ -948,7 +853,6 @@ public function setUserinfoEndpoint($userinfo_endpoint) /** * Gets userinfo_signing_alg_values_supported - * * @return string[] */ public function getUserinfoSigningAlgValuesSupported() @@ -958,9 +862,7 @@ public function getUserinfoSigningAlgValuesSupported() /** * Sets userinfo_signing_alg_values_supported - * * @param string[] $userinfo_signing_alg_values_supported 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 $this */ public function setUserinfoSigningAlgValuesSupported($userinfo_signing_alg_values_supported) @@ -971,9 +873,7 @@ public function setUserinfoSigningAlgValuesSupported($userinfo_signing_alg_value } /** * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return boolean */ public function offsetExists($offset) @@ -983,9 +883,7 @@ public function offsetExists($offset) /** * Gets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return mixed */ public function offsetGet($offset) @@ -995,10 +893,8 @@ public function offsetGet($offset) /** * Sets value based on offset. - * - * @param integer $offset Offset - * @param mixed $value Value to be set - * + * @param integer $offset Offset + * @param mixed $value Value to be set * @return void */ public function offsetSet($offset, $value) @@ -1012,9 +908,7 @@ public function offsetSet($offset, $value) /** * Unsets offset. - * - * @param integer $offset Offset - * + * @param integer $offset Offset * @return void */ public function offsetUnset($offset) @@ -1024,19 +918,15 @@ public function offsetUnset($offset) /** * Gets the string presentation of the object - * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return json_encode(\HydraSDK\ObjectSerializer::sanitizeForSerialization($this)); } } diff --git a/sdk/php/swagger/lib/ObjectSerializer.php b/sdk/php/swagger/lib/ObjectSerializer.php index dd2d4a1ad6..23cb1284b1 100644 --- a/sdk/php/swagger/lib/ObjectSerializer.php +++ b/sdk/php/swagger/lib/ObjectSerializer.php @@ -5,7 +5,7 @@ * PHP version 5 * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -18,7 +18,7 @@ * OpenAPI spec version: latest * * Generated by: https://github.com/swagger-api/swagger-codegen.git - * Swagger Codegen version: 2.4.5 + * */ /** @@ -27,13 +27,13 @@ * Do not edit the class manually. */ -namespace Hydra\SDK; +namespace HydraSDK; /** * ObjectSerializer Class Doc Comment * * @category Class - * @package Hydra\SDK + * @package HydraSDK * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen */ @@ -65,10 +65,8 @@ public static function sanitizeForSerialization($data, $type = null, $format = n foreach ($data::swaggerTypes() as $property => $swaggerType) { $getter = $data::getters()[$property]; $value = $data->$getter(); - if ($value !== null - && !in_array($swaggerType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true) - && method_exists($swaggerType, 'getAllowableEnumValues') - && !in_array($value, $swaggerType::getAllowableEnumValues(), true)) { + if ($value !== null && method_exists($swaggerType, 'getAllowableEnumValues') + && !in_array($value, $swaggerType::getAllowableEnumValues())) { $imploded = implode("', '", $swaggerType::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$swaggerType', must be one of: '$imploded'"); } @@ -107,9 +105,9 @@ public static function sanitizeFilename($filename) * * @return string the serialized object */ - public static function toPathValue($value) + public function toPathValue($value) { - return rawurlencode(self::toString($value)); + return rawurlencode($this->toString($value)); } /** @@ -122,12 +120,12 @@ public static function toPathValue($value) * * @return string the serialized object */ - public static function toQueryValue($object) + public function toQueryValue($object) { if (is_array($object)) { return implode(',', $object); } else { - return self::toString($object); + return $this->toString($object); } } @@ -140,9 +138,9 @@ public static function toQueryValue($object) * * @return string the header string */ - public static function toHeaderValue($value) + public function toHeaderValue($value) { - return self::toString($value); + return $this->toString($value); } /** @@ -154,12 +152,12 @@ public static function toHeaderValue($value) * * @return string the form string */ - public static function toFormValue($value) + public function toFormValue($value) { if ($value instanceof \SplFileObject) { return $value->getRealPath(); } else { - return self::toString($value); + return $this->toString($value); } } @@ -172,7 +170,7 @@ public static function toFormValue($value) * * @return string the header string */ - public static function toString($value) + public function toString($value) { if ($value instanceof \DateTime) { // datetime in ISO8601 format return $value->format(\DateTime::ATOM); @@ -191,7 +189,7 @@ public static function toString($value) * * @return string */ - public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) + public function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false) { if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) { // http_build_query() almost does the job for us. We just @@ -266,25 +264,22 @@ public static function deserialize($data, $class, $httpHeaders = null) settype($data, $class); return $data; } elseif ($class === '\SplFileObject') { - /** @var \Psr\Http\Message\StreamInterface $data */ - // determine file name if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { - $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . self::sanitizeFilename($match[1]); } else { $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); } - - $file = fopen($filename, 'w'); - while ($chunk = $data->read(200)) { - fwrite($file, $chunk); + $deserialized = new \SplFileObject($filename, "w"); + $byte_written = $deserialized->fwrite($data); + if (Configuration::getDefaultConfiguration()->getDebug()) { + error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.".PHP_EOL, 3, Configuration::getDefaultConfiguration()->getDebugFile()); } - fclose($file); - return new \SplFileObject($filename, 'r'); + return $deserialized; } elseif (method_exists($class, 'getAllowableEnumValues')) { - if (!in_array($data, $class::getAllowableEnumValues(), true)) { + if (!in_array($data, $class::getAllowableEnumValues())) { $imploded = implode("', '", $class::getAllowableEnumValues()); throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); } @@ -293,7 +288,7 @@ public static function deserialize($data, $class, $httpHeaders = null) // If a discriminator is defined and points to a valid subclass, use it. $discriminator = $class::DISCRIMINATOR; if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '\Hydra\SDK\Model\\' . $data->{$discriminator}; + $subclass = '\HydraSDK\Model\\' . $data->{$discriminator}; if (is_subclass_of($subclass, $class)) { $class = $subclass; }