ory-hydra-client 0.0.0.alpha39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +165 -0
  4. data/Rakefile +10 -0
  5. data/docs/AcceptConsentRequest.md +25 -0
  6. data/docs/AcceptLoginRequest.md +27 -0
  7. data/docs/AdminApi.md +1443 -0
  8. data/docs/CompletedRequest.md +17 -0
  9. data/docs/ConsentRequest.md +39 -0
  10. data/docs/ConsentRequestSession.md +19 -0
  11. data/docs/FlushInactiveOAuth2TokensRequest.md +17 -0
  12. data/docs/GenericError.md +23 -0
  13. data/docs/HealthNotReadyStatus.md +17 -0
  14. data/docs/HealthStatus.md +17 -0
  15. data/docs/JSONWebKey.md +49 -0
  16. data/docs/JSONWebKeySet.md +17 -0
  17. data/docs/JsonWebKeySetGeneratorRequest.md +21 -0
  18. data/docs/LoginRequest.md +33 -0
  19. data/docs/LogoutRequest.md +23 -0
  20. data/docs/OAuth2Client.md +79 -0
  21. data/docs/OAuth2TokenIntrospection.md +41 -0
  22. data/docs/Oauth2TokenResponse.md +27 -0
  23. data/docs/OauthTokenResponse.md +27 -0
  24. data/docs/OpenIDConnectContext.md +25 -0
  25. data/docs/PreviousConsentSession.md +27 -0
  26. data/docs/PublicApi.md +398 -0
  27. data/docs/RejectRequest.md +25 -0
  28. data/docs/UserinfoResponse.md +53 -0
  29. data/docs/Version.md +17 -0
  30. data/docs/WellKnown.md +65 -0
  31. data/lib/ory-hydra-client.rb +65 -0
  32. data/lib/ory-hydra-client/api/admin_api.rb +1879 -0
  33. data/lib/ory-hydra-client/api/public_api.rb +498 -0
  34. data/lib/ory-hydra-client/api_client.rb +386 -0
  35. data/lib/ory-hydra-client/api_error.rb +57 -0
  36. data/lib/ory-hydra-client/configuration.rb +255 -0
  37. data/lib/ory-hydra-client/models/accept_consent_request.rb +250 -0
  38. data/lib/ory-hydra-client/models/accept_login_request.rb +264 -0
  39. data/lib/ory-hydra-client/models/completed_request.rb +207 -0
  40. data/lib/ory-hydra-client/models/consent_request.rb +321 -0
  41. data/lib/ory-hydra-client/models/consent_request_session.rb +221 -0
  42. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +207 -0
  43. data/lib/ory-hydra-client/models/generic_error.rb +243 -0
  44. data/lib/ory-hydra-client/models/health_not_ready_status.rb +209 -0
  45. data/lib/ory-hydra-client/models/health_status.rb +207 -0
  46. data/lib/ory-hydra-client/models/json_web_key.rb +377 -0
  47. data/lib/ory-hydra-client/models/json_web_key_set.rb +209 -0
  48. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +242 -0
  49. data/lib/ory-hydra-client/models/login_request.rb +289 -0
  50. data/lib/ory-hydra-client/models/logout_request.rb +237 -0
  51. data/lib/ory-hydra-client/models/o_auth2_client.rb +551 -0
  52. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +337 -0
  53. data/lib/ory-hydra-client/models/oauth2_token_response.rb +252 -0
  54. data/lib/ory-hydra-client/models/oauth_token_response.rb +258 -0
  55. data/lib/ory-hydra-client/models/open_id_connect_context.rb +253 -0
  56. data/lib/ory-hydra-client/models/previous_consent_session.rb +260 -0
  57. data/lib/ory-hydra-client/models/reject_request.rb +242 -0
  58. data/lib/ory-hydra-client/models/userinfo_response.rb +388 -0
  59. data/lib/ory-hydra-client/models/version.rb +207 -0
  60. data/lib/ory-hydra-client/models/well_known.rb +501 -0
  61. data/lib/ory-hydra-client/version.rb +15 -0
  62. data/ory-hydra-client.gemspec +39 -0
  63. data/spec/api/admin_api_spec.rb +395 -0
  64. data/spec/api/public_api_spec.rb +129 -0
  65. data/spec/api_client_spec.rb +226 -0
  66. data/spec/configuration_spec.rb +42 -0
  67. data/spec/models/accept_consent_request_spec.rb +65 -0
  68. data/spec/models/accept_login_request_spec.rb +71 -0
  69. data/spec/models/completed_request_spec.rb +41 -0
  70. data/spec/models/consent_request_session_spec.rb +47 -0
  71. data/spec/models/consent_request_spec.rb +107 -0
  72. data/spec/models/flush_inactive_o_auth2_tokens_request_spec.rb +41 -0
  73. data/spec/models/generic_error_spec.rb +59 -0
  74. data/spec/models/health_not_ready_status_spec.rb +41 -0
  75. data/spec/models/health_status_spec.rb +41 -0
  76. data/spec/models/json_web_key_set_generator_request_spec.rb +53 -0
  77. data/spec/models/json_web_key_set_spec.rb +41 -0
  78. data/spec/models/json_web_key_spec.rb +137 -0
  79. data/spec/models/login_request_spec.rb +89 -0
  80. data/spec/models/logout_request_spec.rb +59 -0
  81. data/spec/models/o_auth2_client_spec.rb +227 -0
  82. data/spec/models/o_auth2_token_introspection_spec.rb +113 -0
  83. data/spec/models/oauth2_token_response_spec.rb +71 -0
  84. data/spec/models/oauth_token_response_spec.rb +71 -0
  85. data/spec/models/open_id_connect_context_spec.rb +65 -0
  86. data/spec/models/previous_consent_session_spec.rb +71 -0
  87. data/spec/models/reject_request_spec.rb +65 -0
  88. data/spec/models/userinfo_response_spec.rb +149 -0
  89. data/spec/models/version_spec.rb +41 -0
  90. data/spec/models/well_known_spec.rb +185 -0
  91. data/spec/spec_helper.rb +111 -0
  92. metadata +223 -0
