ory-hydra-client 1.6.0 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -29
- data/docs/AdminApi.md +103 -63
- data/docs/PublicApi.md +15 -15
- data/lib/ory-hydra-client.rb +1 -1
- data/lib/ory-hydra-client/api/admin_api.rb +104 -38
- data/lib/ory-hydra-client/api/public_api.rb +11 -11
- data/lib/ory-hydra-client/api_client.rb +1 -1
- data/lib/ory-hydra-client/api_error.rb +1 -1
- data/lib/ory-hydra-client/configuration.rb +1 -1
- data/lib/ory-hydra-client/models/accept_consent_request.rb +1 -1
- data/lib/ory-hydra-client/models/accept_login_request.rb +1 -1
- data/lib/ory-hydra-client/models/completed_request.rb +1 -1
- data/lib/ory-hydra-client/models/consent_request.rb +1 -1
- data/lib/ory-hydra-client/models/consent_request_session.rb +1 -1
- data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +1 -1
- data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +1 -1
- data/lib/ory-hydra-client/models/generic_error.rb +1 -1
- data/lib/ory-hydra-client/models/health_not_ready_status.rb +1 -1
- data/lib/ory-hydra-client/models/health_status.rb +1 -1
- data/lib/ory-hydra-client/models/json_web_key.rb +1 -1
- data/lib/ory-hydra-client/models/json_web_key_set.rb +1 -1
- data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +1 -1
- data/lib/ory-hydra-client/models/login_request.rb +1 -1
- data/lib/ory-hydra-client/models/logout_request.rb +1 -1
- data/lib/ory-hydra-client/models/o_auth2_client.rb +1 -1
- data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +1 -1
- data/lib/ory-hydra-client/models/oauth2_token_response.rb +1 -1
- data/lib/ory-hydra-client/models/open_id_connect_context.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_config.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_config_args.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_config_interface.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_config_linux.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_config_network.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_config_user.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_device.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_env.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_interface_type.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_mount.rb +1 -1
- data/lib/ory-hydra-client/models/plugin_settings.rb +1 -1
- data/lib/ory-hydra-client/models/previous_consent_session.rb +1 -1
- data/lib/ory-hydra-client/models/reject_request.rb +1 -1
- data/lib/ory-hydra-client/models/userinfo_response.rb +1 -1
- data/lib/ory-hydra-client/models/version.rb +1 -1
- data/lib/ory-hydra-client/models/volume_usage_data.rb +1 -1
- data/lib/ory-hydra-client/models/well_known.rb +1 -1
- data/lib/ory-hydra-client/version.rb +2 -2
- data/ory-hydra-client.gemspec +1 -1
- metadata +32 -32
data/docs/PublicApi.md
CHANGED
@@ -4,12 +4,12 @@ All URIs are relative to *http://localhost*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**disconnect_user**](PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel
|
7
|
+
[**disconnect_user**](PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout
|
8
8
|
[**discover_open_id_configuration**](PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery
|
9
|
-
[**is_instance_ready**](PublicApi.md#is_instance_ready) | **GET** /health/ready | Check
|
10
|
-
[**oauth2_token**](PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0
|
11
|
-
[**oauth_auth**](PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0
|
12
|
-
[**revoke_o_auth2_token**](PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2
|
9
|
+
[**is_instance_ready**](PublicApi.md#is_instance_ready) | **GET** /health/ready | Check Readiness Status
|
10
|
+
[**oauth2_token**](PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint
|
11
|
+
[**oauth_auth**](PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint
|
12
|
+
[**revoke_o_auth2_token**](PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens
|
13
13
|
[**userinfo**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo
|
14
14
|
[**well_known**](PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery
|
15
15
|
|
@@ -19,7 +19,7 @@ Method | HTTP request | Description
|
|
19
19
|
|
20
20
|
> disconnect_user
|
21
21
|
|
22
|
-
OpenID Connect Front-Backchannel
|
22
|
+
OpenID Connect Front-Backchannel Enabled Logout
|
23
23
|
|
24
24
|
This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html
|
25
25
|
|
@@ -32,7 +32,7 @@ require 'ory-hydra-client'
|
|
32
32
|
api_instance = OryHydraClient::PublicApi.new
|
33
33
|
|
34
34
|
begin
|
35
|
-
#OpenID Connect Front-Backchannel
|
35
|
+
#OpenID Connect Front-Backchannel Enabled Logout
|
36
36
|
api_instance.disconnect_user
|
37
37
|
rescue OryHydraClient::ApiError => e
|
38
38
|
puts "Exception when calling PublicApi->disconnect_user: #{e}"
|
@@ -104,7 +104,7 @@ No authorization required
|
|
104
104
|
|
105
105
|
> HealthStatus is_instance_ready
|
106
106
|
|
107
|
-
Check
|
107
|
+
Check Readiness Status
|
108
108
|
|
109
109
|
This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
110
110
|
|
@@ -117,7 +117,7 @@ require 'ory-hydra-client'
|
|
117
117
|
api_instance = OryHydraClient::PublicApi.new
|
118
118
|
|
119
119
|
begin
|
120
|
-
#Check
|
120
|
+
#Check Readiness Status
|
121
121
|
result = api_instance.is_instance_ready
|
122
122
|
p result
|
123
123
|
rescue OryHydraClient::ApiError => e
|
@@ -147,7 +147,7 @@ No authorization required
|
|
147
147
|
|
148
148
|
> Oauth2TokenResponse oauth2_token(grant_type, opts)
|
149
149
|
|
150
|
-
The OAuth 2.0
|
150
|
+
The OAuth 2.0 Token Endpoint
|
151
151
|
|
152
152
|
The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above!
|
153
153
|
|
@@ -176,7 +176,7 @@ opts = {
|
|
176
176
|
}
|
177
177
|
|
178
178
|
begin
|
179
|
-
#The OAuth 2.0
|
179
|
+
#The OAuth 2.0 Token Endpoint
|
180
180
|
result = api_instance.oauth2_token(grant_type, opts)
|
181
181
|
p result
|
182
182
|
rescue OryHydraClient::ApiError => e
|
@@ -213,7 +213,7 @@ Name | Type | Description | Notes
|
|
213
213
|
|
214
214
|
> oauth_auth
|
215
215
|
|
216
|
-
The OAuth 2.0
|
216
|
+
The OAuth 2.0 Authorize Endpoint
|
217
217
|
|
218
218
|
This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
|
219
219
|
|
@@ -226,7 +226,7 @@ require 'ory-hydra-client'
|
|
226
226
|
api_instance = OryHydraClient::PublicApi.new
|
227
227
|
|
228
228
|
begin
|
229
|
-
#The OAuth 2.0
|
229
|
+
#The OAuth 2.0 Authorize Endpoint
|
230
230
|
api_instance.oauth_auth
|
231
231
|
rescue OryHydraClient::ApiError => e
|
232
232
|
puts "Exception when calling PublicApi->oauth_auth: #{e}"
|
@@ -255,7 +255,7 @@ No authorization required
|
|
255
255
|
|
256
256
|
> revoke_o_auth2_token(token)
|
257
257
|
|
258
|
-
Revoke OAuth2
|
258
|
+
Revoke OAuth2 Tokens
|
259
259
|
|
260
260
|
Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
|
261
261
|
|
@@ -278,7 +278,7 @@ api_instance = OryHydraClient::PublicApi.new
|
|
278
278
|
token = 'token_example' # String |
|
279
279
|
|
280
280
|
begin
|
281
|
-
#Revoke OAuth2
|
281
|
+
#Revoke OAuth2 Tokens
|
282
282
|
api_instance.revoke_o_auth2_token(token)
|
283
283
|
rescue OryHydraClient::ApiError => e
|
284
284
|
puts "Exception when calling PublicApi->revoke_o_auth2_token: #{e}"
|
data/lib/ory-hydra-client.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v1.
|
6
|
+
The version of the OpenAPI document: v1.8.5
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
|
5
5
|
|
6
|
-
The version of the OpenAPI document: v1.
|
6
|
+
The version of the OpenAPI document: v1.8.5
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.3.1
|
@@ -19,7 +19,7 @@ module OryHydraClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Accept a
|
22
|
+
# Accept a Consent Request
|
23
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
24
|
# @param consent_challenge [String]
|
25
25
|
# @param [Hash] opts the optional parameters
|
@@ -30,7 +30,7 @@ module OryHydraClient
|
|
30
30
|
data
|
31
31
|
end
|
32
32
|
|
33
|
-
# Accept a
|
33
|
+
# Accept a Consent Request
|
34
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'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.
|
35
35
|
# @param consent_challenge [String]
|
36
36
|
# @param [Hash] opts the optional parameters
|
@@ -86,7 +86,7 @@ module OryHydraClient
|
|
86
86
|
return data, status_code, headers
|
87
87
|
end
|
88
88
|
|
89
|
-
# Accept a
|
89
|
+
# Accept a Login Request
|
90
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
91
|
# @param login_challenge [String]
|
92
92
|
# @param [Hash] opts the optional parameters
|
@@ -97,7 +97,7 @@ module OryHydraClient
|
|
97
97
|
data
|
98
98
|
end
|
99
99
|
|
100
|
-
# Accept a
|
100
|
+
# Accept a Login Request
|
101
101
|
# 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.
|
102
102
|
# @param login_challenge [String]
|
103
103
|
# @param [Hash] opts the optional parameters
|
@@ -153,7 +153,7 @@ module OryHydraClient
|
|
153
153
|
return data, status_code, headers
|
154
154
|
end
|
155
155
|
|
156
|
-
# Accept a
|
156
|
+
# Accept a Logout Request
|
157
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
158
|
# @param logout_challenge [String]
|
159
159
|
# @param [Hash] opts the optional parameters
|
@@ -163,7 +163,7 @@ module OryHydraClient
|
|
163
163
|
data
|
164
164
|
end
|
165
165
|
|
166
|
-
# Accept a
|
166
|
+
# Accept a Logout Request
|
167
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
168
|
# @param logout_challenge [String]
|
169
169
|
# @param [Hash] opts the optional parameters
|
@@ -216,7 +216,7 @@ module OryHydraClient
|
|
216
216
|
return data, status_code, headers
|
217
217
|
end
|
218
218
|
|
219
|
-
# Generate a
|
219
|
+
# Generate a New JSON Web Key
|
220
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
221
|
# @param set [String] The set
|
222
222
|
# @param [Hash] opts the optional parameters
|
@@ -227,7 +227,7 @@ module OryHydraClient
|
|
227
227
|
data
|
228
228
|
end
|
229
229
|
|
230
|
-
# Generate a
|
230
|
+
# Generate a New JSON Web Key
|
231
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
232
|
# @param set [String] The set
|
233
233
|
# @param [Hash] opts the optional parameters
|
@@ -282,7 +282,7 @@ module OryHydraClient
|
|
282
282
|
return data, status_code, headers
|
283
283
|
end
|
284
284
|
|
285
|
-
# Create an OAuth 2.0
|
285
|
+
# Create an OAuth 2.0 Client
|
286
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
287
|
# @param body [OAuth2Client]
|
288
288
|
# @param [Hash] opts the optional parameters
|
@@ -292,7 +292,7 @@ module OryHydraClient
|
|
292
292
|
data
|
293
293
|
end
|
294
294
|
|
295
|
-
# Create an OAuth 2.0
|
295
|
+
# Create an OAuth 2.0 Client
|
296
296
|
# 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.
|
297
297
|
# @param body [OAuth2Client]
|
298
298
|
# @param [Hash] opts the optional parameters
|
@@ -538,6 +538,69 @@ module OryHydraClient
|
|
538
538
|
return data, status_code, headers
|
539
539
|
end
|
540
540
|
|
541
|
+
# Delete OAuth2 Access Tokens from a client
|
542
|
+
# This endpoint deletes OAuth2 access tokens issued for a client from the database
|
543
|
+
# @param client_id [String]
|
544
|
+
# @param [Hash] opts the optional parameters
|
545
|
+
# @return [nil]
|
546
|
+
def delete_o_auth2_token(client_id, opts = {})
|
547
|
+
delete_o_auth2_token_with_http_info(client_id, opts)
|
548
|
+
nil
|
549
|
+
end
|
550
|
+
|
551
|
+
# Delete OAuth2 Access Tokens from a client
|
552
|
+
# This endpoint deletes OAuth2 access tokens issued for a client from the database
|
553
|
+
# @param client_id [String]
|
554
|
+
# @param [Hash] opts the optional parameters
|
555
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
556
|
+
def delete_o_auth2_token_with_http_info(client_id, opts = {})
|
557
|
+
if @api_client.config.debugging
|
558
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.delete_o_auth2_token ...'
|
559
|
+
end
|
560
|
+
# verify the required parameter 'client_id' is set
|
561
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
562
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling AdminApi.delete_o_auth2_token"
|
563
|
+
end
|
564
|
+
# resource path
|
565
|
+
local_var_path = '/oauth2/tokens'
|
566
|
+
|
567
|
+
# query parameters
|
568
|
+
query_params = opts[:query_params] || {}
|
569
|
+
query_params[:'client_id'] = client_id
|
570
|
+
|
571
|
+
# header parameters
|
572
|
+
header_params = opts[:header_params] || {}
|
573
|
+
# HTTP header 'Accept' (if needed)
|
574
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
575
|
+
|
576
|
+
# form parameters
|
577
|
+
form_params = opts[:form_params] || {}
|
578
|
+
|
579
|
+
# http body (model)
|
580
|
+
post_body = opts[:body]
|
581
|
+
|
582
|
+
# return_type
|
583
|
+
return_type = opts[:return_type]
|
584
|
+
|
585
|
+
# auth_names
|
586
|
+
auth_names = opts[:auth_names] || []
|
587
|
+
|
588
|
+
new_options = opts.merge(
|
589
|
+
:header_params => header_params,
|
590
|
+
:query_params => query_params,
|
591
|
+
:form_params => form_params,
|
592
|
+
:body => post_body,
|
593
|
+
:auth_names => auth_names,
|
594
|
+
:return_type => return_type
|
595
|
+
)
|
596
|
+
|
597
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
598
|
+
if @api_client.config.debugging
|
599
|
+
@api_client.config.logger.debug "API called: AdminApi#delete_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
600
|
+
end
|
601
|
+
return data, status_code, headers
|
602
|
+
end
|
603
|
+
|
541
604
|
# Flush Expired OAuth2 Access Tokens
|
542
605
|
# 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
606
|
# @param [Hash] opts the optional parameters
|
@@ -598,7 +661,7 @@ module OryHydraClient
|
|
598
661
|
return data, status_code, headers
|
599
662
|
end
|
600
663
|
|
601
|
-
# Get
|
664
|
+
# Get Consent Request Information
|
602
665
|
# 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
666
|
# @param consent_challenge [String]
|
604
667
|
# @param [Hash] opts the optional parameters
|
@@ -608,7 +671,7 @@ module OryHydraClient
|
|
608
671
|
data
|
609
672
|
end
|
610
673
|
|
611
|
-
# Get
|
674
|
+
# Get Consent Request Information
|
612
675
|
# 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.
|
613
676
|
# @param consent_challenge [String]
|
614
677
|
# @param [Hash] opts the optional parameters
|
@@ -791,7 +854,7 @@ module OryHydraClient
|
|
791
854
|
return data, status_code, headers
|
792
855
|
end
|
793
856
|
|
794
|
-
# Get a
|
857
|
+
# Get a Login Request
|
795
858
|
# 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
859
|
# @param login_challenge [String]
|
797
860
|
# @param [Hash] opts the optional parameters
|
@@ -801,7 +864,7 @@ module OryHydraClient
|
|
801
864
|
data
|
802
865
|
end
|
803
866
|
|
804
|
-
# Get a
|
867
|
+
# Get a Login Request
|
805
868
|
# 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.
|
806
869
|
# @param login_challenge [String]
|
807
870
|
# @param [Hash] opts the optional parameters
|
@@ -854,7 +917,7 @@ module OryHydraClient
|
|
854
917
|
return data, status_code, headers
|
855
918
|
end
|
856
919
|
|
857
|
-
# Get a
|
920
|
+
# Get a Logout Request
|
858
921
|
# Use this endpoint to fetch a logout request.
|
859
922
|
# @param logout_challenge [String]
|
860
923
|
# @param [Hash] opts the optional parameters
|
@@ -864,7 +927,7 @@ module OryHydraClient
|
|
864
927
|
data
|
865
928
|
end
|
866
929
|
|
867
|
-
# Get a
|
930
|
+
# Get a Logout Request
|
868
931
|
# Use this endpoint to fetch a logout request.
|
869
932
|
# @param logout_challenge [String]
|
870
933
|
# @param [Hash] opts the optional parameters
|
@@ -979,7 +1042,7 @@ module OryHydraClient
|
|
979
1042
|
return data, status_code, headers
|
980
1043
|
end
|
981
1044
|
|
982
|
-
# Get
|
1045
|
+
# Get Service Version
|
983
1046
|
# 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.
|
984
1047
|
# @param [Hash] opts the optional parameters
|
985
1048
|
# @return [Version]
|
@@ -988,7 +1051,7 @@ module OryHydraClient
|
|
988
1051
|
data
|
989
1052
|
end
|
990
1053
|
|
991
|
-
# Get
|
1054
|
+
# Get Service Version
|
992
1055
|
# 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.
|
993
1056
|
# @param [Hash] opts the optional parameters
|
994
1057
|
# @return [Array<(Version, Integer, Hash)>] Version data, response status code and response headers
|
@@ -1035,7 +1098,7 @@ module OryHydraClient
|
|
1035
1098
|
return data, status_code, headers
|
1036
1099
|
end
|
1037
1100
|
|
1038
|
-
# Introspect OAuth2
|
1101
|
+
# Introspect OAuth2 Tokens
|
1039
1102
|
# 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
1103
|
# @param token [String] The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned.
|
1041
1104
|
# @param [Hash] opts the optional parameters
|
@@ -1046,7 +1109,7 @@ module OryHydraClient
|
|
1046
1109
|
data
|
1047
1110
|
end
|
1048
1111
|
|
1049
|
-
# Introspect OAuth2
|
1112
|
+
# Introspect OAuth2 Tokens
|
1050
1113
|
# 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/).
|
1051
1114
|
# @param token [String] The string value of the token. For access tokens, this is the \\\"access_token\\\" value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\"refresh_token\\\" value returned.
|
1052
1115
|
# @param [Hash] opts the optional parameters
|
@@ -1085,7 +1148,7 @@ module OryHydraClient
|
|
1085
1148
|
return_type = opts[:return_type] || 'OAuth2TokenIntrospection'
|
1086
1149
|
|
1087
1150
|
# auth_names
|
1088
|
-
auth_names = opts[:auth_names] || [
|
1151
|
+
auth_names = opts[:auth_names] || []
|
1089
1152
|
|
1090
1153
|
new_options = opts.merge(
|
1091
1154
|
:header_params => header_params,
|
@@ -1103,7 +1166,7 @@ module OryHydraClient
|
|
1103
1166
|
return data, status_code, headers
|
1104
1167
|
end
|
1105
1168
|
|
1106
|
-
# Check
|
1169
|
+
# Check Alive Status
|
1107
1170
|
# 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
1171
|
# @param [Hash] opts the optional parameters
|
1109
1172
|
# @return [HealthStatus]
|
@@ -1112,7 +1175,7 @@ module OryHydraClient
|
|
1112
1175
|
data
|
1113
1176
|
end
|
1114
1177
|
|
1115
|
-
# Check
|
1178
|
+
# Check Alive Status
|
1116
1179
|
# 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.
|
1117
1180
|
# @param [Hash] opts the optional parameters
|
1118
1181
|
# @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers
|
@@ -1221,7 +1284,7 @@ module OryHydraClient
|
|
1221
1284
|
return data, status_code, headers
|
1222
1285
|
end
|
1223
1286
|
|
1224
|
-
# Lists
|
1287
|
+
# Lists All Consent Sessions of a Subject
|
1225
1288
|
# This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
|
1226
1289
|
# @param subject [String]
|
1227
1290
|
# @param [Hash] opts the optional parameters
|
@@ -1231,7 +1294,7 @@ module OryHydraClient
|
|
1231
1294
|
data
|
1232
1295
|
end
|
1233
1296
|
|
1234
|
-
# Lists
|
1297
|
+
# Lists All Consent Sessions of a Subject
|
1235
1298
|
# This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
|
1236
1299
|
# @param subject [String]
|
1237
1300
|
# @param [Hash] opts the optional parameters
|
@@ -1285,7 +1348,7 @@ module OryHydraClient
|
|
1285
1348
|
end
|
1286
1349
|
|
1287
1350
|
# 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\" ```
|
1351
|
+
# ``` metadata: annotations: prometheus.io/port: \"4445\" prometheus.io/path: \"/metrics/prometheus\" ``` If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.
|
1289
1352
|
# @param [Hash] opts the optional parameters
|
1290
1353
|
# @return [nil]
|
1291
1354
|
def prometheus(opts = {})
|
@@ -1294,7 +1357,7 @@ module OryHydraClient
|
|
1294
1357
|
end
|
1295
1358
|
|
1296
1359
|
# Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
|
1297
|
-
# ``` metadata: annotations: prometheus.io/port: \"4445\" prometheus.io/path: \"/metrics/prometheus\" ```
|
1360
|
+
# ``` metadata: annotations: prometheus.io/port: \"4445\" prometheus.io/path: \"/metrics/prometheus\" ``` If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.
|
1298
1361
|
# @param [Hash] opts the optional parameters
|
1299
1362
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1300
1363
|
def prometheus_with_http_info(opts = {})
|
@@ -1338,7 +1401,7 @@ module OryHydraClient
|
|
1338
1401
|
return data, status_code, headers
|
1339
1402
|
end
|
1340
1403
|
|
1341
|
-
# Reject a
|
1404
|
+
# Reject a Consent Request
|
1342
1405
|
# 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
1406
|
# @param consent_challenge [String]
|
1344
1407
|
# @param [Hash] opts the optional parameters
|
@@ -1349,7 +1412,7 @@ module OryHydraClient
|
|
1349
1412
|
data
|
1350
1413
|
end
|
1351
1414
|
|
1352
|
-
# Reject a
|
1415
|
+
# Reject a Consent Request
|
1353
1416
|
# 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.
|
1354
1417
|
# @param consent_challenge [String]
|
1355
1418
|
# @param [Hash] opts the optional parameters
|
@@ -1405,7 +1468,7 @@ module OryHydraClient
|
|
1405
1468
|
return data, status_code, headers
|
1406
1469
|
end
|
1407
1470
|
|
1408
|
-
# Reject a
|
1471
|
+
# Reject a Login Request
|
1409
1472
|
# 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
1473
|
# @param login_challenge [String]
|
1411
1474
|
# @param [Hash] opts the optional parameters
|
@@ -1416,7 +1479,7 @@ module OryHydraClient
|
|
1416
1479
|
data
|
1417
1480
|
end
|
1418
1481
|
|
1419
|
-
# Reject a
|
1482
|
+
# Reject a Login Request
|
1420
1483
|
# 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.
|
1421
1484
|
# @param login_challenge [String]
|
1422
1485
|
# @param [Hash] opts the optional parameters
|
@@ -1472,7 +1535,7 @@ module OryHydraClient
|
|
1472
1535
|
return data, status_code, headers
|
1473
1536
|
end
|
1474
1537
|
|
1475
|
-
# Reject a
|
1538
|
+
# Reject a Logout Request
|
1476
1539
|
# 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
1540
|
# @param logout_challenge [String]
|
1478
1541
|
# @param [Hash] opts the optional parameters
|
@@ -1483,7 +1546,7 @@ module OryHydraClient
|
|
1483
1546
|
nil
|
1484
1547
|
end
|
1485
1548
|
|
1486
|
-
# Reject a
|
1549
|
+
# Reject a Logout Request
|
1487
1550
|
# 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
1551
|
# @param logout_challenge [String]
|
1489
1552
|
# @param [Hash] opts the optional parameters
|
@@ -1539,7 +1602,7 @@ module OryHydraClient
|
|
1539
1602
|
return data, status_code, headers
|
1540
1603
|
end
|
1541
1604
|
|
1542
|
-
# Invalidates
|
1605
|
+
# Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
|
1543
1606
|
# 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
1607
|
# @param subject [String]
|
1545
1608
|
# @param [Hash] opts the optional parameters
|
@@ -1549,7 +1612,7 @@ module OryHydraClient
|
|
1549
1612
|
nil
|
1550
1613
|
end
|
1551
1614
|
|
1552
|
-
# Invalidates
|
1615
|
+
# Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
|
1553
1616
|
# 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.
|
1554
1617
|
# @param subject [String]
|
1555
1618
|
# @param [Hash] opts the optional parameters
|
@@ -1602,22 +1665,24 @@ module OryHydraClient
|
|
1602
1665
|
return data, status_code, headers
|
1603
1666
|
end
|
1604
1667
|
|
1605
|
-
# Revokes
|
1668
|
+
# Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
|
1606
1669
|
# 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
1670
|
# @param subject [String] The subject (Subject) who's consent sessions should be deleted.
|
1608
1671
|
# @param [Hash] opts the optional parameters
|
1609
1672
|
# @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
|
1673
|
+
# @option opts [Boolean] :all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted.
|
1610
1674
|
# @return [nil]
|
1611
1675
|
def revoke_consent_sessions(subject, opts = {})
|
1612
1676
|
revoke_consent_sessions_with_http_info(subject, opts)
|
1613
1677
|
nil
|
1614
1678
|
end
|
1615
1679
|
|
1616
|
-
# Revokes
|
1680
|
+
# Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
|
1617
1681
|
# 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.
|
1618
1682
|
# @param subject [String] The subject (Subject) who's consent sessions should be deleted.
|
1619
1683
|
# @param [Hash] opts the optional parameters
|
1620
1684
|
# @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
|
1685
|
+
# @option opts [Boolean] :all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted.
|
1621
1686
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1622
1687
|
def revoke_consent_sessions_with_http_info(subject, opts = {})
|
1623
1688
|
if @api_client.config.debugging
|
@@ -1634,6 +1699,7 @@ module OryHydraClient
|
|
1634
1699
|
query_params = opts[:query_params] || {}
|
1635
1700
|
query_params[:'subject'] = subject
|
1636
1701
|
query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil?
|
1702
|
+
query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil?
|
1637
1703
|
|
1638
1704
|
# header parameters
|
1639
1705
|
header_params = opts[:header_params] || {}
|