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
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bab0c4f764bb77dd7606ec35066d047d8fb1778781f97a8a44a32dd0f35dc065
4
+ data.tar.gz: f6b523fd5a0785b0ef8ea70bc22ec865476fbb898515d0bfecb93873b1864f1a
5
+ SHA512:
6
+ metadata.gz: bf9c330bb64a46e50726e095f430a6b4076f715d25c69b9633cc3e457a739892cb42311e6b43bf0300b54f389faf91c611c7ee6b096cf582e848c8ab421ba0b3
7
+ data.tar.gz: 0520dc00fa10679ec5dabdc1aedc4092f561b32388d3867d6e937833e2b8291131f955ffee6e211481c13f16370e7d3de106c36031d02aedf5bfcca1545db3a3
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,165 @@
1
+ # ory-hydra-client
2
+
3
+ OryHydraClient - the Ruby gem for the ORY Hydra
4
+
5
+ Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: v0.0.0-alpha.39
10
+ - Package version: v0.0.0-alpha.39
11
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build ory-hydra-client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./ory-hydra-client-v0.0.0-alpha.39.gem
27
+ ```
28
+
29
+ (for development, run `gem install --dev ./ory-hydra-client-v0.0.0-alpha.39.gem` to install the development dependencies)
30
+
31
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
+
33
+ Finally add this to the Gemfile:
34
+
35
+ gem 'ory-hydra-client', '~> v0.0.0-alpha.39'
36
+
37
+ ### Install from Git
38
+
39
+ If the Ruby gem is hosted at a git repository: https://github.com/ory/sdk, then add the following in the Gemfile:
40
+
41
+ gem 'ory-hydra-client', :git => 'https://github.com/ory/sdk.git'
42
+
43
+ ### Include the Ruby code directly
44
+
45
+ Include the Ruby code directly using `-I` as follows:
46
+
47
+ ```shell
48
+ ruby -Ilib script.rb
49
+ ```
50
+
51
+ ## Getting Started
52
+
53
+ Please follow the [installation](#installation) procedure and then run the following code:
54
+
55
+ ```ruby
56
+ # Load the gem
57
+ require 'ory-hydra-client'
58
+
59
+ api_instance = OryHydraClient::AdminApi.new
60
+ consent_challenge = 'consent_challenge_example' # String |
61
+ opts = {
62
+ body: OryHydraClient::AcceptConsentRequest.new # AcceptConsentRequest |
63
+ }
64
+
65
+ begin
66
+ #Accept an consent request
67
+ result = api_instance.accept_consent_request(consent_challenge, opts)
68
+ p result
69
+ rescue OryHydraClient::ApiError => e
70
+ puts "Exception when calling AdminApi->accept_consent_request: #{e}"
71
+ end
72
+
73
+ ```
74
+
75
+ ## Documentation for API Endpoints
76
+
77
+ All URIs are relative to *http://localhost*
78
+
79
+ Class | Method | HTTP request | Description
80
+ ------------ | ------------- | ------------- | -------------
81
+ *OryHydraClient::AdminApi* | [**accept_consent_request**](docs/AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept an consent request
82
+ *OryHydraClient::AdminApi* | [**accept_login_request**](docs/AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept an login request
83
+ *OryHydraClient::AdminApi* | [**accept_logout_request**](docs/AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a logout request
84
+ *OryHydraClient::AdminApi* | [**create_json_web_key_set**](docs/AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a new JSON Web Key
85
+ *OryHydraClient::AdminApi* | [**create_o_auth2_client**](docs/AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 client
86
+ *OryHydraClient::AdminApi* | [**delete_json_web_key**](docs/AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key
87
+ *OryHydraClient::AdminApi* | [**delete_json_web_key_set**](docs/AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set
88
+ *OryHydraClient::AdminApi* | [**delete_o_auth2_client**](docs/AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client
89
+ *OryHydraClient::AdminApi* | [**flush_inactive_o_auth2_tokens**](docs/AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens
90
+ *OryHydraClient::AdminApi* | [**get_consent_request**](docs/AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get consent request information
91
+ *OryHydraClient::AdminApi* | [**get_json_web_key**](docs/AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key
92
+ *OryHydraClient::AdminApi* | [**get_json_web_key_set**](docs/AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set
93
+ *OryHydraClient::AdminApi* | [**get_login_request**](docs/AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get an login request
94
+ *OryHydraClient::AdminApi* | [**get_logout_request**](docs/AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a logout request
95
+ *OryHydraClient::AdminApi* | [**get_o_auth2_client**](docs/AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client.
96
+ *OryHydraClient::AdminApi* | [**get_version**](docs/AdminApi.md#get_version) | **GET** /version | Get service version
97
+ *OryHydraClient::AdminApi* | [**introspect_o_auth2_token**](docs/AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 tokens
98
+ *OryHydraClient::AdminApi* | [**is_instance_alive**](docs/AdminApi.md#is_instance_alive) | **GET** /health/alive | Check alive status
99
+ *OryHydraClient::AdminApi* | [**list_o_auth2_clients**](docs/AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients
100
+ *OryHydraClient::AdminApi* | [**list_subject_consent_sessions**](docs/AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
101
+ *OryHydraClient::AdminApi* | [**prometheus**](docs/AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
102
+ *OryHydraClient::AdminApi* | [**reject_consent_request**](docs/AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
103
+ *OryHydraClient::AdminApi* | [**reject_login_request**](docs/AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
104
+ *OryHydraClient::AdminApi* | [**reject_logout_request**](docs/AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
105
+ *OryHydraClient::AdminApi* | [**revoke_authentication_session**](docs/AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates all login sessions of a certain user Invalidates a subject's authentication session
106
+ *OryHydraClient::AdminApi* | [**revoke_consent_sessions**](docs/AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes consent sessions of a subject for a specific OAuth 2.0 Client
107
+ *OryHydraClient::AdminApi* | [**update_json_web_key**](docs/AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key
108
+ *OryHydraClient::AdminApi* | [**update_json_web_key_set**](docs/AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set
109
+ *OryHydraClient::AdminApi* | [**update_o_auth2_client**](docs/AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client
110
+ *OryHydraClient::PublicApi* | [**disconnect_user**](docs/PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel enabled Logout
111
+ *OryHydraClient::PublicApi* | [**discover_open_id_configuration**](docs/PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery
112
+ *OryHydraClient::PublicApi* | [**is_instance_ready**](docs/PublicApi.md#is_instance_ready) | **GET** /health/ready | Check readiness status
113
+ *OryHydraClient::PublicApi* | [**oauth2_token**](docs/PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 token endpoint
114
+ *OryHydraClient::PublicApi* | [**oauth_auth**](docs/PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 authorize endpoint
115
+ *OryHydraClient::PublicApi* | [**revoke_o_auth2_token**](docs/PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 tokens
116
+ *OryHydraClient::PublicApi* | [**userinfo**](docs/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo
117
+ *OryHydraClient::PublicApi* | [**well_known**](docs/PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery
118
+
119
+
120
+ ## Documentation for Models
121
+
122
+ - [OryHydraClient::AcceptConsentRequest](docs/AcceptConsentRequest.md)
123
+ - [OryHydraClient::AcceptLoginRequest](docs/AcceptLoginRequest.md)
124
+ - [OryHydraClient::CompletedRequest](docs/CompletedRequest.md)
125
+ - [OryHydraClient::ConsentRequest](docs/ConsentRequest.md)
126
+ - [OryHydraClient::ConsentRequestSession](docs/ConsentRequestSession.md)
127
+ - [OryHydraClient::FlushInactiveOAuth2TokensRequest](docs/FlushInactiveOAuth2TokensRequest.md)
128
+ - [OryHydraClient::GenericError](docs/GenericError.md)
129
+ - [OryHydraClient::HealthNotReadyStatus](docs/HealthNotReadyStatus.md)
130
+ - [OryHydraClient::HealthStatus](docs/HealthStatus.md)
131
+ - [OryHydraClient::JSONWebKey](docs/JSONWebKey.md)
132
+ - [OryHydraClient::JSONWebKeySet](docs/JSONWebKeySet.md)
133
+ - [OryHydraClient::JsonWebKeySetGeneratorRequest](docs/JsonWebKeySetGeneratorRequest.md)
134
+ - [OryHydraClient::LoginRequest](docs/LoginRequest.md)
135
+ - [OryHydraClient::LogoutRequest](docs/LogoutRequest.md)
136
+ - [OryHydraClient::OAuth2Client](docs/OAuth2Client.md)
137
+ - [OryHydraClient::OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md)
138
+ - [OryHydraClient::Oauth2TokenResponse](docs/Oauth2TokenResponse.md)
139
+ - [OryHydraClient::OauthTokenResponse](docs/OauthTokenResponse.md)
140
+ - [OryHydraClient::OpenIDConnectContext](docs/OpenIDConnectContext.md)
141
+ - [OryHydraClient::PreviousConsentSession](docs/PreviousConsentSession.md)
142
+ - [OryHydraClient::RejectRequest](docs/RejectRequest.md)
143
+ - [OryHydraClient::UserinfoResponse](docs/UserinfoResponse.md)
144
+ - [OryHydraClient::Version](docs/Version.md)
145
+ - [OryHydraClient::WellKnown](docs/WellKnown.md)
146
+
147
+
148
+ ## Documentation for Authorization
149
+
150
+
151
+ ### basic
152
+
153
+ - **Type**: HTTP basic authentication
154
+
155
+ ### oauth2
156
+
157
+
158
+ - **Type**: OAuth
159
+ - **Flow**: accessCode
160
+ - **Authorization URL**: /oauth2/auth
161
+ - **Scopes**:
162
+ - offline: A scope required when requesting refresh tokens (alias for `offline`)
163
+ - offline_access: A scope required when requesting refresh tokens
164
+ - openid: Request an OpenID Connect ID Token
165
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,25 @@
1
+ # OryHydraClient::AcceptConsentRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **grant_access_token_audience** | **Array<String>** | GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`. | [optional]
8
+ **grant_scope** | **Array<String>** | GrantScope sets the scope the user authorized the client to use. Should be a subset of `requested_scope`. | [optional]
9
+ **remember** | **Boolean** | Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope. | [optional]
10
+ **remember_for** | **Integer** | RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. | [optional]
11
+ **session** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'OryHydraClient'
17
+
18
+ instance = OryHydraClient::AcceptConsentRequest.new(grant_access_token_audience: null,
19
+ grant_scope: null,
20
+ remember: null,
21
+ remember_for: null,
22
+ session: null)
23
+ ```
24
+
25
+
@@ -0,0 +1,27 @@
1
+ # OryHydraClient::AcceptLoginRequest
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **acr** | **String** | ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication. | [optional]
8
+ **context** | **Hash<String, Object>** | Context is an optional object which can hold arbitrary data. The data will be made available when fetching the consent request under the \"context\" field. This is useful in scenarios where login and consent endpoints share data. | [optional]
9
+ **force_subject_identifier** | **String** | ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. | [optional]
10
+ **remember** | **Boolean** | Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again. | [optional]
11
+ **remember_for** | **Integer** | RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie). | [optional]
12
+ **subject** | **String** | Subject is the user ID of the end-user that authenticated. |
13
+
14
+ ## Code Sample
15
+
16
+ ```ruby
17
+ require 'OryHydraClient'
18
+
19
+ instance = OryHydraClient::AcceptLoginRequest.new(acr: null,
20
+ context: null,
21
+ force_subject_identifier: null,
22
+ remember: null,
23
+ remember_for: null,
24
+ subject: null)
25
+ ```
26
+
27
+
data/docs/AdminApi.md ADDED
@@ -0,0 +1,1443 @@
1
+ # OryHydraClient::AdminApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**accept_consent_request**](AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept an consent request
8
+ [**accept_login_request**](AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept an login request
9
+ [**accept_logout_request**](AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a logout request
10
+ [**create_json_web_key_set**](AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a new JSON Web Key
11
+ [**create_o_auth2_client**](AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 client
12
+ [**delete_json_web_key**](AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key
13
+ [**delete_json_web_key_set**](AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set
14
+ [**delete_o_auth2_client**](AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client
15
+ [**flush_inactive_o_auth2_tokens**](AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens
16
+ [**get_consent_request**](AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get consent request information
17
+ [**get_json_web_key**](AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key
18
+ [**get_json_web_key_set**](AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set
19
+ [**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get an login request
20
+ [**get_logout_request**](AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a logout request
21
+ [**get_o_auth2_client**](AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client.
22
+ [**get_version**](AdminApi.md#get_version) | **GET** /version | Get service version
23
+ [**introspect_o_auth2_token**](AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 tokens
24
+ [**is_instance_alive**](AdminApi.md#is_instance_alive) | **GET** /health/alive | Check alive status
25
+ [**list_o_auth2_clients**](AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients
26
+ [**list_subject_consent_sessions**](AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
27
+ [**prometheus**](AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
28
+ [**reject_consent_request**](AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject an consent request
29
+ [**reject_login_request**](AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
30
+ [**reject_logout_request**](AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
31
+ [**revoke_authentication_session**](AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates all login sessions of a certain user Invalidates a subject's authentication session
32
+ [**revoke_consent_sessions**](AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes consent sessions of a subject for a specific OAuth 2.0 Client
33
+ [**update_json_web_key**](AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key
34
+ [**update_json_web_key_set**](AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set
35
+ [**update_o_auth2_client**](AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client
36
+
37
+
38
+
39
+ ## accept_consent_request
40
+
41
+ > CompletedRequest accept_consent_request(consent_challenge, opts)
42
+
43
+ Accept an consent request
44
+
45
+ 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.
46
+
47
+ ### Example
48
+
49
+ ```ruby
50
+ # load the gem
51
+ require 'ory-hydra-client'
52
+
53
+ api_instance = OryHydraClient::AdminApi.new
54
+ consent_challenge = 'consent_challenge_example' # String |
55
+ opts = {
56
+ body: OryHydraClient::AcceptConsentRequest.new # AcceptConsentRequest |
57
+ }
58
+
59
+ begin
60
+ #Accept an consent request
61
+ result = api_instance.accept_consent_request(consent_challenge, opts)
62
+ p result
63
+ rescue OryHydraClient::ApiError => e
64
+ puts "Exception when calling AdminApi->accept_consent_request: #{e}"
65
+ end
66
+ ```
67
+
68
+ ### Parameters
69
+
70
+
71
+ Name | Type | Description | Notes
72
+ ------------- | ------------- | ------------- | -------------
73
+ **consent_challenge** | **String**| |
74
+ **body** | [**AcceptConsentRequest**](AcceptConsentRequest.md)| | [optional]
75
+
76
+ ### Return type
77
+
78
+ [**CompletedRequest**](CompletedRequest.md)
79
+
80
+ ### Authorization
81
+
82
+ No authorization required
83
+
84
+ ### HTTP request headers
85
+
86
+ - **Content-Type**: application/json
87
+ - **Accept**: application/json
88
+
89
+
90
+ ## accept_login_request
91
+
92
+ > CompletedRequest accept_login_request(login_challenge, opts)
93
+
94
+ Accept an login request
95
+
96
+ 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.
97
+
98
+ ### Example
99
+
100
+ ```ruby
101
+ # load the gem
102
+ require 'ory-hydra-client'
103
+
104
+ api_instance = OryHydraClient::AdminApi.new
105
+ login_challenge = 'login_challenge_example' # String |
106
+ opts = {
107
+ body: OryHydraClient::AcceptLoginRequest.new # AcceptLoginRequest |
108
+ }
109
+
110
+ begin
111
+ #Accept an login request
112
+ result = api_instance.accept_login_request(login_challenge, opts)
113
+ p result
114
+ rescue OryHydraClient::ApiError => e
115
+ puts "Exception when calling AdminApi->accept_login_request: #{e}"
116
+ end
117
+ ```
118
+
119
+ ### Parameters
120
+
121
+
122
+ Name | Type | Description | Notes
123
+ ------------- | ------------- | ------------- | -------------
124
+ **login_challenge** | **String**| |
125
+ **body** | [**AcceptLoginRequest**](AcceptLoginRequest.md)| | [optional]
126
+
127
+ ### Return type
128
+
129
+ [**CompletedRequest**](CompletedRequest.md)
130
+
131
+ ### Authorization
132
+
133
+ No authorization required
134
+
135
+ ### HTTP request headers
136
+
137
+ - **Content-Type**: application/json
138
+ - **Accept**: application/json
139
+
140
+
141
+ ## accept_logout_request
142
+
143
+ > CompletedRequest accept_logout_request(logout_challenge)
144
+
145
+ Accept a logout request
146
+
147
+ 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.
148
+
149
+ ### Example
150
+
151
+ ```ruby
152
+ # load the gem
153
+ require 'ory-hydra-client'
154
+
155
+ api_instance = OryHydraClient::AdminApi.new
156
+ logout_challenge = 'logout_challenge_example' # String |
157
+
158
+ begin
159
+ #Accept a logout request
160
+ result = api_instance.accept_logout_request(logout_challenge)
161
+ p result
162
+ rescue OryHydraClient::ApiError => e
163
+ puts "Exception when calling AdminApi->accept_logout_request: #{e}"
164
+ end
165
+ ```
166
+
167
+ ### Parameters
168
+
169
+
170
+ Name | Type | Description | Notes
171
+ ------------- | ------------- | ------------- | -------------
172
+ **logout_challenge** | **String**| |
173
+
174
+ ### Return type
175
+
176
+ [**CompletedRequest**](CompletedRequest.md)
177
+
178
+ ### Authorization
179
+
180
+ No authorization required
181
+
182
+ ### HTTP request headers
183
+
184
+ - **Content-Type**: Not defined
185
+ - **Accept**: application/json
186
+
187
+
188
+ ## create_json_web_key_set
189
+
190
+ > JSONWebKeySet create_json_web_key_set(set, opts)
191
+
192
+ Generate a new JSON Web Key
193
+
194
+ 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.
195
+
196
+ ### Example
197
+
198
+ ```ruby
199
+ # load the gem
200
+ require 'ory-hydra-client'
201
+
202
+ api_instance = OryHydraClient::AdminApi.new
203
+ set = 'set_example' # String | The set
204
+ opts = {
205
+ body: OryHydraClient::JsonWebKeySetGeneratorRequest.new # JsonWebKeySetGeneratorRequest |
206
+ }
207
+
208
+ begin
209
+ #Generate a new JSON Web Key
210
+ result = api_instance.create_json_web_key_set(set, opts)
211
+ p result
212
+ rescue OryHydraClient::ApiError => e
213
+ puts "Exception when calling AdminApi->create_json_web_key_set: #{e}"
214
+ end
215
+ ```
216
+
217
+ ### Parameters
218
+
219
+
220
+ Name | Type | Description | Notes
221
+ ------------- | ------------- | ------------- | -------------
222
+ **set** | **String**| The set |
223
+ **body** | [**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md)| | [optional]
224
+
225
+ ### Return type
226
+
227
+ [**JSONWebKeySet**](JSONWebKeySet.md)
228
+
229
+ ### Authorization
230
+
231
+ No authorization required
232
+
233
+ ### HTTP request headers
234
+
235
+ - **Content-Type**: application/json
236
+ - **Accept**: application/json
237
+
238
+
239
+ ## create_o_auth2_client
240
+
241
+ > OAuth2Client create_o_auth2_client(body)
242
+
243
+ Create an OAuth 2.0 client
244
+
245
+ 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.
246
+
247
+ ### Example
248
+
249
+ ```ruby
250
+ # load the gem
251
+ require 'ory-hydra-client'
252
+
253
+ api_instance = OryHydraClient::AdminApi.new
254
+ body = OryHydraClient::OAuth2Client.new # OAuth2Client |
255
+
256
+ begin
257
+ #Create an OAuth 2.0 client
258
+ result = api_instance.create_o_auth2_client(body)
259
+ p result
260
+ rescue OryHydraClient::ApiError => e
261
+ puts "Exception when calling AdminApi->create_o_auth2_client: #{e}"
262
+ end
263
+ ```
264
+
265
+ ### Parameters
266
+
267
+
268
+ Name | Type | Description | Notes
269
+ ------------- | ------------- | ------------- | -------------
270
+ **body** | [**OAuth2Client**](OAuth2Client.md)| |
271
+
272
+ ### Return type
273
+
274
+ [**OAuth2Client**](OAuth2Client.md)
275
+
276
+ ### Authorization
277
+
278
+ No authorization required
279
+
280
+ ### HTTP request headers
281
+
282
+ - **Content-Type**: application/json
283
+ - **Accept**: application/json
284
+
285
+
286
+ ## delete_json_web_key
287
+
288
+ > delete_json_web_key(kid, set)
289
+
290
+ Delete a JSON Web Key
291
+
292
+ 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.
293
+
294
+ ### Example
295
+
296
+ ```ruby
297
+ # load the gem
298
+ require 'ory-hydra-client'
299
+
300
+ api_instance = OryHydraClient::AdminApi.new
301
+ kid = 'kid_example' # String | The kid of the desired key
302
+ set = 'set_example' # String | The set
303
+
304
+ begin
305
+ #Delete a JSON Web Key
306
+ api_instance.delete_json_web_key(kid, set)
307
+ rescue OryHydraClient::ApiError => e
308
+ puts "Exception when calling AdminApi->delete_json_web_key: #{e}"
309
+ end
310
+ ```
311
+
312
+ ### Parameters
313
+
314
+
315
+ Name | Type | Description | Notes
316
+ ------------- | ------------- | ------------- | -------------
317
+ **kid** | **String**| The kid of the desired key |
318
+ **set** | **String**| The set |
319
+
320
+ ### Return type
321
+
322
+ nil (empty response body)
323
+
324
+ ### Authorization
325
+
326
+ No authorization required
327
+
328
+ ### HTTP request headers
329
+
330
+ - **Content-Type**: Not defined
331
+ - **Accept**: application/json
332
+
333
+
334
+ ## delete_json_web_key_set
335
+
336
+ > delete_json_web_key_set(set)
337
+
338
+ Delete a JSON Web Key Set
339
+
340
+ 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.
341
+
342
+ ### Example
343
+
344
+ ```ruby
345
+ # load the gem
346
+ require 'ory-hydra-client'
347
+
348
+ api_instance = OryHydraClient::AdminApi.new
349
+ set = 'set_example' # String | The set
350
+
351
+ begin
352
+ #Delete a JSON Web Key Set
353
+ api_instance.delete_json_web_key_set(set)
354
+ rescue OryHydraClient::ApiError => e
355
+ puts "Exception when calling AdminApi->delete_json_web_key_set: #{e}"
356
+ end
357
+ ```
358
+
359
+ ### Parameters
360
+
361
+
362
+ Name | Type | Description | Notes
363
+ ------------- | ------------- | ------------- | -------------
364
+ **set** | **String**| The set |
365
+
366
+ ### Return type
367
+
368
+ nil (empty response body)
369
+
370
+ ### Authorization
371
+
372
+ No authorization required
373
+
374
+ ### HTTP request headers
375
+
376
+ - **Content-Type**: Not defined
377
+ - **Accept**: application/json
378
+
379
+
380
+ ## delete_o_auth2_client
381
+
382
+ > delete_o_auth2_client(id)
383
+
384
+ Deletes an OAuth 2.0 Client
385
+
386
+ 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.
387
+
388
+ ### Example
389
+
390
+ ```ruby
391
+ # load the gem
392
+ require 'ory-hydra-client'
393
+
394
+ api_instance = OryHydraClient::AdminApi.new
395
+ id = 'id_example' # String | The id of the OAuth 2.0 Client.
396
+
397
+ begin
398
+ #Deletes an OAuth 2.0 Client
399
+ api_instance.delete_o_auth2_client(id)
400
+ rescue OryHydraClient::ApiError => e
401
+ puts "Exception when calling AdminApi->delete_o_auth2_client: #{e}"
402
+ end
403
+ ```
404
+
405
+ ### Parameters
406
+
407
+
408
+ Name | Type | Description | Notes
409
+ ------------- | ------------- | ------------- | -------------
410
+ **id** | **String**| The id of the OAuth 2.0 Client. |
411
+
412
+ ### Return type
413
+
414
+ nil (empty response body)
415
+
416
+ ### Authorization
417
+
418
+ No authorization required
419
+
420
+ ### HTTP request headers
421
+
422
+ - **Content-Type**: Not defined
423
+ - **Accept**: application/json
424
+
425
+
426
+ ## flush_inactive_o_auth2_tokens
427
+
428
+ > flush_inactive_o_auth2_tokens(opts)
429
+
430
+ Flush Expired OAuth2 Access Tokens
431
+
432
+ 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.
433
+
434
+ ### Example
435
+
436
+ ```ruby
437
+ # load the gem
438
+ require 'ory-hydra-client'
439
+
440
+ api_instance = OryHydraClient::AdminApi.new
441
+ opts = {
442
+ body: OryHydraClient::FlushInactiveOAuth2TokensRequest.new # FlushInactiveOAuth2TokensRequest |
443
+ }
444
+
445
+ begin
446
+ #Flush Expired OAuth2 Access Tokens
447
+ api_instance.flush_inactive_o_auth2_tokens(opts)
448
+ rescue OryHydraClient::ApiError => e
449
+ puts "Exception when calling AdminApi->flush_inactive_o_auth2_tokens: #{e}"
450
+ end
451
+ ```
452
+
453
+ ### Parameters
454
+
455
+
456
+ Name | Type | Description | Notes
457
+ ------------- | ------------- | ------------- | -------------
458
+ **body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md)| | [optional]
459
+
460
+ ### Return type
461
+
462
+ nil (empty response body)
463
+
464
+ ### Authorization
465
+
466
+ No authorization required
467
+
468
+ ### HTTP request headers
469
+
470
+ - **Content-Type**: application/json
471
+ - **Accept**: application/json
472
+
473
+
474
+ ## get_consent_request
475
+
476
+ > ConsentRequest get_consent_request(consent_challenge)
477
+
478
+ Get consent request information
479
+
480
+ 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.
481
+
482
+ ### Example
483
+
484
+ ```ruby
485
+ # load the gem
486
+ require 'ory-hydra-client'
487
+
488
+ api_instance = OryHydraClient::AdminApi.new
489
+ consent_challenge = 'consent_challenge_example' # String |
490
+
491
+ begin
492
+ #Get consent request information
493
+ result = api_instance.get_consent_request(consent_challenge)
494
+ p result
495
+ rescue OryHydraClient::ApiError => e
496
+ puts "Exception when calling AdminApi->get_consent_request: #{e}"
497
+ end
498
+ ```
499
+
500
+ ### Parameters
501
+
502
+
503
+ Name | Type | Description | Notes
504
+ ------------- | ------------- | ------------- | -------------
505
+ **consent_challenge** | **String**| |
506
+
507
+ ### Return type
508
+
509
+ [**ConsentRequest**](ConsentRequest.md)
510
+
511
+ ### Authorization
512
+
513
+ No authorization required
514
+
515
+ ### HTTP request headers
516
+
517
+ - **Content-Type**: Not defined
518
+ - **Accept**: application/json
519
+
520
+
521
+ ## get_json_web_key
522
+
523
+ > JSONWebKeySet get_json_web_key(kid, set)
524
+
525
+ Fetch a JSON Web Key
526
+
527
+ This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
528
+
529
+ ### Example
530
+
531
+ ```ruby
532
+ # load the gem
533
+ require 'ory-hydra-client'
534
+
535
+ api_instance = OryHydraClient::AdminApi.new
536
+ kid = 'kid_example' # String | The kid of the desired key
537
+ set = 'set_example' # String | The set
538
+
539
+ begin
540
+ #Fetch a JSON Web Key
541
+ result = api_instance.get_json_web_key(kid, set)
542
+ p result
543
+ rescue OryHydraClient::ApiError => e
544
+ puts "Exception when calling AdminApi->get_json_web_key: #{e}"
545
+ end
546
+ ```
547
+
548
+ ### Parameters
549
+
550
+
551
+ Name | Type | Description | Notes
552
+ ------------- | ------------- | ------------- | -------------
553
+ **kid** | **String**| The kid of the desired key |
554
+ **set** | **String**| The set |
555
+
556
+ ### Return type
557
+
558
+ [**JSONWebKeySet**](JSONWebKeySet.md)
559
+
560
+ ### Authorization
561
+
562
+ No authorization required
563
+
564
+ ### HTTP request headers
565
+
566
+ - **Content-Type**: Not defined
567
+ - **Accept**: application/json
568
+
569
+
570
+ ## get_json_web_key_set
571
+
572
+ > JSONWebKeySet get_json_web_key_set(set)
573
+
574
+ Retrieve a JSON Web Key Set
575
+
576
+ 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.
577
+
578
+ ### Example
579
+
580
+ ```ruby
581
+ # load the gem
582
+ require 'ory-hydra-client'
583
+
584
+ api_instance = OryHydraClient::AdminApi.new
585
+ set = 'set_example' # String | The set
586
+
587
+ begin
588
+ #Retrieve a JSON Web Key Set
589
+ result = api_instance.get_json_web_key_set(set)
590
+ p result
591
+ rescue OryHydraClient::ApiError => e
592
+ puts "Exception when calling AdminApi->get_json_web_key_set: #{e}"
593
+ end
594
+ ```
595
+
596
+ ### Parameters
597
+
598
+
599
+ Name | Type | Description | Notes
600
+ ------------- | ------------- | ------------- | -------------
601
+ **set** | **String**| The set |
602
+
603
+ ### Return type
604
+
605
+ [**JSONWebKeySet**](JSONWebKeySet.md)
606
+
607
+ ### Authorization
608
+
609
+ No authorization required
610
+
611
+ ### HTTP request headers
612
+
613
+ - **Content-Type**: Not defined
614
+ - **Accept**: application/json
615
+
616
+
617
+ ## get_login_request
618
+
619
+ > LoginRequest get_login_request(login_challenge)
620
+
621
+ Get an login request
622
+
623
+ 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.
624
+
625
+ ### Example
626
+
627
+ ```ruby
628
+ # load the gem
629
+ require 'ory-hydra-client'
630
+
631
+ api_instance = OryHydraClient::AdminApi.new
632
+ login_challenge = 'login_challenge_example' # String |
633
+
634
+ begin
635
+ #Get an login request
636
+ result = api_instance.get_login_request(login_challenge)
637
+ p result
638
+ rescue OryHydraClient::ApiError => e
639
+ puts "Exception when calling AdminApi->get_login_request: #{e}"
640
+ end
641
+ ```
642
+
643
+ ### Parameters
644
+
645
+
646
+ Name | Type | Description | Notes
647
+ ------------- | ------------- | ------------- | -------------
648
+ **login_challenge** | **String**| |
649
+
650
+ ### Return type
651
+
652
+ [**LoginRequest**](LoginRequest.md)
653
+
654
+ ### Authorization
655
+
656
+ No authorization required
657
+
658
+ ### HTTP request headers
659
+
660
+ - **Content-Type**: Not defined
661
+ - **Accept**: application/json
662
+
663
+
664
+ ## get_logout_request
665
+
666
+ > LogoutRequest get_logout_request(logout_challenge)
667
+
668
+ Get a logout request
669
+
670
+ Use this endpoint to fetch a logout request.
671
+
672
+ ### Example
673
+
674
+ ```ruby
675
+ # load the gem
676
+ require 'ory-hydra-client'
677
+
678
+ api_instance = OryHydraClient::AdminApi.new
679
+ logout_challenge = 'logout_challenge_example' # String |
680
+
681
+ begin
682
+ #Get a logout request
683
+ result = api_instance.get_logout_request(logout_challenge)
684
+ p result
685
+ rescue OryHydraClient::ApiError => e
686
+ puts "Exception when calling AdminApi->get_logout_request: #{e}"
687
+ end
688
+ ```
689
+
690
+ ### Parameters
691
+
692
+
693
+ Name | Type | Description | Notes
694
+ ------------- | ------------- | ------------- | -------------
695
+ **logout_challenge** | **String**| |
696
+
697
+ ### Return type
698
+
699
+ [**LogoutRequest**](LogoutRequest.md)
700
+
701
+ ### Authorization
702
+
703
+ No authorization required
704
+
705
+ ### HTTP request headers
706
+
707
+ - **Content-Type**: Not defined
708
+ - **Accept**: application/json
709
+
710
+
711
+ ## get_o_auth2_client
712
+
713
+ > OAuth2Client get_o_auth2_client(id)
714
+
715
+ Get an OAuth 2.0 Client.
716
+
717
+ 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.
718
+
719
+ ### Example
720
+
721
+ ```ruby
722
+ # load the gem
723
+ require 'ory-hydra-client'
724
+
725
+ api_instance = OryHydraClient::AdminApi.new
726
+ id = 'id_example' # String | The id of the OAuth 2.0 Client.
727
+
728
+ begin
729
+ #Get an OAuth 2.0 Client.
730
+ result = api_instance.get_o_auth2_client(id)
731
+ p result
732
+ rescue OryHydraClient::ApiError => e
733
+ puts "Exception when calling AdminApi->get_o_auth2_client: #{e}"
734
+ end
735
+ ```
736
+
737
+ ### Parameters
738
+
739
+
740
+ Name | Type | Description | Notes
741
+ ------------- | ------------- | ------------- | -------------
742
+ **id** | **String**| The id of the OAuth 2.0 Client. |
743
+
744
+ ### Return type
745
+
746
+ [**OAuth2Client**](OAuth2Client.md)
747
+
748
+ ### Authorization
749
+
750
+ No authorization required
751
+
752
+ ### HTTP request headers
753
+
754
+ - **Content-Type**: Not defined
755
+ - **Accept**: application/json
756
+
757
+
758
+ ## get_version
759
+
760
+ > Version get_version
761
+
762
+ Get service version
763
+
764
+ 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.
765
+
766
+ ### Example
767
+
768
+ ```ruby
769
+ # load the gem
770
+ require 'ory-hydra-client'
771
+
772
+ api_instance = OryHydraClient::AdminApi.new
773
+
774
+ begin
775
+ #Get service version
776
+ result = api_instance.get_version
777
+ p result
778
+ rescue OryHydraClient::ApiError => e
779
+ puts "Exception when calling AdminApi->get_version: #{e}"
780
+ end
781
+ ```
782
+
783
+ ### Parameters
784
+
785
+ This endpoint does not need any parameter.
786
+
787
+ ### Return type
788
+
789
+ [**Version**](Version.md)
790
+
791
+ ### Authorization
792
+
793
+ No authorization required
794
+
795
+ ### HTTP request headers
796
+
797
+ - **Content-Type**: Not defined
798
+ - **Accept**: application/json
799
+
800
+
801
+ ## introspect_o_auth2_token
802
+
803
+ > OAuth2TokenIntrospection introspect_o_auth2_token(token, opts)
804
+
805
+ Introspect OAuth2 tokens
806
+
807
+ 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/).
808
+
809
+ ### Example
810
+
811
+ ```ruby
812
+ # load the gem
813
+ require 'ory-hydra-client'
814
+ # setup authorization
815
+ OryHydraClient.configure do |config|
816
+ # Configure HTTP basic authorization: basic
817
+ config.username = 'YOUR USERNAME'
818
+ config.password = 'YOUR PASSWORD'
819
+
820
+ # Configure OAuth2 access token for authorization: oauth2
821
+ config.access_token = 'YOUR ACCESS TOKEN'
822
+ end
823
+
824
+ api_instance = OryHydraClient::AdminApi.new
825
+ token = 'token_example' # String | The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned.
826
+ opts = {
827
+ scope: 'scope_example' # String | An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
828
+ }
829
+
830
+ begin
831
+ #Introspect OAuth2 tokens
832
+ result = api_instance.introspect_o_auth2_token(token, opts)
833
+ p result
834
+ rescue OryHydraClient::ApiError => e
835
+ puts "Exception when calling AdminApi->introspect_o_auth2_token: #{e}"
836
+ end
837
+ ```
838
+
839
+ ### Parameters
840
+
841
+
842
+ Name | Type | Description | Notes
843
+ ------------- | ------------- | ------------- | -------------
844
+ **token** | **String**| The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned. |
845
+ **scope** | **String**| An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false. | [optional]
846
+
847
+ ### Return type
848
+
849
+ [**OAuth2TokenIntrospection**](OAuth2TokenIntrospection.md)
850
+
851
+ ### Authorization
852
+
853
+ [basic](../README.md#basic), [oauth2](../README.md#oauth2)
854
+
855
+ ### HTTP request headers
856
+
857
+ - **Content-Type**: application/x-www-form-urlencoded
858
+ - **Accept**: application/json
859
+
860
+
861
+ ## is_instance_alive
862
+
863
+ > HealthStatus is_instance_alive
864
+
865
+ Check alive status
866
+
867
+ 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.
868
+
869
+ ### Example
870
+
871
+ ```ruby
872
+ # load the gem
873
+ require 'ory-hydra-client'
874
+
875
+ api_instance = OryHydraClient::AdminApi.new
876
+
877
+ begin
878
+ #Check alive status
879
+ result = api_instance.is_instance_alive
880
+ p result
881
+ rescue OryHydraClient::ApiError => e
882
+ puts "Exception when calling AdminApi->is_instance_alive: #{e}"
883
+ end
884
+ ```
885
+
886
+ ### Parameters
887
+
888
+ This endpoint does not need any parameter.
889
+
890
+ ### Return type
891
+
892
+ [**HealthStatus**](HealthStatus.md)
893
+
894
+ ### Authorization
895
+
896
+ No authorization required
897
+
898
+ ### HTTP request headers
899
+
900
+ - **Content-Type**: Not defined
901
+ - **Accept**: application/json
902
+
903
+
904
+ ## list_o_auth2_clients
905
+
906
+ > Array<OAuth2Client> list_o_auth2_clients(opts)
907
+
908
+ List OAuth 2.0 Clients
909
+
910
+ 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.
911
+
912
+ ### Example
913
+
914
+ ```ruby
915
+ # load the gem
916
+ require 'ory-hydra-client'
917
+
918
+ api_instance = OryHydraClient::AdminApi.new
919
+ opts = {
920
+ limit: 56, # Integer | The maximum amount of policies returned.
921
+ offset: 56 # Integer | The offset from where to start looking.
922
+ }
923
+
924
+ begin
925
+ #List OAuth 2.0 Clients
926
+ result = api_instance.list_o_auth2_clients(opts)
927
+ p result
928
+ rescue OryHydraClient::ApiError => e
929
+ puts "Exception when calling AdminApi->list_o_auth2_clients: #{e}"
930
+ end
931
+ ```
932
+
933
+ ### Parameters
934
+
935
+
936
+ Name | Type | Description | Notes
937
+ ------------- | ------------- | ------------- | -------------
938
+ **limit** | **Integer**| The maximum amount of policies returned. | [optional]
939
+ **offset** | **Integer**| The offset from where to start looking. | [optional]
940
+
941
+ ### Return type
942
+
943
+ [**Array&lt;OAuth2Client&gt;**](OAuth2Client.md)
944
+
945
+ ### Authorization
946
+
947
+ No authorization required
948
+
949
+ ### HTTP request headers
950
+
951
+ - **Content-Type**: Not defined
952
+ - **Accept**: application/json
953
+
954
+
955
+ ## list_subject_consent_sessions
956
+
957
+ > Array&lt;PreviousConsentSession&gt; list_subject_consent_sessions(subject)
958
+
959
+ Lists all consent sessions of a subject
960
+
961
+ 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.
962
+
963
+ ### Example
964
+
965
+ ```ruby
966
+ # load the gem
967
+ require 'ory-hydra-client'
968
+
969
+ api_instance = OryHydraClient::AdminApi.new
970
+ subject = 'subject_example' # String |
971
+
972
+ begin
973
+ #Lists all consent sessions of a subject
974
+ result = api_instance.list_subject_consent_sessions(subject)
975
+ p result
976
+ rescue OryHydraClient::ApiError => e
977
+ puts "Exception when calling AdminApi->list_subject_consent_sessions: #{e}"
978
+ end
979
+ ```
980
+
981
+ ### Parameters
982
+
983
+
984
+ Name | Type | Description | Notes
985
+ ------------- | ------------- | ------------- | -------------
986
+ **subject** | **String**| |
987
+
988
+ ### Return type
989
+
990
+ [**Array&lt;PreviousConsentSession&gt;**](PreviousConsentSession.md)
991
+
992
+ ### Authorization
993
+
994
+ No authorization required
995
+
996
+ ### HTTP request headers
997
+
998
+ - **Content-Type**: Not defined
999
+ - **Accept**: application/json
1000
+
1001
+
1002
+ ## prometheus
1003
+
1004
+ > prometheus
1005
+
1006
+ Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
1007
+
1008
+ ``` metadata: annotations: prometheus.io/port: \"4445\" prometheus.io/path: \"/metrics/prometheus\" ```
1009
+
1010
+ ### Example
1011
+
1012
+ ```ruby
1013
+ # load the gem
1014
+ require 'ory-hydra-client'
1015
+
1016
+ api_instance = OryHydraClient::AdminApi.new
1017
+
1018
+ begin
1019
+ #Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
1020
+ api_instance.prometheus
1021
+ rescue OryHydraClient::ApiError => e
1022
+ puts "Exception when calling AdminApi->prometheus: #{e}"
1023
+ end
1024
+ ```
1025
+
1026
+ ### Parameters
1027
+
1028
+ This endpoint does not need any parameter.
1029
+
1030
+ ### Return type
1031
+
1032
+ nil (empty response body)
1033
+
1034
+ ### Authorization
1035
+
1036
+ No authorization required
1037
+
1038
+ ### HTTP request headers
1039
+
1040
+ - **Content-Type**: Not defined
1041
+ - **Accept**: Not defined
1042
+
1043
+
1044
+ ## reject_consent_request
1045
+
1046
+ > CompletedRequest reject_consent_request(consent_challenge, opts)
1047
+
1048
+ Reject an consent request
1049
+
1050
+ 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.
1051
+
1052
+ ### Example
1053
+
1054
+ ```ruby
1055
+ # load the gem
1056
+ require 'ory-hydra-client'
1057
+
1058
+ api_instance = OryHydraClient::AdminApi.new
1059
+ consent_challenge = 'consent_challenge_example' # String |
1060
+ opts = {
1061
+ body: OryHydraClient::RejectRequest.new # RejectRequest |
1062
+ }
1063
+
1064
+ begin
1065
+ #Reject an consent request
1066
+ result = api_instance.reject_consent_request(consent_challenge, opts)
1067
+ p result
1068
+ rescue OryHydraClient::ApiError => e
1069
+ puts "Exception when calling AdminApi->reject_consent_request: #{e}"
1070
+ end
1071
+ ```
1072
+
1073
+ ### Parameters
1074
+
1075
+
1076
+ Name | Type | Description | Notes
1077
+ ------------- | ------------- | ------------- | -------------
1078
+ **consent_challenge** | **String**| |
1079
+ **body** | [**RejectRequest**](RejectRequest.md)| | [optional]
1080
+
1081
+ ### Return type
1082
+
1083
+ [**CompletedRequest**](CompletedRequest.md)
1084
+
1085
+ ### Authorization
1086
+
1087
+ No authorization required
1088
+
1089
+ ### HTTP request headers
1090
+
1091
+ - **Content-Type**: application/json
1092
+ - **Accept**: application/json
1093
+
1094
+
1095
+ ## reject_login_request
1096
+
1097
+ > CompletedRequest reject_login_request(login_challenge, opts)
1098
+
1099
+ Reject a login request
1100
+
1101
+ 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.
1102
+
1103
+ ### Example
1104
+
1105
+ ```ruby
1106
+ # load the gem
1107
+ require 'ory-hydra-client'
1108
+
1109
+ api_instance = OryHydraClient::AdminApi.new
1110
+ login_challenge = 'login_challenge_example' # String |
1111
+ opts = {
1112
+ body: OryHydraClient::RejectRequest.new # RejectRequest |
1113
+ }
1114
+
1115
+ begin
1116
+ #Reject a login request
1117
+ result = api_instance.reject_login_request(login_challenge, opts)
1118
+ p result
1119
+ rescue OryHydraClient::ApiError => e
1120
+ puts "Exception when calling AdminApi->reject_login_request: #{e}"
1121
+ end
1122
+ ```
1123
+
1124
+ ### Parameters
1125
+
1126
+
1127
+ Name | Type | Description | Notes
1128
+ ------------- | ------------- | ------------- | -------------
1129
+ **login_challenge** | **String**| |
1130
+ **body** | [**RejectRequest**](RejectRequest.md)| | [optional]
1131
+
1132
+ ### Return type
1133
+
1134
+ [**CompletedRequest**](CompletedRequest.md)
1135
+
1136
+ ### Authorization
1137
+
1138
+ No authorization required
1139
+
1140
+ ### HTTP request headers
1141
+
1142
+ - **Content-Type**: application/json
1143
+ - **Accept**: application/json
1144
+
1145
+
1146
+ ## reject_logout_request
1147
+
1148
+ > reject_logout_request(logout_challenge, opts)
1149
+
1150
+ Reject a logout request
1151
+
1152
+ 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.
1153
+
1154
+ ### Example
1155
+
1156
+ ```ruby
1157
+ # load the gem
1158
+ require 'ory-hydra-client'
1159
+
1160
+ api_instance = OryHydraClient::AdminApi.new
1161
+ logout_challenge = 'logout_challenge_example' # String |
1162
+ opts = {
1163
+ body: OryHydraClient::RejectRequest.new # RejectRequest |
1164
+ }
1165
+
1166
+ begin
1167
+ #Reject a logout request
1168
+ api_instance.reject_logout_request(logout_challenge, opts)
1169
+ rescue OryHydraClient::ApiError => e
1170
+ puts "Exception when calling AdminApi->reject_logout_request: #{e}"
1171
+ end
1172
+ ```
1173
+
1174
+ ### Parameters
1175
+
1176
+
1177
+ Name | Type | Description | Notes
1178
+ ------------- | ------------- | ------------- | -------------
1179
+ **logout_challenge** | **String**| |
1180
+ **body** | [**RejectRequest**](RejectRequest.md)| | [optional]
1181
+
1182
+ ### Return type
1183
+
1184
+ nil (empty response body)
1185
+
1186
+ ### Authorization
1187
+
1188
+ No authorization required
1189
+
1190
+ ### HTTP request headers
1191
+
1192
+ - **Content-Type**: application/json, application/x-www-form-urlencoded
1193
+ - **Accept**: application/json
1194
+
1195
+
1196
+ ## revoke_authentication_session
1197
+
1198
+ > revoke_authentication_session(subject)
1199
+
1200
+ Invalidates all login sessions of a certain user Invalidates a subject's authentication session
1201
+
1202
+ 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.
1203
+
1204
+ ### Example
1205
+
1206
+ ```ruby
1207
+ # load the gem
1208
+ require 'ory-hydra-client'
1209
+
1210
+ api_instance = OryHydraClient::AdminApi.new
1211
+ subject = 'subject_example' # String |
1212
+
1213
+ begin
1214
+ #Invalidates all login sessions of a certain user Invalidates a subject's authentication session
1215
+ api_instance.revoke_authentication_session(subject)
1216
+ rescue OryHydraClient::ApiError => e
1217
+ puts "Exception when calling AdminApi->revoke_authentication_session: #{e}"
1218
+ end
1219
+ ```
1220
+
1221
+ ### Parameters
1222
+
1223
+
1224
+ Name | Type | Description | Notes
1225
+ ------------- | ------------- | ------------- | -------------
1226
+ **subject** | **String**| |
1227
+
1228
+ ### Return type
1229
+
1230
+ nil (empty response body)
1231
+
1232
+ ### Authorization
1233
+
1234
+ No authorization required
1235
+
1236
+ ### HTTP request headers
1237
+
1238
+ - **Content-Type**: Not defined
1239
+ - **Accept**: application/json
1240
+
1241
+
1242
+ ## revoke_consent_sessions
1243
+
1244
+ > revoke_consent_sessions(subject, opts)
1245
+
1246
+ Revokes consent sessions of a subject for a specific OAuth 2.0 Client
1247
+
1248
+ 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.
1249
+
1250
+ ### Example
1251
+
1252
+ ```ruby
1253
+ # load the gem
1254
+ require 'ory-hydra-client'
1255
+
1256
+ api_instance = OryHydraClient::AdminApi.new
1257
+ subject = 'subject_example' # String | The subject (Subject) who's consent sessions should be deleted.
1258
+ opts = {
1259
+ client: 'client_example' # String | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID
1260
+ }
1261
+
1262
+ begin
1263
+ #Revokes consent sessions of a subject for a specific OAuth 2.0 Client
1264
+ api_instance.revoke_consent_sessions(subject, opts)
1265
+ rescue OryHydraClient::ApiError => e
1266
+ puts "Exception when calling AdminApi->revoke_consent_sessions: #{e}"
1267
+ end
1268
+ ```
1269
+
1270
+ ### Parameters
1271
+
1272
+
1273
+ Name | Type | Description | Notes
1274
+ ------------- | ------------- | ------------- | -------------
1275
+ **subject** | **String**| The subject (Subject) who&#39;s consent sessions should be deleted. |
1276
+ **client** | **String**| If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional]
1277
+
1278
+ ### Return type
1279
+
1280
+ nil (empty response body)
1281
+
1282
+ ### Authorization
1283
+
1284
+ No authorization required
1285
+
1286
+ ### HTTP request headers
1287
+
1288
+ - **Content-Type**: Not defined
1289
+ - **Accept**: application/json
1290
+
1291
+
1292
+ ## update_json_web_key
1293
+
1294
+ > JSONWebKey update_json_web_key(kid, set, opts)
1295
+
1296
+ Update a JSON Web Key
1297
+
1298
+ 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.
1299
+
1300
+ ### Example
1301
+
1302
+ ```ruby
1303
+ # load the gem
1304
+ require 'ory-hydra-client'
1305
+
1306
+ api_instance = OryHydraClient::AdminApi.new
1307
+ kid = 'kid_example' # String | The kid of the desired key
1308
+ set = 'set_example' # String | The set
1309
+ opts = {
1310
+ body: OryHydraClient::JSONWebKey.new # JSONWebKey |
1311
+ }
1312
+
1313
+ begin
1314
+ #Update a JSON Web Key
1315
+ result = api_instance.update_json_web_key(kid, set, opts)
1316
+ p result
1317
+ rescue OryHydraClient::ApiError => e
1318
+ puts "Exception when calling AdminApi->update_json_web_key: #{e}"
1319
+ end
1320
+ ```
1321
+
1322
+ ### Parameters
1323
+
1324
+
1325
+ Name | Type | Description | Notes
1326
+ ------------- | ------------- | ------------- | -------------
1327
+ **kid** | **String**| The kid of the desired key |
1328
+ **set** | **String**| The set |
1329
+ **body** | [**JSONWebKey**](JSONWebKey.md)| | [optional]
1330
+
1331
+ ### Return type
1332
+
1333
+ [**JSONWebKey**](JSONWebKey.md)
1334
+
1335
+ ### Authorization
1336
+
1337
+ No authorization required
1338
+
1339
+ ### HTTP request headers
1340
+
1341
+ - **Content-Type**: application/json
1342
+ - **Accept**: application/json
1343
+
1344
+
1345
+ ## update_json_web_key_set
1346
+
1347
+ > JSONWebKeySet update_json_web_key_set(set, opts)
1348
+
1349
+ Update a JSON Web Key Set
1350
+
1351
+ 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.
1352
+
1353
+ ### Example
1354
+
1355
+ ```ruby
1356
+ # load the gem
1357
+ require 'ory-hydra-client'
1358
+
1359
+ api_instance = OryHydraClient::AdminApi.new
1360
+ set = 'set_example' # String | The set
1361
+ opts = {
1362
+ body: OryHydraClient::JSONWebKeySet.new # JSONWebKeySet |
1363
+ }
1364
+
1365
+ begin
1366
+ #Update a JSON Web Key Set
1367
+ result = api_instance.update_json_web_key_set(set, opts)
1368
+ p result
1369
+ rescue OryHydraClient::ApiError => e
1370
+ puts "Exception when calling AdminApi->update_json_web_key_set: #{e}"
1371
+ end
1372
+ ```
1373
+
1374
+ ### Parameters
1375
+
1376
+
1377
+ Name | Type | Description | Notes
1378
+ ------------- | ------------- | ------------- | -------------
1379
+ **set** | **String**| The set |
1380
+ **body** | [**JSONWebKeySet**](JSONWebKeySet.md)| | [optional]
1381
+
1382
+ ### Return type
1383
+
1384
+ [**JSONWebKeySet**](JSONWebKeySet.md)
1385
+
1386
+ ### Authorization
1387
+
1388
+ No authorization required
1389
+
1390
+ ### HTTP request headers
1391
+
1392
+ - **Content-Type**: application/json
1393
+ - **Accept**: application/json
1394
+
1395
+
1396
+ ## update_o_auth2_client
1397
+
1398
+ > OAuth2Client update_o_auth2_client(id, body)
1399
+
1400
+ Update an OAuth 2.0 Client
1401
+
1402
+ 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.
1403
+
1404
+ ### Example
1405
+
1406
+ ```ruby
1407
+ # load the gem
1408
+ require 'ory-hydra-client'
1409
+
1410
+ api_instance = OryHydraClient::AdminApi.new
1411
+ id = 'id_example' # String |
1412
+ body = OryHydraClient::OAuth2Client.new # OAuth2Client |
1413
+
1414
+ begin
1415
+ #Update an OAuth 2.0 Client
1416
+ result = api_instance.update_o_auth2_client(id, body)
1417
+ p result
1418
+ rescue OryHydraClient::ApiError => e
1419
+ puts "Exception when calling AdminApi->update_o_auth2_client: #{e}"
1420
+ end
1421
+ ```
1422
+
1423
+ ### Parameters
1424
+
1425
+
1426
+ Name | Type | Description | Notes
1427
+ ------------- | ------------- | ------------- | -------------
1428
+ **id** | **String**| |
1429
+ **body** | [**OAuth2Client**](OAuth2Client.md)| |
1430
+
1431
+ ### Return type
1432
+
1433
+ [**OAuth2Client**](OAuth2Client.md)
1434
+
1435
+ ### Authorization
1436
+
1437
+ No authorization required
1438
+
1439
+ ### HTTP request headers
1440
+
1441
+ - **Content-Type**: application/json
1442
+ - **Accept**: application/json
1443
+