@@ -0,0 +1,25 @@
1
+ # OryHydraClient::RejectRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **error** | **String** | | [optional]
8
+ **error_debug** | **String** | | [optional]
9
+ **error_description** | **String** | | [optional]
10
+ **error_hint** | **String** | | [optional]
11
+ **status_code** | **Integer** | | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'OryHydraClient'
17
+
18
+ instance = OryHydraClient::RejectRequest.new(error: null,
19
+ error_debug: null,
20
+ error_description: null,
21
+ error_hint: null,
22
+ status_code: null)
23
+ ```
24
+
25
+
@@ -0,0 +1,53 @@
1
+ # OryHydraClient::UserinfoResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **birthdate** | **String** | End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates. | [optional]
8
+ **email** | **String** | End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7. | [optional]
9
+ **email_verified** | **Boolean** | True if the End-User's e-mail address has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this e-mail address was controlled by the End-User at the time the verification was performed. The means by which an e-mail address is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. | [optional]
10
+ **family_name** | **String** | Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters. | [optional]
11
+ **gender** | **String** | End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable. | [optional]
12
+ **given_name** | **String** | Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters. | [optional]
13
+ **locale** | **String** | End-User's locale, represented as a BCP47 [RFC5646] language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1] language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1] country code in uppercase, separated by a dash. For example, en-US or fr-CA. As a compatibility note, some implementations have used an underscore as the separator rather than a dash, for example, en_US; Relying Parties MAY choose to accept this locale syntax as well. | [optional]
14
+ **middle_name** | **String** | Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used. | [optional]
15
+ **name** | **String** | End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences. | [optional]
16
+ **nickname** | **String** | Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael. | [optional]
17
+ **phone_number** | **String** | End-User's preferred telephone number. E.164 [E.164] is RECOMMENDED as the format of this Claim, for example, +1 (425) 555-1212 or +56 (2) 687 2400. If the phone number contains an extension, it is RECOMMENDED that the extension be represented using the RFC 3966 [RFC3966] extension syntax, for example, +1 (604) 555-1234;ext=5678. | [optional]
18
+ **phone_number_verified** | **Boolean** | True if the End-User's phone number has been verified; otherwise false. When this Claim Value is true, this means that the OP took affirmative steps to ensure that this phone number was controlled by the End-User at the time the verification was performed. The means by which a phone number is verified is context-specific, and dependent upon the trust framework or contractual agreements within which the parties are operating. When true, the phone_number Claim MUST be in E.164 format and any extensions MUST be represented in RFC 3966 format. | [optional]
19
+ **picture** | **String** | URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User. | [optional]
20
+ **preferred_username** | **String** | Non-unique shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. | [optional]
21
+ **profile** | **String** | URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. | [optional]
22
+ **sub** | **String** | Subject - Identifier for the End-User at the IssuerURL. | [optional]
23
+ **updated_at** | **Integer** | Time the End-User's information was last updated. Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z as measured in UTC until the date/time. | [optional]
24
+ **website** | **String** | URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with. | [optional]
25
+ **zoneinfo** | **String** | String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. | [optional]
26
+
27
+ ## Code Sample
28
+
29
+ ```ruby
30
+ require 'OryHydraClient'
31
+
32
+ instance = OryHydraClient::UserinfoResponse.new(birthdate: null,
33
+ email: null,
34
+ email_verified: null,
35
+ family_name: null,
36
+ gender: null,
37
+ given_name: null,
38
+ locale: null,
39
+ middle_name: null,
40
+ name: null,
41
+ nickname: null,
42
+ phone_number: null,
43
+ phone_number_verified: null,
44
+ picture: null,
45
+ preferred_username: null,
46
+ profile: null,
47
+ sub: null,
48
+ updated_at: null,
49
+ website: null,
50
+ zoneinfo: null)
51
+ ```
52
+
53
+
data/docs/Version.md ADDED
@@ -0,0 +1,17 @@
1
+ # OryHydraClient::Version
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **version** | **String** | Version is the service's version. | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OryHydraClient'
13
+
14
+ instance = OryHydraClient::Version.new(version: null)
15
+ ```
16
+
17
+
data/docs/WellKnown.md ADDED
@@ -0,0 +1,65 @@
1
+ # OryHydraClient::WellKnown
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **authorization_endpoint** | **String** | URL of the OP's OAuth 2.0 Authorization Endpoint. |
8
+ **backchannel_logout_session_supported** | **Boolean** | Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP | [optional]
9
+ **backchannel_logout_supported** | **Boolean** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional]
10
+ **claims_parameter_supported** | **Boolean** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional]
11
+ **claims_supported** | **Array<String>** | JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list. | [optional]
12
+ **end_session_endpoint** | **String** | URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. | [optional]
13
+ **frontchannel_logout_session_supported** | **Boolean** | Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP. | [optional]
14
+ **frontchannel_logout_supported** | **Boolean** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional]
15
+ **grant_types_supported** | **Array<String>** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional]
16
+ **id_token_signing_alg_values_supported** | **Array<String>** | JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT. |
17
+ **issuer** | **String** | URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL. |
18
+ **jwks_uri** | **String** | URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. |
19
+ **registration_endpoint** | **String** | URL of the OP's Dynamic Client Registration Endpoint. | [optional]
20
+ **request_parameter_supported** | **Boolean** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional]
21
+ **request_uri_parameter_supported** | **Boolean** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional]
22
+ **require_request_uri_registration** | **Boolean** | Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. | [optional]
23
+ **response_modes_supported** | **Array<String>** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional]
24
+ **response_types_supported** | **Array<String>** | JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values. |
25
+ **revocation_endpoint** | **String** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional]
26
+ **scopes_supported** | **Array<String>** | SON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used | [optional]
27
+ **subject_types_supported** | **Array<String>** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. |
28
+ **token_endpoint** | **String** | URL of the OP's OAuth 2.0 Token Endpoint |
29
+ **token_endpoint_auth_methods_supported** | **Array<String>** | JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0 | [optional]
30
+ **userinfo_endpoint** | **String** | URL of the OP's UserInfo Endpoint. | [optional]
31
+ **userinfo_signing_alg_values_supported** | **Array<String>** | JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT]. | [optional]
32
+
33
+ ## Code Sample
34
+
35
+ ```ruby
36
+ require 'OryHydraClient'
37
+
38
+ instance = OryHydraClient::WellKnown.new(authorization_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/auth,
39
+ backchannel_logout_session_supported: null,
40
+ backchannel_logout_supported: null,
41
+ claims_parameter_supported: null,
42
+ claims_supported: null,
43
+ end_session_endpoint: null,
44
+ frontchannel_logout_session_supported: null,
45
+ frontchannel_logout_supported: null,
46
+ grant_types_supported: null,
47
+ id_token_signing_alg_values_supported: null,
48
+ issuer: https://playground.ory.sh/ory-hydra/public/,
49
+ jwks_uri: https://playground.ory.sh/ory-hydra/public/.well-known/jwks.json,
50
+ registration_endpoint: https://playground.ory.sh/ory-hydra/admin/client,
51
+ request_parameter_supported: null,
52
+ request_uri_parameter_supported: null,
53
+ require_request_uri_registration: null,
54
+ response_modes_supported: null,
55
+ response_types_supported: null,
56
+ revocation_endpoint: null,
57
+ scopes_supported: null,
58
+ subject_types_supported: public, pairwise,
59
+ token_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/token,
60
+ token_endpoint_auth_methods_supported: null,
61
+ userinfo_endpoint: null,
62
+ userinfo_signing_alg_values_supported: null)
63
+ ```
64
+
65
+
@@ -0,0 +1,65 @@
1
+ =begin
2
+ #ORY Hydra
3
+
4
+ #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
+
6
+ The version of the OpenAPI document: v0.0.0-alpha.39
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'ory-hydra-client/api_client'
15
+ require 'ory-hydra-client/api_error'
16
+ require 'ory-hydra-client/version'
17
+ require 'ory-hydra-client/configuration'
18
+
19
+ # Models
20
+ require 'ory-hydra-client/models/accept_consent_request'
21
+ require 'ory-hydra-client/models/accept_login_request'
22
+ require 'ory-hydra-client/models/completed_request'
23
+ require 'ory-hydra-client/models/consent_request'
24
+ require 'ory-hydra-client/models/consent_request_session'
25
+ require 'ory-hydra-client/models/flush_inactive_o_auth2_tokens_request'
26
+ require 'ory-hydra-client/models/generic_error'
27
+ require 'ory-hydra-client/models/health_not_ready_status'
28
+ require 'ory-hydra-client/models/health_status'
29
+ require 'ory-hydra-client/models/json_web_key'
30
+ require 'ory-hydra-client/models/json_web_key_set'
31
+ require 'ory-hydra-client/models/json_web_key_set_generator_request'
32
+ require 'ory-hydra-client/models/login_request'
33
+ require 'ory-hydra-client/models/logout_request'
34
+ require 'ory-hydra-client/models/o_auth2_client'
35
+ require 'ory-hydra-client/models/o_auth2_token_introspection'
36
+ require 'ory-hydra-client/models/oauth2_token_response'
37
+ require 'ory-hydra-client/models/oauth_token_response'
38
+ require 'ory-hydra-client/models/open_id_connect_context'
39
+ require 'ory-hydra-client/models/previous_consent_session'
40
+ require 'ory-hydra-client/models/reject_request'
41
+ require 'ory-hydra-client/models/userinfo_response'
42
+ require 'ory-hydra-client/models/version'
43
+ require 'ory-hydra-client/models/well_known'
44
+
45
+ # APIs
46
+ require 'ory-hydra-client/api/admin_api'
47
+ require 'ory-hydra-client/api/public_api'
48
+
49
+ module OryHydraClient
50
+ class << self
51
+ # Customize default settings for the SDK using block.
52
+ # OryHydraClient.configure do |config|
53
+ # config.username = "xxx"
54
+ # config.password = "xxx"
55
+ # end
56
+ # If no block given, return the default Configuration object.
57
+ def configure
58
+ if block_given?
59
+ yield(Configuration.default)
60
+ else
61
+ Configuration.default
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,1879 @@
1
+ =begin
2
+ #ORY Hydra
3
+
4
+ #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
+
6
+ The version of the OpenAPI document: v0.0.0-alpha.39
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module OryHydraClient
16
+ class AdminApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Accept an consent request
23
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.
24
+ # @param consent_challenge [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [AcceptConsentRequest] :body
27
+ # @return [CompletedRequest]
28
+ def accept_consent_request(consent_challenge, opts = {})
29
+ data, _status_code, _headers = accept_consent_request_with_http_info(consent_challenge, opts)
30
+ data
31
+ end
32
+
33
+ # Accept an consent request
34
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\&quot;Application my-dropbox-app wants write access to all your private files\&quot;). The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.
35
+ # @param consent_challenge [String]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [AcceptConsentRequest] :body
38
+ # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers
39
+ def accept_consent_request_with_http_info(consent_challenge, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: AdminApi.accept_consent_request ...'
42
+ end
43
+ # verify the required parameter 'consent_challenge' is set
44
+ if @api_client.config.client_side_validation && consent_challenge.nil?
45
+ fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling AdminApi.accept_consent_request"
46
+ end
47
+ # resource path
48
+ local_var_path = '/oauth2/auth/requests/consent/accept'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'consent_challenge'] = consent_challenge
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
66
+
67
+ # return_type
68
+ return_type = opts[:return_type] || 'CompletedRequest'
69
+
70
+ # auth_names
71
+ auth_names = opts[:auth_names] || []
72
+
73
+ new_options = opts.merge(
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: AdminApi#accept_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Accept an login request
90
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.
91
+ # @param login_challenge [String]
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [AcceptLoginRequest] :body
94
+ # @return [CompletedRequest]
95
+ def accept_login_request(login_challenge, opts = {})
96
+ data, _status_code, _headers = accept_login_request_with_http_info(login_challenge, opts)
97
+ data
98
+ end
99
+
100
+ # Accept an login request
101
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \&quot;identity provider\&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\&quot;show the subject a login screen\&quot;) a subject (in OAuth2 the proper name for subject is \&quot;resource owner\&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject&#39;s ID and if ORY Hydra should remember the subject&#39;s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.
102
+ # @param login_challenge [String]
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [AcceptLoginRequest] :body
105
+ # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers
106
+ def accept_login_request_with_http_info(login_challenge, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug 'Calling API: AdminApi.accept_login_request ...'
109
+ end
110
+ # verify the required parameter 'login_challenge' is set
111
+ if @api_client.config.client_side_validation && login_challenge.nil?
112
+ fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.accept_login_request"
113
+ end
114
+ # resource path
115
+ local_var_path = '/oauth2/auth/requests/login/accept'
116
+
117
+ # query parameters
118
+ query_params = opts[:query_params] || {}
119
+ query_params[:'login_challenge'] = login_challenge
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+ # HTTP header 'Content-Type'
126
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
133
+
134
+ # return_type
135
+ return_type = opts[:return_type] || 'CompletedRequest'
136
+
137
+ # auth_names
138
+ auth_names = opts[:auth_names] || []
139
+
140
+ new_options = opts.merge(
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: AdminApi#accept_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Accept a logout request
157
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to.
158
+ # @param logout_challenge [String]
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [CompletedRequest]
161
+ def accept_logout_request(logout_challenge, opts = {})
162
+ data, _status_code, _headers = accept_logout_request_with_http_info(logout_challenge, opts)
163
+ data
164
+ end
165
+
166
+ # Accept a logout request
167
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to.
168
+ # @param logout_challenge [String]
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers
171
+ def accept_logout_request_with_http_info(logout_challenge, opts = {})
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug 'Calling API: AdminApi.accept_logout_request ...'
174
+ end
175
+ # verify the required parameter 'logout_challenge' is set
176
+ if @api_client.config.client_side_validation && logout_challenge.nil?
177
+ fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.accept_logout_request"
178
+ end
179
+ # resource path
180
+ local_var_path = '/oauth2/auth/requests/logout/accept'
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+ query_params[:'logout_challenge'] = logout_challenge
185
+
186
+ # header parameters
187
+ header_params = opts[:header_params] || {}
188
+ # HTTP header 'Accept' (if needed)
189
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
190
+
191
+ # form parameters
192
+ form_params = opts[:form_params] || {}
193
+
194
+ # http body (model)
195
+ post_body = opts[:body]
196
+
197
+ # return_type
198
+ return_type = opts[:return_type] || 'CompletedRequest'
199
+
200
+ # auth_names
201
+ auth_names = opts[:auth_names] || []
202
+
203
+ new_options = opts.merge(
204
+ :header_params => header_params,
205
+ :query_params => query_params,
206
+ :form_params => form_params,
207
+ :body => post_body,
208
+ :auth_names => auth_names,
209
+ :return_type => return_type
210
+ )
211
+
212
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug "API called: AdminApi#accept_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
215
+ end
216
+ return data, status_code, headers
217
+ end
218
+
219
+ # Generate a new JSON Web Key
220
+ # This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
221
+ # @param set [String] The set
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [JsonWebKeySetGeneratorRequest] :body
224
+ # @return [JSONWebKeySet]
225
+ def create_json_web_key_set(set, opts = {})
226
+ data, _status_code, _headers = create_json_web_key_set_with_http_info(set, opts)
227
+ data
228
+ end
229
+
230
+ # Generate a new JSON Web Key
231
+ # This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
232
+ # @param set [String] The set
233
+ # @param [Hash] opts the optional parameters
234
+ # @option opts [JsonWebKeySetGeneratorRequest] :body
235
+ # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers
236
+ def create_json_web_key_set_with_http_info(set, opts = {})
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug 'Calling API: AdminApi.create_json_web_key_set ...'
239
+ end
240
+ # verify the required parameter 'set' is set
241
+ if @api_client.config.client_side_validation && set.nil?
242
+ fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.create_json_web_key_set"
243
+ end
244
+ # resource path
245
+ local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
246
+
247
+ # query parameters
248
+ query_params = opts[:query_params] || {}
249
+
250
+ # header parameters
251
+ header_params = opts[:header_params] || {}
252
+ # HTTP header 'Accept' (if needed)
253
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
254
+ # HTTP header 'Content-Type'
255
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
262
+
263
+ # return_type
264
+ return_type = opts[:return_type] || 'JSONWebKeySet'
265
+
266
+ # auth_names
267
+ auth_names = opts[:auth_names] || []
268
+
269
+ new_options = opts.merge(
270
+ :header_params => header_params,
271
+ :query_params => query_params,
272
+ :form_params => form_params,
273
+ :body => post_body,
274
+ :auth_names => auth_names,
275
+ :return_type => return_type
276
+ )
277
+
278
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: AdminApi#create_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+
285
+ # Create an OAuth 2.0 client
286
+ # Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The secret will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somwhere safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
287
+ # @param body [OAuth2Client]
288
+ # @param [Hash] opts the optional parameters
289
+ # @return [OAuth2Client]
290
+ def create_o_auth2_client(body, opts = {})
291
+ data, _status_code, _headers = create_o_auth2_client_with_http_info(body, opts)
292
+ data
293
+ end
294
+
295
+ # Create an OAuth 2.0 client
296
+ # Create a new OAuth 2.0 client If you pass &#x60;client_secret&#x60; the secret will be used, otherwise a random secret will be generated. The secret will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somwhere safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
297
+ # @param body [OAuth2Client]
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
300
+ def create_o_auth2_client_with_http_info(body, opts = {})
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: AdminApi.create_o_auth2_client ...'
303
+ end
304
+ # verify the required parameter 'body' is set
305
+ if @api_client.config.client_side_validation && body.nil?
306
+ fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.create_o_auth2_client"
307
+ end
308
+ # resource path
309
+ local_var_path = '/clients'
310
+
311
+ # query parameters
312
+ query_params = opts[:query_params] || {}
313
+
314
+ # header parameters
315
+ header_params = opts[:header_params] || {}
316
+ # HTTP header 'Accept' (if needed)
317
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
318
+ # HTTP header 'Content-Type'
319
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
320
+
321
+ # form parameters
322
+ form_params = opts[:form_params] || {}
323
+
324
+ # http body (model)
325
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
326
+
327
+ # return_type
328
+ return_type = opts[:return_type] || 'OAuth2Client'
329
+
330
+ # auth_names
331
+ auth_names = opts[:auth_names] || []
332
+
333
+ new_options = opts.merge(
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => return_type
340
+ )
341
+
342
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: AdminApi#create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+
349
+ # Delete a JSON Web Key
350
+ # Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
351
+ # @param kid [String] The kid of the desired key
352
+ # @param set [String] The set
353
+ # @param [Hash] opts the optional parameters
354
+ # @return [nil]
355
+ def delete_json_web_key(kid, set, opts = {})
356
+ delete_json_web_key_with_http_info(kid, set, opts)
357
+ nil
358
+ end
359
+
360
+ # Delete a JSON Web Key
361
+ # Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
362
+ # @param kid [String] The kid of the desired key
363
+ # @param set [String] The set
364
+ # @param [Hash] opts the optional parameters
365
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
366
+ def delete_json_web_key_with_http_info(kid, set, opts = {})
367
+ if @api_client.config.debugging
368
+ @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key ...'
369
+ end
370
+ # verify the required parameter 'kid' is set
371
+ if @api_client.config.client_side_validation && kid.nil?
372
+ fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.delete_json_web_key"
373
+ end
374
+ # verify the required parameter 'set' is set
375
+ if @api_client.config.client_side_validation && set.nil?
376
+ fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key"
377
+ end
378
+ # resource path
379
+ local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s))
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+
392
+ # http body (model)
393
+ post_body = opts[:body]
394
+
395
+ # return_type
396
+ return_type = opts[:return_type]
397
+
398
+ # auth_names
399
+ auth_names = opts[:auth_names] || []
400
+
401
+ new_options = opts.merge(
402
+ :header_params => header_params,
403
+ :query_params => query_params,
404
+ :form_params => form_params,
405
+ :body => post_body,
406
+ :auth_names => auth_names,
407
+ :return_type => return_type
408
+ )
409
+
410
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
411
+ if @api_client.config.debugging
412
+ @api_client.config.logger.debug "API called: AdminApi#delete_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
413
+ end
414
+ return data, status_code, headers
415
+ end
416
+
417
+ # Delete a JSON Web Key Set
418
+ # Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
419
+ # @param set [String] The set
420
+ # @param [Hash] opts the optional parameters
421
+ # @return [nil]
422
+ def delete_json_web_key_set(set, opts = {})
423
+ delete_json_web_key_set_with_http_info(set, opts)
424
+ nil
425
+ end
426
+
427
+ # Delete a JSON Web Key Set
428
+ # Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
429
+ # @param set [String] The set
430
+ # @param [Hash] opts the optional parameters
431
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
432
+ def delete_json_web_key_set_with_http_info(set, opts = {})
433
+ if @api_client.config.debugging
434
+ @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key_set ...'
435
+ end
436
+ # verify the required parameter 'set' is set
437
+ if @api_client.config.client_side_validation && set.nil?
438
+ fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key_set"
439
+ end
440
+ # resource path
441
+ local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
442
+
443
+ # query parameters
444
+ query_params = opts[:query_params] || {}
445
+
446
+ # header parameters
447
+ header_params = opts[:header_params] || {}
448
+ # HTTP header 'Accept' (if needed)
449
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
450
+
451
+ # form parameters
452
+ form_params = opts[:form_params] || {}
453
+
454
+ # http body (model)
455
+ post_body = opts[:body]
456
+
457
+ # return_type
458
+ return_type = opts[:return_type]
459
+
460
+ # auth_names
461
+ auth_names = opts[:auth_names] || []
462
+
463
+ new_options = opts.merge(
464
+ :header_params => header_params,
465
+ :query_params => query_params,
466
+ :form_params => form_params,
467
+ :body => post_body,
468
+ :auth_names => auth_names,
469
+ :return_type => return_type
470
+ )
471
+
472
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
473
+ if @api_client.config.debugging
474
+ @api_client.config.logger.debug "API called: AdminApi#delete_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
475
+ end
476
+ return data, status_code, headers
477
+ end
478
+
479
+ # Deletes an OAuth 2.0 Client
480
+ # Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
481
+ # @param id [String] The id of the OAuth 2.0 Client.
482
+ # @param [Hash] opts the optional parameters
483
+ # @return [nil]
484
+ def delete_o_auth2_client(id, opts = {})
485
+ delete_o_auth2_client_with_http_info(id, opts)
486
+ nil
487
+ end
488
+
489
+ # Deletes an OAuth 2.0 Client
490
+ # Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
491
+ # @param id [String] The id of the OAuth 2.0 Client.
492
+ # @param [Hash] opts the optional parameters
493
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
494
+ def delete_o_auth2_client_with_http_info(id, opts = {})
495
+ if @api_client.config.debugging
496
+ @api_client.config.logger.debug 'Calling API: AdminApi.delete_o_auth2_client ...'
497
+ end
498
+ # verify the required parameter 'id' is set
499
+ if @api_client.config.client_side_validation && id.nil?
500
+ fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.delete_o_auth2_client"
501
+ end
502
+ # resource path
503
+ local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
504
+
505
+ # query parameters
506
+ query_params = opts[:query_params] || {}
507
+
508
+ # header parameters
509
+ header_params = opts[:header_params] || {}
510
+ # HTTP header 'Accept' (if needed)
511
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
512
+
513
+ # form parameters
514
+ form_params = opts[:form_params] || {}
515
+
516
+ # http body (model)
517
+ post_body = opts[:body]
518
+
519
+ # return_type
520
+ return_type = opts[:return_type]
521
+
522
+ # auth_names
523
+ auth_names = opts[:auth_names] || []
524
+
525
+ new_options = opts.merge(
526
+ :header_params => header_params,
527
+ :query_params => query_params,
528
+ :form_params => form_params,
529
+ :body => post_body,
530
+ :auth_names => auth_names,
531
+ :return_type => return_type
532
+ )
533
+
534
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
535
+ if @api_client.config.debugging
536
+ @api_client.config.logger.debug "API called: AdminApi#delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
537
+ end
538
+ return data, status_code, headers
539
+ end
540
+
541
+ # Flush Expired OAuth2 Access Tokens
542
+ # This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow.
543
+ # @param [Hash] opts the optional parameters
544
+ # @option opts [FlushInactiveOAuth2TokensRequest] :body
545
+ # @return [nil]
546
+ def flush_inactive_o_auth2_tokens(opts = {})
547
+ flush_inactive_o_auth2_tokens_with_http_info(opts)
548
+ nil
549
+ end
550
+
551
+ # Flush Expired OAuth2 Access Tokens
552
+ # This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow.
553
+ # @param [Hash] opts the optional parameters
554
+ # @option opts [FlushInactiveOAuth2TokensRequest] :body
555
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
556
+ def flush_inactive_o_auth2_tokens_with_http_info(opts = {})
557
+ if @api_client.config.debugging
558
+ @api_client.config.logger.debug 'Calling API: AdminApi.flush_inactive_o_auth2_tokens ...'
559
+ end
560
+ # resource path
561
+ local_var_path = '/oauth2/flush'
562
+
563
+ # query parameters
564
+ query_params = opts[:query_params] || {}
565
+
566
+ # header parameters
567
+ header_params = opts[:header_params] || {}
568
+ # HTTP header 'Accept' (if needed)
569
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
570
+ # HTTP header 'Content-Type'
571
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
572
+
573
+ # form parameters
574
+ form_params = opts[:form_params] || {}
575
+
576
+ # http body (model)
577
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
578
+
579
+ # return_type
580
+ return_type = opts[:return_type]
581
+
582
+ # auth_names
583
+ auth_names = opts[:auth_names] || []
584
+
585
+ new_options = opts.merge(
586
+ :header_params => header_params,
587
+ :query_params => query_params,
588
+ :form_params => form_params,
589
+ :body => post_body,
590
+ :auth_names => auth_names,
591
+ :return_type => return_type
592
+ )
593
+
594
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
595
+ if @api_client.config.debugging
596
+ @api_client.config.logger.debug "API called: AdminApi#flush_inactive_o_auth2_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
597
+ end
598
+ return data, status_code, headers
599
+ end
600
+
601
+ # Get consent request information
602
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.
603
+ # @param consent_challenge [String]
604
+ # @param [Hash] opts the optional parameters
605
+ # @return [ConsentRequest]
606
+ def get_consent_request(consent_challenge, opts = {})
607
+ data, _status_code, _headers = get_consent_request_with_http_info(consent_challenge, opts)
608
+ data
609
+ end
610
+
611
+ # Get consent request information
612
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\&quot;Application my-dropbox-app wants write access to all your private files\&quot;). The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.
613
+ # @param consent_challenge [String]
614
+ # @param [Hash] opts the optional parameters
615
+ # @return [Array<(ConsentRequest, Integer, Hash)>] ConsentRequest data, response status code and response headers
616
+ def get_consent_request_with_http_info(consent_challenge, opts = {})
617
+ if @api_client.config.debugging
618
+ @api_client.config.logger.debug 'Calling API: AdminApi.get_consent_request ...'
619
+ end
620
+ # verify the required parameter 'consent_challenge' is set
621
+ if @api_client.config.client_side_validation && consent_challenge.nil?
622
+ fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling AdminApi.get_consent_request"
623
+ end
624
+ # resource path
625
+ local_var_path = '/oauth2/auth/requests/consent'
626
+
627
+ # query parameters
628
+ query_params = opts[:query_params] || {}
629
+ query_params[:'consent_challenge'] = consent_challenge
630
+
631
+ # header parameters
632
+ header_params = opts[:header_params] || {}
633
+ # HTTP header 'Accept' (if needed)
634
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
635
+
636
+ # form parameters
637
+ form_params = opts[:form_params] || {}
638
+
639
+ # http body (model)
640
+ post_body = opts[:body]
641
+
642
+ # return_type
643
+ return_type = opts[:return_type] || 'ConsentRequest'
644
+
645
+ # auth_names
646
+ auth_names = opts[:auth_names] || []
647
+
648
+ new_options = opts.merge(
649
+ :header_params => header_params,
650
+ :query_params => query_params,
651
+ :form_params => form_params,
652
+ :body => post_body,
653
+ :auth_names => auth_names,
654
+ :return_type => return_type
655
+ )
656
+
657
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
658
+ if @api_client.config.debugging
659
+ @api_client.config.logger.debug "API called: AdminApi#get_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
660
+ end
661
+ return data, status_code, headers
662
+ end
663
+
664
+ # Fetch a JSON Web Key
665
+ # This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
666
+ # @param kid [String] The kid of the desired key
667
+ # @param set [String] The set
668
+ # @param [Hash] opts the optional parameters
669
+ # @return [JSONWebKeySet]
670
+ def get_json_web_key(kid, set, opts = {})
671
+ data, _status_code, _headers = get_json_web_key_with_http_info(kid, set, opts)
672
+ data
673
+ end
674
+
675
+ # Fetch a JSON Web Key
676
+ # This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
677
+ # @param kid [String] The kid of the desired key
678
+ # @param set [String] The set
679
+ # @param [Hash] opts the optional parameters
680
+ # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers
681
+ def get_json_web_key_with_http_info(kid, set, opts = {})
682
+ if @api_client.config.debugging
683
+ @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key ...'
684
+ end
685
+ # verify the required parameter 'kid' is set
686
+ if @api_client.config.client_side_validation && kid.nil?
687
+ fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.get_json_web_key"
688
+ end
689
+ # verify the required parameter 'set' is set
690
+ if @api_client.config.client_side_validation && set.nil?
691
+ fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key"
692
+ end
693
+ # resource path
694
+ local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s))
695
+
696
+ # query parameters
697
+ query_params = opts[:query_params] || {}
698
+
699
+ # header parameters
700
+ header_params = opts[:header_params] || {}
701
+ # HTTP header 'Accept' (if needed)
702
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
703
+
704
+ # form parameters
705
+ form_params = opts[:form_params] || {}
706
+
707
+ # http body (model)
708
+ post_body = opts[:body]
709
+
710
+ # return_type
711
+ return_type = opts[:return_type] || 'JSONWebKeySet'
712
+
713
+ # auth_names
714
+ auth_names = opts[:auth_names] || []
715
+
716
+ new_options = opts.merge(
717
+ :header_params => header_params,
718
+ :query_params => query_params,
719
+ :form_params => form_params,
720
+ :body => post_body,
721
+ :auth_names => auth_names,
722
+ :return_type => return_type
723
+ )
724
+
725
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
726
+ if @api_client.config.debugging
727
+ @api_client.config.logger.debug "API called: AdminApi#get_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
728
+ end
729
+ return data, status_code, headers
730
+ end
731
+
732
+ # Retrieve a JSON Web Key Set
733
+ # This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
734
+ # @param set [String] The set
735
+ # @param [Hash] opts the optional parameters
736
+ # @return [JSONWebKeySet]
737
+ def get_json_web_key_set(set, opts = {})
738
+ data, _status_code, _headers = get_json_web_key_set_with_http_info(set, opts)
739
+ data
740
+ end
741
+
742
+ # Retrieve a JSON Web Key Set
743
+ # This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
744
+ # @param set [String] The set
745
+ # @param [Hash] opts the optional parameters
746
+ # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers
747
+ def get_json_web_key_set_with_http_info(set, opts = {})
748
+ if @api_client.config.debugging
749
+ @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key_set ...'
750
+ end
751
+ # verify the required parameter 'set' is set
752
+ if @api_client.config.client_side_validation && set.nil?
753
+ fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key_set"
754
+ end
755
+ # resource path
756
+ local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
757
+
758
+ # query parameters
759
+ query_params = opts[:query_params] || {}
760
+
761
+ # header parameters
762
+ header_params = opts[:header_params] || {}
763
+ # HTTP header 'Accept' (if needed)
764
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
765
+
766
+ # form parameters
767
+ form_params = opts[:form_params] || {}
768
+
769
+ # http body (model)
770
+ post_body = opts[:body]
771
+
772
+ # return_type
773
+ return_type = opts[:return_type] || 'JSONWebKeySet'
774
+
775
+ # auth_names
776
+ auth_names = opts[:auth_names] || []
777
+
778
+ new_options = opts.merge(
779
+ :header_params => header_params,
780
+ :query_params => query_params,
781
+ :form_params => form_params,
782
+ :body => post_body,
783
+ :auth_names => auth_names,
784
+ :return_type => return_type
785
+ )
786
+
787
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
788
+ if @api_client.config.debugging
789
+ @api_client.config.logger.debug "API called: AdminApi#get_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
790
+ end
791
+ return data, status_code, headers
792
+ end
793
+
794
+ # Get an login request
795
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
796
+ # @param login_challenge [String]
797
+ # @param [Hash] opts the optional parameters
798
+ # @return [LoginRequest]
799
+ def get_login_request(login_challenge, opts = {})
800
+ data, _status_code, _headers = get_login_request_with_http_info(login_challenge, opts)
801
+ data
802
+ end
803
+
804
+ # Get an login request
805
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \&quot;identity provider\&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\&quot;show the subject a login screen\&quot;) a subject (in OAuth2 the proper name for subject is \&quot;resource owner\&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
806
+ # @param login_challenge [String]
807
+ # @param [Hash] opts the optional parameters
808
+ # @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers
809
+ def get_login_request_with_http_info(login_challenge, opts = {})
810
+ if @api_client.config.debugging
811
+ @api_client.config.logger.debug 'Calling API: AdminApi.get_login_request ...'
812
+ end
813
+ # verify the required parameter 'login_challenge' is set
814
+ if @api_client.config.client_side_validation && login_challenge.nil?
815
+ fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.get_login_request"
816
+ end
817
+ # resource path
818
+ local_var_path = '/oauth2/auth/requests/login'
819
+
820
+ # query parameters
821
+ query_params = opts[:query_params] || {}
822
+ query_params[:'login_challenge'] = login_challenge
823
+
824
+ # header parameters
825
+ header_params = opts[:header_params] || {}
826
+ # HTTP header 'Accept' (if needed)
827
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
828
+
829
+ # form parameters
830
+ form_params = opts[:form_params] || {}
831
+
832
+ # http body (model)
833
+ post_body = opts[:body]
834
+
835
+ # return_type
836
+ return_type = opts[:return_type] || 'LoginRequest'
837
+
838
+ # auth_names
839
+ auth_names = opts[:auth_names] || []
840
+
841
+ new_options = opts.merge(
842
+ :header_params => header_params,
843
+ :query_params => query_params,
844
+ :form_params => form_params,
845
+ :body => post_body,
846
+ :auth_names => auth_names,
847
+ :return_type => return_type
848
+ )
849
+
850
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
851
+ if @api_client.config.debugging
852
+ @api_client.config.logger.debug "API called: AdminApi#get_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
853
+ end
854
+ return data, status_code, headers
855
+ end
856
+
857
+ # Get a logout request
858
+ # Use this endpoint to fetch a logout request.
859
+ # @param logout_challenge [String]
860
+ # @param [Hash] opts the optional parameters
861
+ # @return [LogoutRequest]
862
+ def get_logout_request(logout_challenge, opts = {})
863
+ data, _status_code, _headers = get_logout_request_with_http_info(logout_challenge, opts)
864
+ data
865
+ end
866
+
867
+ # Get a logout request
868
+ # Use this endpoint to fetch a logout request.
869
+ # @param logout_challenge [String]
870
+ # @param [Hash] opts the optional parameters
871
+ # @return [Array<(LogoutRequest, Integer, Hash)>] LogoutRequest data, response status code and response headers
872
+ def get_logout_request_with_http_info(logout_challenge, opts = {})
873
+ if @api_client.config.debugging
874
+ @api_client.config.logger.debug 'Calling API: AdminApi.get_logout_request ...'
875
+ end
876
+ # verify the required parameter 'logout_challenge' is set
877
+ if @api_client.config.client_side_validation && logout_challenge.nil?
878
+ fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.get_logout_request"
879
+ end
880
+ # resource path
881
+ local_var_path = '/oauth2/auth/requests/logout'
882
+
883
+ # query parameters
884
+ query_params = opts[:query_params] || {}
885
+ query_params[:'logout_challenge'] = logout_challenge
886
+
887
+ # header parameters
888
+ header_params = opts[:header_params] || {}
889
+ # HTTP header 'Accept' (if needed)
890
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
891
+
892
+ # form parameters
893
+ form_params = opts[:form_params] || {}
894
+
895
+ # http body (model)
896
+ post_body = opts[:body]
897
+
898
+ # return_type
899
+ return_type = opts[:return_type] || 'LogoutRequest'
900
+
901
+ # auth_names
902
+ auth_names = opts[:auth_names] || []
903
+
904
+ new_options = opts.merge(
905
+ :header_params => header_params,
906
+ :query_params => query_params,
907
+ :form_params => form_params,
908
+ :body => post_body,
909
+ :auth_names => auth_names,
910
+ :return_type => return_type
911
+ )
912
+
913
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
914
+ if @api_client.config.debugging
915
+ @api_client.config.logger.debug "API called: AdminApi#get_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
916
+ end
917
+ return data, status_code, headers
918
+ end
919
+
920
+ # Get an OAuth 2.0 Client.
921
+ # Get an OAUth 2.0 client by its ID. This endpoint never returns passwords. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
922
+ # @param id [String] The id of the OAuth 2.0 Client.
923
+ # @param [Hash] opts the optional parameters
924
+ # @return [OAuth2Client]
925
+ def get_o_auth2_client(id, opts = {})
926
+ data, _status_code, _headers = get_o_auth2_client_with_http_info(id, opts)
927
+ data
928
+ end
929
+
930
+ # Get an OAuth 2.0 Client.
931
+ # Get an OAUth 2.0 client by its ID. This endpoint never returns passwords. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
932
+ # @param id [String] The id of the OAuth 2.0 Client.
933
+ # @param [Hash] opts the optional parameters
934
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
935
+ def get_o_auth2_client_with_http_info(id, opts = {})
936
+ if @api_client.config.debugging
937
+ @api_client.config.logger.debug 'Calling API: AdminApi.get_o_auth2_client ...'
938
+ end
939
+ # verify the required parameter 'id' is set
940
+ if @api_client.config.client_side_validation && id.nil?
941
+ fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.get_o_auth2_client"
942
+ end
943
+ # resource path
944
+ local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
945
+
946
+ # query parameters
947
+ query_params = opts[:query_params] || {}
948
+
949
+ # header parameters
950
+ header_params = opts[:header_params] || {}
951
+ # HTTP header 'Accept' (if needed)
952
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
953
+
954
+ # form parameters
955
+ form_params = opts[:form_params] || {}
956
+
957
+ # http body (model)
958
+ post_body = opts[:body]
959
+
960
+ # return_type
961
+ return_type = opts[:return_type] || 'OAuth2Client'
962
+
963
+ # auth_names
964
+ auth_names = opts[:auth_names] || []
965
+
966
+ new_options = opts.merge(
967
+ :header_params => header_params,
968
+ :query_params => query_params,
969
+ :form_params => form_params,
970
+ :body => post_body,
971
+ :auth_names => auth_names,
972
+ :return_type => return_type
973
+ )
974
+
975
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
976
+ if @api_client.config.debugging
977
+ @api_client.config.logger.debug "API called: AdminApi#get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
978
+ end
979
+ return data, status_code, headers
980
+ end
981
+
982
+ # Get service version
983
+ # This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
984
+ # @param [Hash] opts the optional parameters
985
+ # @return [Version]
986
+ def get_version(opts = {})
987
+ data, _status_code, _headers = get_version_with_http_info(opts)
988
+ data
989
+ end
990
+
991
+ # Get service version
992
+ # This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
993
+ # @param [Hash] opts the optional parameters
994
+ # @return [Array<(Version, Integer, Hash)>] Version data, response status code and response headers
995
+ def get_version_with_http_info(opts = {})
996
+ if @api_client.config.debugging
997
+ @api_client.config.logger.debug 'Calling API: AdminApi.get_version ...'
998
+ end
999
+ # resource path
1000
+ local_var_path = '/version'
1001
+
1002
+ # query parameters
1003
+ query_params = opts[:query_params] || {}
1004
+
1005
+ # header parameters
1006
+ header_params = opts[:header_params] || {}
1007
+ # HTTP header 'Accept' (if needed)
1008
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1009
+
1010
+ # form parameters
1011
+ form_params = opts[:form_params] || {}
1012
+
1013
+ # http body (model)
1014
+ post_body = opts[:body]
1015
+
1016
+ # return_type
1017
+ return_type = opts[:return_type] || 'Version'
1018
+
1019
+ # auth_names
1020
+ auth_names = opts[:auth_names] || []
1021
+
1022
+ new_options = opts.merge(
1023
+ :header_params => header_params,
1024
+ :query_params => query_params,
1025
+ :form_params => form_params,
1026
+ :body => post_body,
1027
+ :auth_names => auth_names,
1028
+ :return_type => return_type
1029
+ )
1030
+
1031
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1032
+ if @api_client.config.debugging
1033
+ @api_client.config.logger.debug "API called: AdminApi#get_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1034
+ end
1035
+ return data, status_code, headers
1036
+ end
1037
+
1038
+ # Introspect OAuth2 tokens
1039
+ # The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
1040
+ # @param token [String] The string value of the token. For access tokens, this is the \\\&quot;access_token\\\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\&quot;refresh_token\\\&quot; value returned.
1041
+ # @param [Hash] opts the optional parameters
1042
+ # @option opts [String] :scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
1043
+ # @return [OAuth2TokenIntrospection]
1044
+ def introspect_o_auth2_token(token, opts = {})
1045
+ data, _status_code, _headers = introspect_o_auth2_token_with_http_info(token, opts)
1046
+ data
1047
+ end
1048
+
1049
+ # Introspect OAuth2 tokens
1050
+ # 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 &#x60;accessTokenExtra&#x60; during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
1051
+ # @param token [String] The string value of the token. For access tokens, this is the \\\&quot;access_token\\\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\&quot;refresh_token\\\&quot; value returned.
1052
+ # @param [Hash] opts the optional parameters
1053
+ # @option opts [String] :scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
1054
+ # @return [Array<(OAuth2TokenIntrospection, Integer, Hash)>] OAuth2TokenIntrospection data, response status code and response headers
1055
+ def introspect_o_auth2_token_with_http_info(token, opts = {})
1056
+ if @api_client.config.debugging
1057
+ @api_client.config.logger.debug 'Calling API: AdminApi.introspect_o_auth2_token ...'
1058
+ end
1059
+ # verify the required parameter 'token' is set
1060
+ if @api_client.config.client_side_validation && token.nil?
1061
+ fail ArgumentError, "Missing the required parameter 'token' when calling AdminApi.introspect_o_auth2_token"
1062
+ end
1063
+ # resource path
1064
+ local_var_path = '/oauth2/introspect'
1065
+
1066
+ # query parameters
1067
+ query_params = opts[:query_params] || {}
1068
+
1069
+ # header parameters
1070
+ header_params = opts[:header_params] || {}
1071
+ # HTTP header 'Accept' (if needed)
1072
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1073
+ # HTTP header 'Content-Type'
1074
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
1075
+
1076
+ # form parameters
1077
+ form_params = opts[:form_params] || {}
1078
+ form_params['token'] = token
1079
+ form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?
1080
+
1081
+ # http body (model)
1082
+ post_body = opts[:body]
1083
+
1084
+ # return_type
1085
+ return_type = opts[:return_type] || 'OAuth2TokenIntrospection'
1086
+
1087
+ # auth_names
1088
+ auth_names = opts[:auth_names] || ['basic', 'oauth2']
1089
+
1090
+ new_options = opts.merge(
1091
+ :header_params => header_params,
1092
+ :query_params => query_params,
1093
+ :form_params => form_params,
1094
+ :body => post_body,
1095
+ :auth_names => auth_names,
1096
+ :return_type => return_type
1097
+ )
1098
+
1099
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1100
+ if @api_client.config.debugging
1101
+ @api_client.config.logger.debug "API called: AdminApi#introspect_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1102
+ end
1103
+ return data, status_code, headers
1104
+ end
1105
+
1106
+ # Check alive status
1107
+ # This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
1108
+ # @param [Hash] opts the optional parameters
1109
+ # @return [HealthStatus]
1110
+ def is_instance_alive(opts = {})
1111
+ data, _status_code, _headers = is_instance_alive_with_http_info(opts)
1112
+ data
1113
+ end
1114
+
1115
+ # Check alive status
1116
+ # This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
1117
+ # @param [Hash] opts the optional parameters
1118
+ # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers
1119
+ def is_instance_alive_with_http_info(opts = {})
1120
+ if @api_client.config.debugging
1121
+ @api_client.config.logger.debug 'Calling API: AdminApi.is_instance_alive ...'
1122
+ end
1123
+ # resource path
1124
+ local_var_path = '/health/alive'
1125
+
1126
+ # query parameters
1127
+ query_params = opts[:query_params] || {}
1128
+
1129
+ # header parameters
1130
+ header_params = opts[:header_params] || {}
1131
+ # HTTP header 'Accept' (if needed)
1132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1133
+
1134
+ # form parameters
1135
+ form_params = opts[:form_params] || {}
1136
+
1137
+ # http body (model)
1138
+ post_body = opts[:body]
1139
+
1140
+ # return_type
1141
+ return_type = opts[:return_type] || 'HealthStatus'
1142
+
1143
+ # auth_names
1144
+ auth_names = opts[:auth_names] || []
1145
+
1146
+ new_options = opts.merge(
1147
+ :header_params => header_params,
1148
+ :query_params => query_params,
1149
+ :form_params => form_params,
1150
+ :body => post_body,
1151
+ :auth_names => auth_names,
1152
+ :return_type => return_type
1153
+ )
1154
+
1155
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1156
+ if @api_client.config.debugging
1157
+ @api_client.config.logger.debug "API called: AdminApi#is_instance_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1158
+ end
1159
+ return data, status_code, headers
1160
+ end
1161
+
1162
+ # List OAuth 2.0 Clients
1163
+ # This endpoint lists all clients in the database, and never returns client secrets. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
1164
+ # @param [Hash] opts the optional parameters
1165
+ # @option opts [Integer] :limit The maximum amount of policies returned.
1166
+ # @option opts [Integer] :offset The offset from where to start looking.
1167
+ # @return [Array<OAuth2Client>]
1168
+ def list_o_auth2_clients(opts = {})
1169
+ data, _status_code, _headers = list_o_auth2_clients_with_http_info(opts)
1170
+ data
1171
+ end
1172
+
1173
+ # List OAuth 2.0 Clients
1174
+ # This endpoint lists all clients in the database, and never returns client secrets. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The \&quot;Link\&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;https://hydra-url/admin/clients?limit&#x3D;{limit}&amp;offset&#x3D;{offset}&gt;; rel&#x3D;\&quot;{page}\&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.
1175
+ # @param [Hash] opts the optional parameters
1176
+ # @option opts [Integer] :limit The maximum amount of policies returned.
1177
+ # @option opts [Integer] :offset The offset from where to start looking.
1178
+ # @return [Array<(Array<OAuth2Client>, Integer, Hash)>] Array<OAuth2Client> data, response status code and response headers
1179
+ def list_o_auth2_clients_with_http_info(opts = {})
1180
+ if @api_client.config.debugging
1181
+ @api_client.config.logger.debug 'Calling API: AdminApi.list_o_auth2_clients ...'
1182
+ end
1183
+ # resource path
1184
+ local_var_path = '/clients'
1185
+
1186
+ # query parameters
1187
+ query_params = opts[:query_params] || {}
1188
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1189
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1190
+
1191
+ # header parameters
1192
+ header_params = opts[:header_params] || {}
1193
+ # HTTP header 'Accept' (if needed)
1194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1195
+
1196
+ # form parameters
1197
+ form_params = opts[:form_params] || {}
1198
+
1199
+ # http body (model)
1200
+ post_body = opts[:body]
1201
+
1202
+ # return_type
1203
+ return_type = opts[:return_type] || 'Array<OAuth2Client>'
1204
+
1205
+ # auth_names
1206
+ auth_names = opts[:auth_names] || []
1207
+
1208
+ new_options = opts.merge(
1209
+ :header_params => header_params,
1210
+ :query_params => query_params,
1211
+ :form_params => form_params,
1212
+ :body => post_body,
1213
+ :auth_names => auth_names,
1214
+ :return_type => return_type
1215
+ )
1216
+
1217
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1218
+ if @api_client.config.debugging
1219
+ @api_client.config.logger.debug "API called: AdminApi#list_o_auth2_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1220
+ end
1221
+ return data, status_code, headers
1222
+ end
1223
+
1224
+ # Lists all consent sessions of a subject
1225
+ # This endpoint lists all subject's granted consent sessions, including client and granted scope. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
1226
+ # @param subject [String]
1227
+ # @param [Hash] opts the optional parameters
1228
+ # @return [Array<PreviousConsentSession>]
1229
+ def list_subject_consent_sessions(subject, opts = {})
1230
+ data, _status_code, _headers = list_subject_consent_sessions_with_http_info(subject, opts)
1231
+ data
1232
+ end
1233
+
1234
+ # Lists all consent sessions of a subject
1235
+ # This endpoint lists all subject&#39;s granted consent sessions, including client and granted scope. The \&quot;Link\&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;https://hydra-url/admin/oauth2/auth/sessions/consent?subject&#x3D;{user}&amp;limit&#x3D;{limit}&amp;offset&#x3D;{offset}&gt;; rel&#x3D;\&quot;{page}\&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.
1236
+ # @param subject [String]
1237
+ # @param [Hash] opts the optional parameters
1238
+ # @return [Array<(Array<PreviousConsentSession>, Integer, Hash)>] Array<PreviousConsentSession> data, response status code and response headers
1239
+ def list_subject_consent_sessions_with_http_info(subject, opts = {})
1240
+ if @api_client.config.debugging
1241
+ @api_client.config.logger.debug 'Calling API: AdminApi.list_subject_consent_sessions ...'
1242
+ end
1243
+ # verify the required parameter 'subject' is set
1244
+ if @api_client.config.client_side_validation && subject.nil?
1245
+ fail ArgumentError, "Missing the required parameter 'subject' when calling AdminApi.list_subject_consent_sessions"
1246
+ end
1247
+ # resource path
1248
+ local_var_path = '/oauth2/auth/sessions/consent'
1249
+
1250
+ # query parameters
1251
+ query_params = opts[:query_params] || {}
1252
+ query_params[:'subject'] = subject
1253
+
1254
+ # header parameters
1255
+ header_params = opts[:header_params] || {}
1256
+ # HTTP header 'Accept' (if needed)
1257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1258
+
1259
+ # form parameters
1260
+ form_params = opts[:form_params] || {}
1261
+
1262
+ # http body (model)
1263
+ post_body = opts[:body]
1264
+
1265
+ # return_type
1266
+ return_type = opts[:return_type] || 'Array<PreviousConsentSession>'
1267
+
1268
+ # auth_names
1269
+ auth_names = opts[:auth_names] || []
1270
+
1271
+ new_options = opts.merge(
1272
+ :header_params => header_params,
1273
+ :query_params => query_params,
1274
+ :form_params => form_params,
1275
+ :body => post_body,
1276
+ :auth_names => auth_names,
1277
+ :return_type => return_type
1278
+ )
1279
+
1280
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1281
+ if @api_client.config.debugging
1282
+ @api_client.config.logger.debug "API called: AdminApi#list_subject_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1283
+ end
1284
+ return data, status_code, headers
1285
+ end
1286
+
1287
+ # Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
1288
+ # ``` metadata: annotations: prometheus.io/port: \"4445\" prometheus.io/path: \"/metrics/prometheus\" ```
1289
+ # @param [Hash] opts the optional parameters
1290
+ # @return [nil]
1291
+ def prometheus(opts = {})
1292
+ prometheus_with_http_info(opts)
1293
+ nil
1294
+ end
1295
+
1296
+ # Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so:
1297
+ # &#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: \&quot;4445\&quot; prometheus.io/path: \&quot;/metrics/prometheus\&quot; &#x60;&#x60;&#x60;
1298
+ # @param [Hash] opts the optional parameters
1299
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1300
+ def prometheus_with_http_info(opts = {})
1301
+ if @api_client.config.debugging
1302
+ @api_client.config.logger.debug 'Calling API: AdminApi.prometheus ...'
1303
+ end
1304
+ # resource path
1305
+ local_var_path = '/metrics/prometheus'
1306
+
1307
+ # query parameters
1308
+ query_params = opts[:query_params] || {}
1309
+
1310
+ # header parameters
1311
+ header_params = opts[:header_params] || {}
1312
+
1313
+ # form parameters
1314
+ form_params = opts[:form_params] || {}
1315
+
1316
+ # http body (model)
1317
+ post_body = opts[:body]
1318
+
1319
+ # return_type
1320
+ return_type = opts[:return_type]
1321
+
1322
+ # auth_names
1323
+ auth_names = opts[:auth_names] || []
1324
+
1325
+ new_options = opts.merge(
1326
+ :header_params => header_params,
1327
+ :query_params => query_params,
1328
+ :form_params => form_params,
1329
+ :body => post_body,
1330
+ :auth_names => auth_names,
1331
+ :return_type => return_type
1332
+ )
1333
+
1334
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1335
+ if @api_client.config.debugging
1336
+ @api_client.config.logger.debug "API called: AdminApi#prometheus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1337
+ end
1338
+ return data, status_code, headers
1339
+ end
1340
+
1341
+ # Reject an consent request
1342
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.
1343
+ # @param consent_challenge [String]
1344
+ # @param [Hash] opts the optional parameters
1345
+ # @option opts [RejectRequest] :body
1346
+ # @return [CompletedRequest]
1347
+ def reject_consent_request(consent_challenge, opts = {})
1348
+ data, _status_code, _headers = reject_consent_request_with_http_info(consent_challenge, opts)
1349
+ data
1350
+ end
1351
+
1352
+ # Reject an consent request
1353
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\&quot;Application my-dropbox-app wants write access to all your private files\&quot;). The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.
1354
+ # @param consent_challenge [String]
1355
+ # @param [Hash] opts the optional parameters
1356
+ # @option opts [RejectRequest] :body
1357
+ # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers
1358
+ def reject_consent_request_with_http_info(consent_challenge, opts = {})
1359
+ if @api_client.config.debugging
1360
+ @api_client.config.logger.debug 'Calling API: AdminApi.reject_consent_request ...'
1361
+ end
1362
+ # verify the required parameter 'consent_challenge' is set
1363
+ if @api_client.config.client_side_validation && consent_challenge.nil?
1364
+ fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling AdminApi.reject_consent_request"
1365
+ end
1366
+ # resource path
1367
+ local_var_path = '/oauth2/auth/requests/consent/reject'
1368
+
1369
+ # query parameters
1370
+ query_params = opts[:query_params] || {}
1371
+ query_params[:'consent_challenge'] = consent_challenge
1372
+
1373
+ # header parameters
1374
+ header_params = opts[:header_params] || {}
1375
+ # HTTP header 'Accept' (if needed)
1376
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1377
+ # HTTP header 'Content-Type'
1378
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1379
+
1380
+ # form parameters
1381
+ form_params = opts[:form_params] || {}
1382
+
1383
+ # http body (model)
1384
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
1385
+
1386
+ # return_type
1387
+ return_type = opts[:return_type] || 'CompletedRequest'
1388
+
1389
+ # auth_names
1390
+ auth_names = opts[:auth_names] || []
1391
+
1392
+ new_options = opts.merge(
1393
+ :header_params => header_params,
1394
+ :query_params => query_params,
1395
+ :form_params => form_params,
1396
+ :body => post_body,
1397
+ :auth_names => auth_names,
1398
+ :return_type => return_type
1399
+ )
1400
+
1401
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1402
+ if @api_client.config.debugging
1403
+ @api_client.config.logger.debug "API called: AdminApi#reject_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1404
+ end
1405
+ return data, status_code, headers
1406
+ end
1407
+
1408
+ # Reject a login request
1409
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to.
1410
+ # @param login_challenge [String]
1411
+ # @param [Hash] opts the optional parameters
1412
+ # @option opts [RejectRequest] :body
1413
+ # @return [CompletedRequest]
1414
+ def reject_login_request(login_challenge, opts = {})
1415
+ data, _status_code, _headers = reject_login_request_with_http_info(login_challenge, opts)
1416
+ data
1417
+ end
1418
+
1419
+ # Reject a login request
1420
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \&quot;identity provider\&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\&quot;show the subject a login screen\&quot;) a subject (in OAuth2 the proper name for subject is \&quot;resource owner\&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to.
1421
+ # @param login_challenge [String]
1422
+ # @param [Hash] opts the optional parameters
1423
+ # @option opts [RejectRequest] :body
1424
+ # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers
1425
+ def reject_login_request_with_http_info(login_challenge, opts = {})
1426
+ if @api_client.config.debugging
1427
+ @api_client.config.logger.debug 'Calling API: AdminApi.reject_login_request ...'
1428
+ end
1429
+ # verify the required parameter 'login_challenge' is set
1430
+ if @api_client.config.client_side_validation && login_challenge.nil?
1431
+ fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.reject_login_request"
1432
+ end
1433
+ # resource path
1434
+ local_var_path = '/oauth2/auth/requests/login/reject'
1435
+
1436
+ # query parameters
1437
+ query_params = opts[:query_params] || {}
1438
+ query_params[:'login_challenge'] = login_challenge
1439
+
1440
+ # header parameters
1441
+ header_params = opts[:header_params] || {}
1442
+ # HTTP header 'Accept' (if needed)
1443
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1444
+ # HTTP header 'Content-Type'
1445
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1446
+
1447
+ # form parameters
1448
+ form_params = opts[:form_params] || {}
1449
+
1450
+ # http body (model)
1451
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
1452
+
1453
+ # return_type
1454
+ return_type = opts[:return_type] || 'CompletedRequest'
1455
+
1456
+ # auth_names
1457
+ auth_names = opts[:auth_names] || []
1458
+
1459
+ new_options = opts.merge(
1460
+ :header_params => header_params,
1461
+ :query_params => query_params,
1462
+ :form_params => form_params,
1463
+ :body => post_body,
1464
+ :auth_names => auth_names,
1465
+ :return_type => return_type
1466
+ )
1467
+
1468
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1469
+ if @api_client.config.debugging
1470
+ @api_client.config.logger.debug "API called: AdminApi#reject_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1471
+ end
1472
+ return data, status_code, headers
1473
+ end
1474
+
1475
+ # Reject a logout request
1476
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next.
1477
+ # @param logout_challenge [String]
1478
+ # @param [Hash] opts the optional parameters
1479
+ # @option opts [RejectRequest] :body
1480
+ # @return [nil]
1481
+ def reject_logout_request(logout_challenge, opts = {})
1482
+ reject_logout_request_with_http_info(logout_challenge, opts)
1483
+ nil
1484
+ end
1485
+
1486
+ # Reject a logout request
1487
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next.
1488
+ # @param logout_challenge [String]
1489
+ # @param [Hash] opts the optional parameters
1490
+ # @option opts [RejectRequest] :body
1491
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1492
+ def reject_logout_request_with_http_info(logout_challenge, opts = {})
1493
+ if @api_client.config.debugging
1494
+ @api_client.config.logger.debug 'Calling API: AdminApi.reject_logout_request ...'
1495
+ end
1496
+ # verify the required parameter 'logout_challenge' is set
1497
+ if @api_client.config.client_side_validation && logout_challenge.nil?
1498
+ fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.reject_logout_request"
1499
+ end
1500
+ # resource path
1501
+ local_var_path = '/oauth2/auth/requests/logout/reject'
1502
+
1503
+ # query parameters
1504
+ query_params = opts[:query_params] || {}
1505
+ query_params[:'logout_challenge'] = logout_challenge
1506
+
1507
+ # header parameters
1508
+ header_params = opts[:header_params] || {}
1509
+ # HTTP header 'Accept' (if needed)
1510
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1511
+ # HTTP header 'Content-Type'
1512
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
1513
+
1514
+ # form parameters
1515
+ form_params = opts[:form_params] || {}
1516
+
1517
+ # http body (model)
1518
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
1519
+
1520
+ # return_type
1521
+ return_type = opts[:return_type]
1522
+
1523
+ # auth_names
1524
+ auth_names = opts[:auth_names] || []
1525
+
1526
+ new_options = opts.merge(
1527
+ :header_params => header_params,
1528
+ :query_params => query_params,
1529
+ :form_params => form_params,
1530
+ :body => post_body,
1531
+ :auth_names => auth_names,
1532
+ :return_type => return_type
1533
+ )
1534
+
1535
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1536
+ if @api_client.config.debugging
1537
+ @api_client.config.logger.debug "API called: AdminApi#reject_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1538
+ end
1539
+ return data, status_code, headers
1540
+ end
1541
+
1542
+ # Invalidates all login sessions of a certain user Invalidates a subject's authentication session
1543
+ # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.
1544
+ # @param subject [String]
1545
+ # @param [Hash] opts the optional parameters
1546
+ # @return [nil]
1547
+ def revoke_authentication_session(subject, opts = {})
1548
+ revoke_authentication_session_with_http_info(subject, opts)
1549
+ nil
1550
+ end
1551
+
1552
+ # Invalidates all login sessions of a certain user Invalidates a subject&#39;s authentication session
1553
+ # This endpoint invalidates a subject&#39;s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.
1554
+ # @param subject [String]
1555
+ # @param [Hash] opts the optional parameters
1556
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1557
+ def revoke_authentication_session_with_http_info(subject, opts = {})
1558
+ if @api_client.config.debugging
1559
+ @api_client.config.logger.debug 'Calling API: AdminApi.revoke_authentication_session ...'
1560
+ end
1561
+ # verify the required parameter 'subject' is set
1562
+ if @api_client.config.client_side_validation && subject.nil?
1563
+ fail ArgumentError, "Missing the required parameter 'subject' when calling AdminApi.revoke_authentication_session"
1564
+ end
1565
+ # resource path
1566
+ local_var_path = '/oauth2/auth/sessions/login'
1567
+
1568
+ # query parameters
1569
+ query_params = opts[:query_params] || {}
1570
+ query_params[:'subject'] = subject
1571
+
1572
+ # header parameters
1573
+ header_params = opts[:header_params] || {}
1574
+ # HTTP header 'Accept' (if needed)
1575
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1576
+
1577
+ # form parameters
1578
+ form_params = opts[:form_params] || {}
1579
+
1580
+ # http body (model)
1581
+ post_body = opts[:body]
1582
+
1583
+ # return_type
1584
+ return_type = opts[:return_type]
1585
+
1586
+ # auth_names
1587
+ auth_names = opts[:auth_names] || []
1588
+
1589
+ new_options = opts.merge(
1590
+ :header_params => header_params,
1591
+ :query_params => query_params,
1592
+ :form_params => form_params,
1593
+ :body => post_body,
1594
+ :auth_names => auth_names,
1595
+ :return_type => return_type
1596
+ )
1597
+
1598
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1599
+ if @api_client.config.debugging
1600
+ @api_client.config.logger.debug "API called: AdminApi#revoke_authentication_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1601
+ end
1602
+ return data, status_code, headers
1603
+ end
1604
+
1605
+ # Revokes consent sessions of a subject for a specific OAuth 2.0 Client
1606
+ # This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.
1607
+ # @param subject [String] The subject (Subject) who&#39;s consent sessions should be deleted.
1608
+ # @param [Hash] opts the optional parameters
1609
+ # @option opts [String] :client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID
1610
+ # @return [nil]
1611
+ def revoke_consent_sessions(subject, opts = {})
1612
+ revoke_consent_sessions_with_http_info(subject, opts)
1613
+ nil
1614
+ end
1615
+
1616
+ # Revokes consent sessions of a subject for a specific OAuth 2.0 Client
1617
+ # This endpoint revokes a subject&#39;s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.
1618
+ # @param subject [String] The subject (Subject) who&#39;s consent sessions should be deleted.
1619
+ # @param [Hash] opts the optional parameters
1620
+ # @option opts [String] :client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID
1621
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1622
+ def revoke_consent_sessions_with_http_info(subject, opts = {})
1623
+ if @api_client.config.debugging
1624
+ @api_client.config.logger.debug 'Calling API: AdminApi.revoke_consent_sessions ...'
1625
+ end
1626
+ # verify the required parameter 'subject' is set
1627
+ if @api_client.config.client_side_validation && subject.nil?
1628
+ fail ArgumentError, "Missing the required parameter 'subject' when calling AdminApi.revoke_consent_sessions"
1629
+ end
1630
+ # resource path
1631
+ local_var_path = '/oauth2/auth/sessions/consent'
1632
+
1633
+ # query parameters
1634
+ query_params = opts[:query_params] || {}
1635
+ query_params[:'subject'] = subject
1636
+ query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil?
1637
+
1638
+ # header parameters
1639
+ header_params = opts[:header_params] || {}
1640
+ # HTTP header 'Accept' (if needed)
1641
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1642
+
1643
+ # form parameters
1644
+ form_params = opts[:form_params] || {}
1645
+
1646
+ # http body (model)
1647
+ post_body = opts[:body]
1648
+
1649
+ # return_type
1650
+ return_type = opts[:return_type]
1651
+
1652
+ # auth_names
1653
+ auth_names = opts[:auth_names] || []
1654
+
1655
+ new_options = opts.merge(
1656
+ :header_params => header_params,
1657
+ :query_params => query_params,
1658
+ :form_params => form_params,
1659
+ :body => post_body,
1660
+ :auth_names => auth_names,
1661
+ :return_type => return_type
1662
+ )
1663
+
1664
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1665
+ if @api_client.config.debugging
1666
+ @api_client.config.logger.debug "API called: AdminApi#revoke_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1667
+ end
1668
+ return data, status_code, headers
1669
+ end
1670
+
1671
+ # Update a JSON Web Key
1672
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
1673
+ # @param kid [String] The kid of the desired key
1674
+ # @param set [String] The set
1675
+ # @param [Hash] opts the optional parameters
1676
+ # @option opts [JSONWebKey] :body
1677
+ # @return [JSONWebKey]
1678
+ def update_json_web_key(kid, set, opts = {})
1679
+ data, _status_code, _headers = update_json_web_key_with_http_info(kid, set, opts)
1680
+ data
1681
+ end
1682
+
1683
+ # Update a JSON Web Key
1684
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
1685
+ # @param kid [String] The kid of the desired key
1686
+ # @param set [String] The set
1687
+ # @param [Hash] opts the optional parameters
1688
+ # @option opts [JSONWebKey] :body
1689
+ # @return [Array<(JSONWebKey, Integer, Hash)>] JSONWebKey data, response status code and response headers
1690
+ def update_json_web_key_with_http_info(kid, set, opts = {})
1691
+ if @api_client.config.debugging
1692
+ @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key ...'
1693
+ end
1694
+ # verify the required parameter 'kid' is set
1695
+ if @api_client.config.client_side_validation && kid.nil?
1696
+ fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.update_json_web_key"
1697
+ end
1698
+ # verify the required parameter 'set' is set
1699
+ if @api_client.config.client_side_validation && set.nil?
1700
+ fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key"
1701
+ end
1702
+ # resource path
1703
+ local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s))
1704
+
1705
+ # query parameters
1706
+ query_params = opts[:query_params] || {}
1707
+
1708
+ # header parameters
1709
+ header_params = opts[:header_params] || {}
1710
+ # HTTP header 'Accept' (if needed)
1711
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1712
+ # HTTP header 'Content-Type'
1713
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1714
+
1715
+ # form parameters
1716
+ form_params = opts[:form_params] || {}
1717
+
1718
+ # http body (model)
1719
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
1720
+
1721
+ # return_type
1722
+ return_type = opts[:return_type] || 'JSONWebKey'
1723
+
1724
+ # auth_names
1725
+ auth_names = opts[:auth_names] || []
1726
+
1727
+ new_options = opts.merge(
1728
+ :header_params => header_params,
1729
+ :query_params => query_params,
1730
+ :form_params => form_params,
1731
+ :body => post_body,
1732
+ :auth_names => auth_names,
1733
+ :return_type => return_type
1734
+ )
1735
+
1736
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1737
+ if @api_client.config.debugging
1738
+ @api_client.config.logger.debug "API called: AdminApi#update_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1739
+ end
1740
+ return data, status_code, headers
1741
+ end
1742
+
1743
+ # Update a JSON Web Key Set
1744
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
1745
+ # @param set [String] The set
1746
+ # @param [Hash] opts the optional parameters
1747
+ # @option opts [JSONWebKeySet] :body
1748
+ # @return [JSONWebKeySet]
1749
+ def update_json_web_key_set(set, opts = {})
1750
+ data, _status_code, _headers = update_json_web_key_set_with_http_info(set, opts)
1751
+ data
1752
+ end
1753
+
1754
+ # Update a JSON Web Key Set
1755
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
1756
+ # @param set [String] The set
1757
+ # @param [Hash] opts the optional parameters
1758
+ # @option opts [JSONWebKeySet] :body
1759
+ # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers
1760
+ def update_json_web_key_set_with_http_info(set, opts = {})
1761
+ if @api_client.config.debugging
1762
+ @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key_set ...'
1763
+ end
1764
+ # verify the required parameter 'set' is set
1765
+ if @api_client.config.client_side_validation && set.nil?
1766
+ fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key_set"
1767
+ end
1768
+ # resource path
1769
+ local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
1770
+
1771
+ # query parameters
1772
+ query_params = opts[:query_params] || {}
1773
+
1774
+ # header parameters
1775
+ header_params = opts[:header_params] || {}
1776
+ # HTTP header 'Accept' (if needed)
1777
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1778
+ # HTTP header 'Content-Type'
1779
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1780
+
1781
+ # form parameters
1782
+ form_params = opts[:form_params] || {}
1783
+
1784
+ # http body (model)
1785
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
1786
+
1787
+ # return_type
1788
+ return_type = opts[:return_type] || 'JSONWebKeySet'
1789
+
1790
+ # auth_names
1791
+ auth_names = opts[:auth_names] || []
1792
+
1793
+ new_options = opts.merge(
1794
+ :header_params => header_params,
1795
+ :query_params => query_params,
1796
+ :form_params => form_params,
1797
+ :body => post_body,
1798
+ :auth_names => auth_names,
1799
+ :return_type => return_type
1800
+ )
1801
+
1802
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1803
+ if @api_client.config.debugging
1804
+ @api_client.config.logger.debug "API called: AdminApi#update_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1805
+ end
1806
+ return data, status_code, headers
1807
+ end
1808
+
1809
+ # Update an OAuth 2.0 Client
1810
+ # Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
1811
+ # @param id [String]
1812
+ # @param body [OAuth2Client]
1813
+ # @param [Hash] opts the optional parameters
1814
+ # @return [OAuth2Client]
1815
+ def update_o_auth2_client(id, body, opts = {})
1816
+ data, _status_code, _headers = update_o_auth2_client_with_http_info(id, body, opts)
1817
+ data
1818
+ end
1819
+
1820
+ # Update an OAuth 2.0 Client
1821
+ # Update an existing OAuth 2.0 Client. If you pass &#x60;client_secret&#x60; the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.
1822
+ # @param id [String]
1823
+ # @param body [OAuth2Client]
1824
+ # @param [Hash] opts the optional parameters
1825
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
1826
+ def update_o_auth2_client_with_http_info(id, body, opts = {})
1827
+ if @api_client.config.debugging
1828
+ @api_client.config.logger.debug 'Calling API: AdminApi.update_o_auth2_client ...'
1829
+ end
1830
+ # verify the required parameter 'id' is set
1831
+ if @api_client.config.client_side_validation && id.nil?
1832
+ fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.update_o_auth2_client"
1833
+ end
1834
+ # verify the required parameter 'body' is set
1835
+ if @api_client.config.client_side_validation && body.nil?
1836
+ fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.update_o_auth2_client"
1837
+ end
1838
+ # resource path
1839
+ local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1840
+
1841
+ # query parameters
1842
+ query_params = opts[:query_params] || {}
1843
+
1844
+ # header parameters
1845
+ header_params = opts[:header_params] || {}
1846
+ # HTTP header 'Accept' (if needed)
1847
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1848
+ # HTTP header 'Content-Type'
1849
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1850
+
1851
+ # form parameters
1852
+ form_params = opts[:form_params] || {}
1853
+
1854
+ # http body (model)
1855
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
1856
+
1857
+ # return_type
1858
+ return_type = opts[:return_type] || 'OAuth2Client'
1859
+
1860
+ # auth_names
1861
+ auth_names = opts[:auth_names] || []
1862
+
1863
+ new_options = opts.merge(
1864
+ :header_params => header_params,
1865
+ :query_params => query_params,
1866
+ :form_params => form_params,
1867
+ :body => post_body,
1868
+ :auth_names => auth_names,
1869
+ :return_type => return_type
1870
+ )
1871
+
1872
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1873
+ if @api_client.config.debugging
1874
+ @api_client.config.logger.debug "API called: AdminApi#update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1875
+ end
1876
+ return data, status_code, headers
1877
+ end
1878
+ end
1879
+ end