ory-hydra-client 1.9.0.alpha2 → 1.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/docs/AcceptConsentRequest.md +18 -17
- data/docs/AcceptLoginRequest.md +18 -17
- data/docs/AdminApi.md +883 -304
- data/docs/CompletedRequest.md +8 -7
- data/docs/ConsentRequest.md +30 -29
- data/docs/ConsentRequestSession.md +10 -9
- data/docs/ContainerWaitOKBodyError.md +8 -7
- data/docs/FlushInactiveOAuth2TokensRequest.md +8 -7
- data/docs/GenericError.md +14 -13
- data/docs/HealthNotReadyStatus.md +8 -7
- data/docs/HealthStatus.md +8 -7
- data/docs/JSONWebKey.md +40 -39
- data/docs/JSONWebKeySet.md +8 -7
- data/docs/JsonWebKeySetGeneratorRequest.md +12 -11
- data/docs/LoginRequest.md +24 -23
- data/docs/LogoutRequest.md +16 -13
- data/docs/OAuth2Client.md +72 -71
- data/docs/OAuth2TokenIntrospection.md +34 -31
- data/docs/Oauth2TokenResponse.md +18 -17
- data/docs/OpenIDConnectContext.md +16 -15
- data/docs/PatchDocument.md +24 -0
- data/docs/PluginConfig.md +38 -37
- data/docs/PluginConfigArgs.md +14 -13
- data/docs/PluginConfigInterface.md +10 -9
- data/docs/PluginConfigLinux.md +12 -11
- data/docs/PluginConfigNetwork.md +8 -7
- data/docs/PluginConfigRootfs.md +10 -9
- data/docs/PluginConfigUser.md +10 -9
- data/docs/PluginDevice.md +14 -13
- data/docs/PluginEnv.md +14 -13
- data/docs/PluginInterfaceType.md +12 -11
- data/docs/PluginMount.md +20 -19
- data/docs/PluginSettings.md +14 -13
- data/docs/PreviousConsentSession.md +20 -19
- data/docs/PublicApi.md +201 -60
- data/docs/RejectRequest.md +16 -15
- data/docs/RequestWasHandledResponse.md +18 -0
- data/docs/UserinfoResponse.md +44 -43
- data/docs/Version.md +8 -7
- data/docs/Volume.md +34 -0
- data/docs/VolumeUsageData.md +10 -9
- data/docs/WellKnown.md +58 -55
- data/lib/ory-hydra-client.rb +5 -2
- data/lib/ory-hydra-client/api/admin_api.rb +197 -96
- data/lib/ory-hydra-client/api/public_api.rb +34 -26
- data/lib/ory-hydra-client/api_client.rb +51 -49
- data/lib/ory-hydra-client/api_error.rb +2 -2
- data/lib/ory-hydra-client/configuration.rb +40 -11
- data/lib/ory-hydra-client/models/accept_consent_request.rb +21 -9
- data/lib/ory-hydra-client/models/accept_login_request.rb +20 -8
- data/lib/ory-hydra-client/models/completed_request.rb +20 -8
- data/lib/ory-hydra-client/models/consent_request.rb +20 -8
- data/lib/ory-hydra-client/models/consent_request_session.rb +20 -8
- data/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +20 -8
- data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +21 -9
- data/lib/ory-hydra-client/models/generic_error.rb +20 -8
- data/lib/ory-hydra-client/models/health_not_ready_status.rb +20 -8
- data/lib/ory-hydra-client/models/health_status.rb +20 -8
- data/lib/ory-hydra-client/models/json_web_key.rb +20 -8
- data/lib/ory-hydra-client/models/json_web_key_set.rb +20 -8
- data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +20 -8
- data/lib/ory-hydra-client/models/login_request.rb +20 -8
- data/lib/ory-hydra-client/models/logout_request.rb +31 -9
- data/lib/ory-hydra-client/models/o_auth2_client.rb +22 -10
- data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +32 -10
- data/lib/ory-hydra-client/models/oauth2_token_response.rb +20 -8
- data/lib/ory-hydra-client/models/open_id_connect_context.rb +20 -8
- data/lib/ory-hydra-client/models/patch_document.rb +260 -0
- data/lib/ory-hydra-client/models/plugin_config.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_config_args.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_config_interface.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_config_linux.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_config_network.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_config_rootfs.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_config_user.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_device.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_env.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_interface_type.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_mount.rb +20 -8
- data/lib/ory-hydra-client/models/plugin_settings.rb +20 -8
- data/lib/ory-hydra-client/models/previous_consent_session.rb +21 -9
- data/lib/ory-hydra-client/models/reject_request.rb +20 -8
- data/lib/ory-hydra-client/models/request_was_handled_response.rb +224 -0
- data/lib/ory-hydra-client/models/userinfo_response.rb +20 -8
- data/lib/ory-hydra-client/models/version.rb +20 -8
- data/lib/ory-hydra-client/models/volume.rb +333 -0
- data/lib/ory-hydra-client/models/volume_usage_data.rb +20 -8
- data/lib/ory-hydra-client/models/well_known.rb +33 -9
- data/lib/ory-hydra-client/version.rb +3 -3
- data/ory-hydra-client.gemspec +4 -5
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/patch_document_spec.rb +52 -0
- data/spec/models/request_was_handled_response_spec.rb +34 -0
- data/spec/models/volume_spec.rb +82 -0
- data/spec/spec_helper.rb +2 -2
- metadata +45 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d42760ac122ae7a0147329e31b06c6ae8e927c030c7d9a5f68e4ced7d0043f3
|
4
|
+
data.tar.gz: 8d04c0e6c1c19950c2f16a29ed8ef9a747ac71658a071f1b8c88d9d13a0d901f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e822b1bd7bb9a74e9379ff6b2bf214659fe79a8427b28d998cd28c12d3831acc3db9aa292d8ce013087c83ae577bf7deabcbcd8bb1b383630a53436db9b44e7c
|
7
|
+
data.tar.gz: 7b303a0ab5794aec4fcdbab6f5f4b70b2f4f7e5a1bab6b6148ab840346cbd42c2c308fa6f2ce4f21fc524a35c3bbd98de268af21998db85a815d113395174bba
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ Welcome to the ORY Hydra HTTP API documentation. You will find documentation for
|
|
6
6
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
|
-
- API version: v1.
|
10
|
-
- Package version: v1.
|
9
|
+
- API version: v1.10.2
|
10
|
+
- Package version: v1.10.2
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,16 +23,16 @@ gem build ory-hydra-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./ory-hydra-client-v1.
|
26
|
+
gem install ./ory-hydra-client-v1.10.2.gem
|
27
27
|
```
|
28
28
|
|
29
|
-
(for development, run `gem install --dev ./ory-hydra-client-v1.
|
29
|
+
(for development, run `gem install --dev ./ory-hydra-client-v1.10.2.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ory-hydra-client', '~> v1.
|
35
|
+
gem 'ory-hydra-client', '~> v1.10.2'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -99,6 +99,7 @@ Class | Method | HTTP request | Description
|
|
99
99
|
*OryHydraClient::AdminApi* | [**is_instance_alive**](docs/AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status
|
100
100
|
*OryHydraClient::AdminApi* | [**list_o_auth2_clients**](docs/AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients
|
101
101
|
*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
|
102
|
+
*OryHydraClient::AdminApi* | [**patch_o_auth2_client**](docs/AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client
|
102
103
|
*OryHydraClient::AdminApi* | [**prometheus**](docs/AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get Snapshot Metrics from the Hydra Service.
|
103
104
|
*OryHydraClient::AdminApi* | [**reject_consent_request**](docs/AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request
|
104
105
|
*OryHydraClient::AdminApi* | [**reject_login_request**](docs/AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request
|
@@ -139,6 +140,7 @@ Class | Method | HTTP request | Description
|
|
139
140
|
- [OryHydraClient::OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md)
|
140
141
|
- [OryHydraClient::Oauth2TokenResponse](docs/Oauth2TokenResponse.md)
|
141
142
|
- [OryHydraClient::OpenIDConnectContext](docs/OpenIDConnectContext.md)
|
143
|
+
- [OryHydraClient::PatchDocument](docs/PatchDocument.md)
|
142
144
|
- [OryHydraClient::PluginConfig](docs/PluginConfig.md)
|
143
145
|
- [OryHydraClient::PluginConfigArgs](docs/PluginConfigArgs.md)
|
144
146
|
- [OryHydraClient::PluginConfigInterface](docs/PluginConfigInterface.md)
|
@@ -153,8 +155,10 @@ Class | Method | HTTP request | Description
|
|
153
155
|
- [OryHydraClient::PluginSettings](docs/PluginSettings.md)
|
154
156
|
- [OryHydraClient::PreviousConsentSession](docs/PreviousConsentSession.md)
|
155
157
|
- [OryHydraClient::RejectRequest](docs/RejectRequest.md)
|
158
|
+
- [OryHydraClient::RequestWasHandledResponse](docs/RequestWasHandledResponse.md)
|
156
159
|
- [OryHydraClient::UserinfoResponse](docs/UserinfoResponse.md)
|
157
160
|
- [OryHydraClient::Version](docs/Version.md)
|
161
|
+
- [OryHydraClient::Volume](docs/Volume.md)
|
158
162
|
- [OryHydraClient::VolumeUsageData](docs/VolumeUsageData.md)
|
159
163
|
- [OryHydraClient::WellKnown](docs/WellKnown.md)
|
160
164
|
|
@@ -2,26 +2,27 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**grant_access_token_audience** | **Array<String>** | | [optional]
|
8
|
-
**grant_scope** | **Array<String>** | | [optional]
|
9
|
-
**handled_at** | **
|
10
|
-
**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]
|
11
|
-
**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]
|
12
|
-
**session** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **grant_access_token_audience** | **Array<String>** | | [optional] |
|
8
|
+
| **grant_scope** | **Array<String>** | | [optional] |
|
9
|
+
| **handled_at** | **Time** | | [optional] |
|
10
|
+
| **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] |
|
11
|
+
| **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] |
|
12
|
+
| **session** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] |
|
13
13
|
|
14
|
-
##
|
14
|
+
## Example
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
require '
|
17
|
+
require 'ory-hydra-client'
|
18
18
|
|
19
|
-
instance = OryHydraClient::AcceptConsentRequest.new(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
instance = OryHydraClient::AcceptConsentRequest.new(
|
20
|
+
grant_access_token_audience: null,
|
21
|
+
grant_scope: null,
|
22
|
+
handled_at: null,
|
23
|
+
remember: null,
|
24
|
+
remember_for: null,
|
25
|
+
session: null
|
26
|
+
)
|
25
27
|
```
|
26
28
|
|
27
|
-
|
data/docs/AcceptLoginRequest.md
CHANGED
@@ -2,26 +2,27 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
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** |
|
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. |
|
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** | **Object** | | [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
13
|
|
14
|
-
##
|
14
|
+
## Example
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
require '
|
17
|
+
require 'ory-hydra-client'
|
18
18
|
|
19
|
-
instance = OryHydraClient::AcceptLoginRequest.new(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
instance = OryHydraClient::AcceptLoginRequest.new(
|
20
|
+
acr: null,
|
21
|
+
context: null,
|
22
|
+
force_subject_identifier: null,
|
23
|
+
remember: null,
|
24
|
+
remember_for: null,
|
25
|
+
subject: null
|
26
|
+
)
|
25
27
|
```
|
26
28
|
|
27
|
-
|
data/docs/AdminApi.md
CHANGED
@@ -2,53 +2,53 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *http://localhost*
|
4
4
|
|
5
|
-
Method | HTTP request | Description
|
6
|
-
|
7
|
-
[**accept_consent_request**](AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request
|
8
|
-
[**accept_login_request**](AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a 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
|
-
[**delete_o_auth2_token**](AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client
|
16
|
-
[**flush_inactive_o_auth2_tokens**](AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens
|
17
|
-
[**get_consent_request**](AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information
|
18
|
-
[**get_json_web_key**](AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key
|
19
|
-
[**get_json_web_key_set**](AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set
|
20
|
-
[**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request
|
21
|
-
[**get_logout_request**](AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request
|
22
|
-
[**get_o_auth2_client**](AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client.
|
23
|
-
[**get_version**](AdminApi.md#get_version) | **GET** /version | Get Service Version
|
24
|
-
[**introspect_o_auth2_token**](AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens
|
25
|
-
[**is_instance_alive**](AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status
|
26
|
-
[**list_o_auth2_clients**](AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients
|
27
|
-
[**list_subject_consent_sessions**](AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject
|
28
|
-
[**
|
29
|
-
[**
|
30
|
-
[**
|
31
|
-
[**
|
32
|
-
[**
|
33
|
-
[**
|
34
|
-
[**
|
35
|
-
[**
|
36
|
-
[**
|
37
|
-
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**accept_consent_request**](AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request |
|
8
|
+
| [**accept_login_request**](AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a 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
|
+
| [**delete_o_auth2_token**](AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client |
|
16
|
+
| [**flush_inactive_o_auth2_tokens**](AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens |
|
17
|
+
| [**get_consent_request**](AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information |
|
18
|
+
| [**get_json_web_key**](AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key |
|
19
|
+
| [**get_json_web_key_set**](AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set |
|
20
|
+
| [**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request |
|
21
|
+
| [**get_logout_request**](AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request |
|
22
|
+
| [**get_o_auth2_client**](AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client. |
|
23
|
+
| [**get_version**](AdminApi.md#get_version) | **GET** /version | Get Service Version |
|
24
|
+
| [**introspect_o_auth2_token**](AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens |
|
25
|
+
| [**is_instance_alive**](AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status |
|
26
|
+
| [**list_o_auth2_clients**](AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients |
|
27
|
+
| [**list_subject_consent_sessions**](AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject |
|
28
|
+
| [**patch_o_auth2_client**](AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client |
|
29
|
+
| [**prometheus**](AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get Snapshot Metrics from the Hydra Service. |
|
30
|
+
| [**reject_consent_request**](AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request |
|
31
|
+
| [**reject_login_request**](AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request |
|
32
|
+
| [**reject_logout_request**](AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request |
|
33
|
+
| [**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 |
|
34
|
+
| [**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 |
|
35
|
+
| [**update_json_web_key**](AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key |
|
36
|
+
| [**update_json_web_key_set**](AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set |
|
37
|
+
| [**update_o_auth2_client**](AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client |
|
38
38
|
|
39
39
|
|
40
40
|
## accept_consent_request
|
41
41
|
|
42
|
-
> CompletedRequest accept_consent_request(consent_challenge, opts)
|
42
|
+
> <CompletedRequest> accept_consent_request(consent_challenge, opts)
|
43
43
|
|
44
44
|
Accept a Consent Request
|
45
45
|
|
46
46
|
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.
|
47
47
|
|
48
|
-
###
|
48
|
+
### Examples
|
49
49
|
|
50
50
|
```ruby
|
51
|
-
|
51
|
+
require 'time'
|
52
52
|
require 'ory-hydra-client'
|
53
53
|
|
54
54
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -58,21 +58,38 @@ opts = {
|
|
58
58
|
}
|
59
59
|
|
60
60
|
begin
|
61
|
-
#Accept a Consent Request
|
61
|
+
# Accept a Consent Request
|
62
62
|
result = api_instance.accept_consent_request(consent_challenge, opts)
|
63
63
|
p result
|
64
64
|
rescue OryHydraClient::ApiError => e
|
65
|
-
puts "
|
65
|
+
puts "Error when calling AdminApi->accept_consent_request: #{e}"
|
66
66
|
end
|
67
67
|
```
|
68
68
|
|
69
|
-
|
69
|
+
#### Using the accept_consent_request_with_http_info variant
|
70
|
+
|
71
|
+
This returns an Array which contains the response data, status code and headers.
|
70
72
|
|
73
|
+
> <Array(<CompletedRequest>, Integer, Hash)> accept_consent_request_with_http_info(consent_challenge, opts)
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
begin
|
77
|
+
# Accept a Consent Request
|
78
|
+
data, status_code, headers = api_instance.accept_consent_request_with_http_info(consent_challenge, opts)
|
79
|
+
p status_code # => 2xx
|
80
|
+
p headers # => { ... }
|
81
|
+
p data # => <CompletedRequest>
|
82
|
+
rescue OryHydraClient::ApiError => e
|
83
|
+
puts "Error when calling AdminApi->accept_consent_request_with_http_info: #{e}"
|
84
|
+
end
|
85
|
+
```
|
86
|
+
|
87
|
+
### Parameters
|
71
88
|
|
72
|
-
Name | Type | Description
|
73
|
-
|
74
|
-
**consent_challenge** | **String
|
75
|
-
**body** | [**AcceptConsentRequest**](AcceptConsentRequest.md)| | [optional]
|
89
|
+
| Name | Type | Description | Notes |
|
90
|
+
| ---- | ---- | ----------- | ----- |
|
91
|
+
| **consent_challenge** | **String** | | |
|
92
|
+
| **body** | [**AcceptConsentRequest**](AcceptConsentRequest.md) | | [optional] |
|
76
93
|
|
77
94
|
### Return type
|
78
95
|
|
@@ -90,40 +107,57 @@ No authorization required
|
|
90
107
|
|
91
108
|
## accept_login_request
|
92
109
|
|
93
|
-
> CompletedRequest accept_login_request(login_challenge, opts)
|
110
|
+
> <CompletedRequest> accept_login_request(login_challenge, opts)
|
94
111
|
|
95
112
|
Accept a Login Request
|
96
113
|
|
97
114
|
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.
|
98
115
|
|
99
|
-
###
|
116
|
+
### Examples
|
100
117
|
|
101
118
|
```ruby
|
102
|
-
|
119
|
+
require 'time'
|
103
120
|
require 'ory-hydra-client'
|
104
121
|
|
105
122
|
api_instance = OryHydraClient::AdminApi.new
|
106
123
|
login_challenge = 'login_challenge_example' # String |
|
107
124
|
opts = {
|
108
|
-
body: OryHydraClient::AcceptLoginRequest.new # AcceptLoginRequest |
|
125
|
+
body: OryHydraClient::AcceptLoginRequest.new({subject: 'subject_example'}) # AcceptLoginRequest |
|
109
126
|
}
|
110
127
|
|
111
128
|
begin
|
112
|
-
#Accept a Login Request
|
129
|
+
# Accept a Login Request
|
113
130
|
result = api_instance.accept_login_request(login_challenge, opts)
|
114
131
|
p result
|
115
132
|
rescue OryHydraClient::ApiError => e
|
116
|
-
puts "
|
133
|
+
puts "Error when calling AdminApi->accept_login_request: #{e}"
|
117
134
|
end
|
118
135
|
```
|
119
136
|
|
120
|
-
|
137
|
+
#### Using the accept_login_request_with_http_info variant
|
121
138
|
|
139
|
+
This returns an Array which contains the response data, status code and headers.
|
122
140
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
141
|
+
> <Array(<CompletedRequest>, Integer, Hash)> accept_login_request_with_http_info(login_challenge, opts)
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
begin
|
145
|
+
# Accept a Login Request
|
146
|
+
data, status_code, headers = api_instance.accept_login_request_with_http_info(login_challenge, opts)
|
147
|
+
p status_code # => 2xx
|
148
|
+
p headers # => { ... }
|
149
|
+
p data # => <CompletedRequest>
|
150
|
+
rescue OryHydraClient::ApiError => e
|
151
|
+
puts "Error when calling AdminApi->accept_login_request_with_http_info: #{e}"
|
152
|
+
end
|
153
|
+
```
|
154
|
+
|
155
|
+
### Parameters
|
156
|
+
|
157
|
+
| Name | Type | Description | Notes |
|
158
|
+
| ---- | ---- | ----------- | ----- |
|
159
|
+
| **login_challenge** | **String** | | |
|
160
|
+
| **body** | [**AcceptLoginRequest**](AcceptLoginRequest.md) | | [optional] |
|
127
161
|
|
128
162
|
### Return type
|
129
163
|
|
@@ -141,36 +175,53 @@ No authorization required
|
|
141
175
|
|
142
176
|
## accept_logout_request
|
143
177
|
|
144
|
-
> CompletedRequest accept_logout_request(logout_challenge)
|
178
|
+
> <CompletedRequest> accept_logout_request(logout_challenge)
|
145
179
|
|
146
180
|
Accept a Logout Request
|
147
181
|
|
148
182
|
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.
|
149
183
|
|
150
|
-
###
|
184
|
+
### Examples
|
151
185
|
|
152
186
|
```ruby
|
153
|
-
|
187
|
+
require 'time'
|
154
188
|
require 'ory-hydra-client'
|
155
189
|
|
156
190
|
api_instance = OryHydraClient::AdminApi.new
|
157
191
|
logout_challenge = 'logout_challenge_example' # String |
|
158
192
|
|
159
193
|
begin
|
160
|
-
#Accept a Logout Request
|
194
|
+
# Accept a Logout Request
|
161
195
|
result = api_instance.accept_logout_request(logout_challenge)
|
162
196
|
p result
|
163
197
|
rescue OryHydraClient::ApiError => e
|
164
|
-
puts "
|
198
|
+
puts "Error when calling AdminApi->accept_logout_request: #{e}"
|
165
199
|
end
|
166
200
|
```
|
167
201
|
|
168
|
-
|
202
|
+
#### Using the accept_logout_request_with_http_info variant
|
169
203
|
|
204
|
+
This returns an Array which contains the response data, status code and headers.
|
170
205
|
|
171
|
-
|
172
|
-
|
173
|
-
|
206
|
+
> <Array(<CompletedRequest>, Integer, Hash)> accept_logout_request_with_http_info(logout_challenge)
|
207
|
+
|
208
|
+
```ruby
|
209
|
+
begin
|
210
|
+
# Accept a Logout Request
|
211
|
+
data, status_code, headers = api_instance.accept_logout_request_with_http_info(logout_challenge)
|
212
|
+
p status_code # => 2xx
|
213
|
+
p headers # => { ... }
|
214
|
+
p data # => <CompletedRequest>
|
215
|
+
rescue OryHydraClient::ApiError => e
|
216
|
+
puts "Error when calling AdminApi->accept_logout_request_with_http_info: #{e}"
|
217
|
+
end
|
218
|
+
```
|
219
|
+
|
220
|
+
### Parameters
|
221
|
+
|
222
|
+
| Name | Type | Description | Notes |
|
223
|
+
| ---- | ---- | ----------- | ----- |
|
224
|
+
| **logout_challenge** | **String** | | |
|
174
225
|
|
175
226
|
### Return type
|
176
227
|
|
@@ -188,40 +239,57 @@ No authorization required
|
|
188
239
|
|
189
240
|
## create_json_web_key_set
|
190
241
|
|
191
|
-
> JSONWebKeySet create_json_web_key_set(set, opts)
|
242
|
+
> <JSONWebKeySet> create_json_web_key_set(set, opts)
|
192
243
|
|
193
244
|
Generate a New JSON Web Key
|
194
245
|
|
195
246
|
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.
|
196
247
|
|
197
|
-
###
|
248
|
+
### Examples
|
198
249
|
|
199
250
|
```ruby
|
200
|
-
|
251
|
+
require 'time'
|
201
252
|
require 'ory-hydra-client'
|
202
253
|
|
203
254
|
api_instance = OryHydraClient::AdminApi.new
|
204
255
|
set = 'set_example' # String | The set
|
205
256
|
opts = {
|
206
|
-
body: OryHydraClient::JsonWebKeySetGeneratorRequest.new # JsonWebKeySetGeneratorRequest |
|
257
|
+
body: OryHydraClient::JsonWebKeySetGeneratorRequest.new({alg: 'alg_example', kid: 'kid_example', use: 'use_example'}) # JsonWebKeySetGeneratorRequest |
|
207
258
|
}
|
208
259
|
|
209
260
|
begin
|
210
|
-
#Generate a New JSON Web Key
|
261
|
+
# Generate a New JSON Web Key
|
211
262
|
result = api_instance.create_json_web_key_set(set, opts)
|
212
263
|
p result
|
213
264
|
rescue OryHydraClient::ApiError => e
|
214
|
-
puts "
|
265
|
+
puts "Error when calling AdminApi->create_json_web_key_set: #{e}"
|
215
266
|
end
|
216
267
|
```
|
217
268
|
|
218
|
-
|
269
|
+
#### Using the create_json_web_key_set_with_http_info variant
|
219
270
|
|
271
|
+
This returns an Array which contains the response data, status code and headers.
|
220
272
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
273
|
+
> <Array(<JSONWebKeySet>, Integer, Hash)> create_json_web_key_set_with_http_info(set, opts)
|
274
|
+
|
275
|
+
```ruby
|
276
|
+
begin
|
277
|
+
# Generate a New JSON Web Key
|
278
|
+
data, status_code, headers = api_instance.create_json_web_key_set_with_http_info(set, opts)
|
279
|
+
p status_code # => 2xx
|
280
|
+
p headers # => { ... }
|
281
|
+
p data # => <JSONWebKeySet>
|
282
|
+
rescue OryHydraClient::ApiError => e
|
283
|
+
puts "Error when calling AdminApi->create_json_web_key_set_with_http_info: #{e}"
|
284
|
+
end
|
285
|
+
```
|
286
|
+
|
287
|
+
### Parameters
|
288
|
+
|
289
|
+
| Name | Type | Description | Notes |
|
290
|
+
| ---- | ---- | ----------- | ----- |
|
291
|
+
| **set** | **String** | The set | |
|
292
|
+
| **body** | [**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md) | | [optional] |
|
225
293
|
|
226
294
|
### Return type
|
227
295
|
|
@@ -239,36 +307,53 @@ No authorization required
|
|
239
307
|
|
240
308
|
## create_o_auth2_client
|
241
309
|
|
242
|
-
> OAuth2Client create_o_auth2_client(body)
|
310
|
+
> <OAuth2Client> create_o_auth2_client(body)
|
243
311
|
|
244
312
|
Create an OAuth 2.0 Client
|
245
313
|
|
246
314
|
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.
|
247
315
|
|
248
|
-
###
|
316
|
+
### Examples
|
249
317
|
|
250
318
|
```ruby
|
251
|
-
|
319
|
+
require 'time'
|
252
320
|
require 'ory-hydra-client'
|
253
321
|
|
254
322
|
api_instance = OryHydraClient::AdminApi.new
|
255
323
|
body = OryHydraClient::OAuth2Client.new # OAuth2Client |
|
256
324
|
|
257
325
|
begin
|
258
|
-
#Create an OAuth 2.0 Client
|
326
|
+
# Create an OAuth 2.0 Client
|
259
327
|
result = api_instance.create_o_auth2_client(body)
|
260
328
|
p result
|
261
329
|
rescue OryHydraClient::ApiError => e
|
262
|
-
puts "
|
330
|
+
puts "Error when calling AdminApi->create_o_auth2_client: #{e}"
|
263
331
|
end
|
264
332
|
```
|
265
333
|
|
266
|
-
|
334
|
+
#### Using the create_o_auth2_client_with_http_info variant
|
335
|
+
|
336
|
+
This returns an Array which contains the response data, status code and headers.
|
267
337
|
|
338
|
+
> <Array(<OAuth2Client>, Integer, Hash)> create_o_auth2_client_with_http_info(body)
|
268
339
|
|
269
|
-
|
270
|
-
|
271
|
-
|
340
|
+
```ruby
|
341
|
+
begin
|
342
|
+
# Create an OAuth 2.0 Client
|
343
|
+
data, status_code, headers = api_instance.create_o_auth2_client_with_http_info(body)
|
344
|
+
p status_code # => 2xx
|
345
|
+
p headers # => { ... }
|
346
|
+
p data # => <OAuth2Client>
|
347
|
+
rescue OryHydraClient::ApiError => e
|
348
|
+
puts "Error when calling AdminApi->create_o_auth2_client_with_http_info: #{e}"
|
349
|
+
end
|
350
|
+
```
|
351
|
+
|
352
|
+
### Parameters
|
353
|
+
|
354
|
+
| Name | Type | Description | Notes |
|
355
|
+
| ---- | ---- | ----------- | ----- |
|
356
|
+
| **body** | [**OAuth2Client**](OAuth2Client.md) | | |
|
272
357
|
|
273
358
|
### Return type
|
274
359
|
|
@@ -292,10 +377,10 @@ Delete a JSON Web Key
|
|
292
377
|
|
293
378
|
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.
|
294
379
|
|
295
|
-
###
|
380
|
+
### Examples
|
296
381
|
|
297
382
|
```ruby
|
298
|
-
|
383
|
+
require 'time'
|
299
384
|
require 'ory-hydra-client'
|
300
385
|
|
301
386
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -303,20 +388,37 @@ kid = 'kid_example' # String | The kid of the desired key
|
|
303
388
|
set = 'set_example' # String | The set
|
304
389
|
|
305
390
|
begin
|
306
|
-
#Delete a JSON Web Key
|
391
|
+
# Delete a JSON Web Key
|
307
392
|
api_instance.delete_json_web_key(kid, set)
|
308
393
|
rescue OryHydraClient::ApiError => e
|
309
|
-
puts "
|
394
|
+
puts "Error when calling AdminApi->delete_json_web_key: #{e}"
|
310
395
|
end
|
311
396
|
```
|
312
397
|
|
313
|
-
|
398
|
+
#### Using the delete_json_web_key_with_http_info variant
|
399
|
+
|
400
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
401
|
+
|
402
|
+
> <Array(nil, Integer, Hash)> delete_json_web_key_with_http_info(kid, set)
|
314
403
|
|
404
|
+
```ruby
|
405
|
+
begin
|
406
|
+
# Delete a JSON Web Key
|
407
|
+
data, status_code, headers = api_instance.delete_json_web_key_with_http_info(kid, set)
|
408
|
+
p status_code # => 2xx
|
409
|
+
p headers # => { ... }
|
410
|
+
p data # => nil
|
411
|
+
rescue OryHydraClient::ApiError => e
|
412
|
+
puts "Error when calling AdminApi->delete_json_web_key_with_http_info: #{e}"
|
413
|
+
end
|
414
|
+
```
|
315
415
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
416
|
+
### Parameters
|
417
|
+
|
418
|
+
| Name | Type | Description | Notes |
|
419
|
+
| ---- | ---- | ----------- | ----- |
|
420
|
+
| **kid** | **String** | The kid of the desired key | |
|
421
|
+
| **set** | **String** | The set | |
|
320
422
|
|
321
423
|
### Return type
|
322
424
|
|
@@ -340,29 +442,46 @@ Delete a JSON Web Key Set
|
|
340
442
|
|
341
443
|
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.
|
342
444
|
|
343
|
-
###
|
445
|
+
### Examples
|
344
446
|
|
345
447
|
```ruby
|
346
|
-
|
448
|
+
require 'time'
|
347
449
|
require 'ory-hydra-client'
|
348
450
|
|
349
451
|
api_instance = OryHydraClient::AdminApi.new
|
350
452
|
set = 'set_example' # String | The set
|
351
453
|
|
352
454
|
begin
|
353
|
-
#Delete a JSON Web Key Set
|
455
|
+
# Delete a JSON Web Key Set
|
354
456
|
api_instance.delete_json_web_key_set(set)
|
355
457
|
rescue OryHydraClient::ApiError => e
|
356
|
-
puts "
|
458
|
+
puts "Error when calling AdminApi->delete_json_web_key_set: #{e}"
|
357
459
|
end
|
358
460
|
```
|
359
461
|
|
360
|
-
|
462
|
+
#### Using the delete_json_web_key_set_with_http_info variant
|
361
463
|
|
464
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
362
465
|
|
363
|
-
|
364
|
-
|
365
|
-
|
466
|
+
> <Array(nil, Integer, Hash)> delete_json_web_key_set_with_http_info(set)
|
467
|
+
|
468
|
+
```ruby
|
469
|
+
begin
|
470
|
+
# Delete a JSON Web Key Set
|
471
|
+
data, status_code, headers = api_instance.delete_json_web_key_set_with_http_info(set)
|
472
|
+
p status_code # => 2xx
|
473
|
+
p headers # => { ... }
|
474
|
+
p data # => nil
|
475
|
+
rescue OryHydraClient::ApiError => e
|
476
|
+
puts "Error when calling AdminApi->delete_json_web_key_set_with_http_info: #{e}"
|
477
|
+
end
|
478
|
+
```
|
479
|
+
|
480
|
+
### Parameters
|
481
|
+
|
482
|
+
| Name | Type | Description | Notes |
|
483
|
+
| ---- | ---- | ----------- | ----- |
|
484
|
+
| **set** | **String** | The set | |
|
366
485
|
|
367
486
|
### Return type
|
368
487
|
|
@@ -386,29 +505,46 @@ Deletes an OAuth 2.0 Client
|
|
386
505
|
|
387
506
|
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.
|
388
507
|
|
389
|
-
###
|
508
|
+
### Examples
|
390
509
|
|
391
510
|
```ruby
|
392
|
-
|
511
|
+
require 'time'
|
393
512
|
require 'ory-hydra-client'
|
394
513
|
|
395
514
|
api_instance = OryHydraClient::AdminApi.new
|
396
515
|
id = 'id_example' # String | The id of the OAuth 2.0 Client.
|
397
516
|
|
398
517
|
begin
|
399
|
-
#Deletes an OAuth 2.0 Client
|
518
|
+
# Deletes an OAuth 2.0 Client
|
400
519
|
api_instance.delete_o_auth2_client(id)
|
401
520
|
rescue OryHydraClient::ApiError => e
|
402
|
-
puts "
|
521
|
+
puts "Error when calling AdminApi->delete_o_auth2_client: #{e}"
|
403
522
|
end
|
404
523
|
```
|
405
524
|
|
406
|
-
|
525
|
+
#### Using the delete_o_auth2_client_with_http_info variant
|
407
526
|
|
527
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
408
528
|
|
409
|
-
|
410
|
-
|
411
|
-
|
529
|
+
> <Array(nil, Integer, Hash)> delete_o_auth2_client_with_http_info(id)
|
530
|
+
|
531
|
+
```ruby
|
532
|
+
begin
|
533
|
+
# Deletes an OAuth 2.0 Client
|
534
|
+
data, status_code, headers = api_instance.delete_o_auth2_client_with_http_info(id)
|
535
|
+
p status_code # => 2xx
|
536
|
+
p headers # => { ... }
|
537
|
+
p data # => nil
|
538
|
+
rescue OryHydraClient::ApiError => e
|
539
|
+
puts "Error when calling AdminApi->delete_o_auth2_client_with_http_info: #{e}"
|
540
|
+
end
|
541
|
+
```
|
542
|
+
|
543
|
+
### Parameters
|
544
|
+
|
545
|
+
| Name | Type | Description | Notes |
|
546
|
+
| ---- | ---- | ----------- | ----- |
|
547
|
+
| **id** | **String** | The id of the OAuth 2.0 Client. | |
|
412
548
|
|
413
549
|
### Return type
|
414
550
|
|
@@ -432,29 +568,46 @@ Delete OAuth2 Access Tokens from a Client
|
|
432
568
|
|
433
569
|
This endpoint deletes OAuth2 access tokens issued for a client from the database
|
434
570
|
|
435
|
-
###
|
571
|
+
### Examples
|
436
572
|
|
437
573
|
```ruby
|
438
|
-
|
574
|
+
require 'time'
|
439
575
|
require 'ory-hydra-client'
|
440
576
|
|
441
577
|
api_instance = OryHydraClient::AdminApi.new
|
442
578
|
client_id = 'client_id_example' # String |
|
443
579
|
|
444
580
|
begin
|
445
|
-
#Delete OAuth2 Access Tokens from a Client
|
581
|
+
# Delete OAuth2 Access Tokens from a Client
|
446
582
|
api_instance.delete_o_auth2_token(client_id)
|
447
583
|
rescue OryHydraClient::ApiError => e
|
448
|
-
puts "
|
584
|
+
puts "Error when calling AdminApi->delete_o_auth2_token: #{e}"
|
449
585
|
end
|
450
586
|
```
|
451
587
|
|
452
|
-
|
588
|
+
#### Using the delete_o_auth2_token_with_http_info variant
|
453
589
|
|
590
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
454
591
|
|
455
|
-
|
456
|
-
|
457
|
-
|
592
|
+
> <Array(nil, Integer, Hash)> delete_o_auth2_token_with_http_info(client_id)
|
593
|
+
|
594
|
+
```ruby
|
595
|
+
begin
|
596
|
+
# Delete OAuth2 Access Tokens from a Client
|
597
|
+
data, status_code, headers = api_instance.delete_o_auth2_token_with_http_info(client_id)
|
598
|
+
p status_code # => 2xx
|
599
|
+
p headers # => { ... }
|
600
|
+
p data # => nil
|
601
|
+
rescue OryHydraClient::ApiError => e
|
602
|
+
puts "Error when calling AdminApi->delete_o_auth2_token_with_http_info: #{e}"
|
603
|
+
end
|
604
|
+
```
|
605
|
+
|
606
|
+
### Parameters
|
607
|
+
|
608
|
+
| Name | Type | Description | Notes |
|
609
|
+
| ---- | ---- | ----------- | ----- |
|
610
|
+
| **client_id** | **String** | | |
|
458
611
|
|
459
612
|
### Return type
|
460
613
|
|
@@ -478,10 +631,10 @@ Flush Expired OAuth2 Access Tokens
|
|
478
631
|
|
479
632
|
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.
|
480
633
|
|
481
|
-
###
|
634
|
+
### Examples
|
482
635
|
|
483
636
|
```ruby
|
484
|
-
|
637
|
+
require 'time'
|
485
638
|
require 'ory-hydra-client'
|
486
639
|
|
487
640
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -490,19 +643,36 @@ opts = {
|
|
490
643
|
}
|
491
644
|
|
492
645
|
begin
|
493
|
-
#Flush Expired OAuth2 Access Tokens
|
646
|
+
# Flush Expired OAuth2 Access Tokens
|
494
647
|
api_instance.flush_inactive_o_auth2_tokens(opts)
|
495
648
|
rescue OryHydraClient::ApiError => e
|
496
|
-
puts "
|
649
|
+
puts "Error when calling AdminApi->flush_inactive_o_auth2_tokens: #{e}"
|
497
650
|
end
|
498
651
|
```
|
499
652
|
|
500
|
-
|
653
|
+
#### Using the flush_inactive_o_auth2_tokens_with_http_info variant
|
654
|
+
|
655
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
656
|
+
|
657
|
+
> <Array(nil, Integer, Hash)> flush_inactive_o_auth2_tokens_with_http_info(opts)
|
658
|
+
|
659
|
+
```ruby
|
660
|
+
begin
|
661
|
+
# Flush Expired OAuth2 Access Tokens
|
662
|
+
data, status_code, headers = api_instance.flush_inactive_o_auth2_tokens_with_http_info(opts)
|
663
|
+
p status_code # => 2xx
|
664
|
+
p headers # => { ... }
|
665
|
+
p data # => nil
|
666
|
+
rescue OryHydraClient::ApiError => e
|
667
|
+
puts "Error when calling AdminApi->flush_inactive_o_auth2_tokens_with_http_info: #{e}"
|
668
|
+
end
|
669
|
+
```
|
501
670
|
|
671
|
+
### Parameters
|
502
672
|
|
503
|
-
Name | Type | Description
|
504
|
-
|
505
|
-
**body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md)| | [optional]
|
673
|
+
| Name | Type | Description | Notes |
|
674
|
+
| ---- | ---- | ----------- | ----- |
|
675
|
+
| **body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md) | | [optional] |
|
506
676
|
|
507
677
|
### Return type
|
508
678
|
|
@@ -520,36 +690,53 @@ No authorization required
|
|
520
690
|
|
521
691
|
## get_consent_request
|
522
692
|
|
523
|
-
> ConsentRequest get_consent_request(consent_challenge)
|
693
|
+
> <ConsentRequest> get_consent_request(consent_challenge)
|
524
694
|
|
525
695
|
Get Consent Request Information
|
526
696
|
|
527
697
|
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.
|
528
698
|
|
529
|
-
###
|
699
|
+
### Examples
|
530
700
|
|
531
701
|
```ruby
|
532
|
-
|
702
|
+
require 'time'
|
533
703
|
require 'ory-hydra-client'
|
534
704
|
|
535
705
|
api_instance = OryHydraClient::AdminApi.new
|
536
706
|
consent_challenge = 'consent_challenge_example' # String |
|
537
707
|
|
538
708
|
begin
|
539
|
-
#Get Consent Request Information
|
709
|
+
# Get Consent Request Information
|
540
710
|
result = api_instance.get_consent_request(consent_challenge)
|
541
711
|
p result
|
542
712
|
rescue OryHydraClient::ApiError => e
|
543
|
-
puts "
|
713
|
+
puts "Error when calling AdminApi->get_consent_request: #{e}"
|
544
714
|
end
|
545
715
|
```
|
546
716
|
|
547
|
-
|
717
|
+
#### Using the get_consent_request_with_http_info variant
|
718
|
+
|
719
|
+
This returns an Array which contains the response data, status code and headers.
|
548
720
|
|
721
|
+
> <Array(<ConsentRequest>, Integer, Hash)> get_consent_request_with_http_info(consent_challenge)
|
549
722
|
|
550
|
-
|
551
|
-
|
552
|
-
|
723
|
+
```ruby
|
724
|
+
begin
|
725
|
+
# Get Consent Request Information
|
726
|
+
data, status_code, headers = api_instance.get_consent_request_with_http_info(consent_challenge)
|
727
|
+
p status_code # => 2xx
|
728
|
+
p headers # => { ... }
|
729
|
+
p data # => <ConsentRequest>
|
730
|
+
rescue OryHydraClient::ApiError => e
|
731
|
+
puts "Error when calling AdminApi->get_consent_request_with_http_info: #{e}"
|
732
|
+
end
|
733
|
+
```
|
734
|
+
|
735
|
+
### Parameters
|
736
|
+
|
737
|
+
| Name | Type | Description | Notes |
|
738
|
+
| ---- | ---- | ----------- | ----- |
|
739
|
+
| **consent_challenge** | **String** | | |
|
553
740
|
|
554
741
|
### Return type
|
555
742
|
|
@@ -567,16 +754,16 @@ No authorization required
|
|
567
754
|
|
568
755
|
## get_json_web_key
|
569
756
|
|
570
|
-
> JSONWebKeySet get_json_web_key(kid, set)
|
757
|
+
> <JSONWebKeySet> get_json_web_key(kid, set)
|
571
758
|
|
572
759
|
Fetch a JSON Web Key
|
573
760
|
|
574
761
|
This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).
|
575
762
|
|
576
|
-
###
|
763
|
+
### Examples
|
577
764
|
|
578
765
|
```ruby
|
579
|
-
|
766
|
+
require 'time'
|
580
767
|
require 'ory-hydra-client'
|
581
768
|
|
582
769
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -584,21 +771,38 @@ kid = 'kid_example' # String | The kid of the desired key
|
|
584
771
|
set = 'set_example' # String | The set
|
585
772
|
|
586
773
|
begin
|
587
|
-
#Fetch a JSON Web Key
|
774
|
+
# Fetch a JSON Web Key
|
588
775
|
result = api_instance.get_json_web_key(kid, set)
|
589
776
|
p result
|
590
777
|
rescue OryHydraClient::ApiError => e
|
591
|
-
puts "
|
778
|
+
puts "Error when calling AdminApi->get_json_web_key: #{e}"
|
592
779
|
end
|
593
780
|
```
|
594
781
|
|
595
|
-
|
782
|
+
#### Using the get_json_web_key_with_http_info variant
|
596
783
|
|
784
|
+
This returns an Array which contains the response data, status code and headers.
|
597
785
|
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
786
|
+
> <Array(<JSONWebKeySet>, Integer, Hash)> get_json_web_key_with_http_info(kid, set)
|
787
|
+
|
788
|
+
```ruby
|
789
|
+
begin
|
790
|
+
# Fetch a JSON Web Key
|
791
|
+
data, status_code, headers = api_instance.get_json_web_key_with_http_info(kid, set)
|
792
|
+
p status_code # => 2xx
|
793
|
+
p headers # => { ... }
|
794
|
+
p data # => <JSONWebKeySet>
|
795
|
+
rescue OryHydraClient::ApiError => e
|
796
|
+
puts "Error when calling AdminApi->get_json_web_key_with_http_info: #{e}"
|
797
|
+
end
|
798
|
+
```
|
799
|
+
|
800
|
+
### Parameters
|
801
|
+
|
802
|
+
| Name | Type | Description | Notes |
|
803
|
+
| ---- | ---- | ----------- | ----- |
|
804
|
+
| **kid** | **String** | The kid of the desired key | |
|
805
|
+
| **set** | **String** | The set | |
|
602
806
|
|
603
807
|
### Return type
|
604
808
|
|
@@ -616,36 +820,53 @@ No authorization required
|
|
616
820
|
|
617
821
|
## get_json_web_key_set
|
618
822
|
|
619
|
-
> JSONWebKeySet get_json_web_key_set(set)
|
823
|
+
> <JSONWebKeySet> get_json_web_key_set(set)
|
620
824
|
|
621
825
|
Retrieve a JSON Web Key Set
|
622
826
|
|
623
827
|
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.
|
624
828
|
|
625
|
-
###
|
829
|
+
### Examples
|
626
830
|
|
627
831
|
```ruby
|
628
|
-
|
832
|
+
require 'time'
|
629
833
|
require 'ory-hydra-client'
|
630
834
|
|
631
835
|
api_instance = OryHydraClient::AdminApi.new
|
632
836
|
set = 'set_example' # String | The set
|
633
837
|
|
634
838
|
begin
|
635
|
-
#Retrieve a JSON Web Key Set
|
839
|
+
# Retrieve a JSON Web Key Set
|
636
840
|
result = api_instance.get_json_web_key_set(set)
|
637
841
|
p result
|
638
842
|
rescue OryHydraClient::ApiError => e
|
639
|
-
puts "
|
843
|
+
puts "Error when calling AdminApi->get_json_web_key_set: #{e}"
|
640
844
|
end
|
641
845
|
```
|
642
846
|
|
643
|
-
|
847
|
+
#### Using the get_json_web_key_set_with_http_info variant
|
644
848
|
|
849
|
+
This returns an Array which contains the response data, status code and headers.
|
645
850
|
|
646
|
-
|
647
|
-
|
648
|
-
|
851
|
+
> <Array(<JSONWebKeySet>, Integer, Hash)> get_json_web_key_set_with_http_info(set)
|
852
|
+
|
853
|
+
```ruby
|
854
|
+
begin
|
855
|
+
# Retrieve a JSON Web Key Set
|
856
|
+
data, status_code, headers = api_instance.get_json_web_key_set_with_http_info(set)
|
857
|
+
p status_code # => 2xx
|
858
|
+
p headers # => { ... }
|
859
|
+
p data # => <JSONWebKeySet>
|
860
|
+
rescue OryHydraClient::ApiError => e
|
861
|
+
puts "Error when calling AdminApi->get_json_web_key_set_with_http_info: #{e}"
|
862
|
+
end
|
863
|
+
```
|
864
|
+
|
865
|
+
### Parameters
|
866
|
+
|
867
|
+
| Name | Type | Description | Notes |
|
868
|
+
| ---- | ---- | ----------- | ----- |
|
869
|
+
| **set** | **String** | The set | |
|
649
870
|
|
650
871
|
### Return type
|
651
872
|
|
@@ -663,36 +884,53 @@ No authorization required
|
|
663
884
|
|
664
885
|
## get_login_request
|
665
886
|
|
666
|
-
> LoginRequest get_login_request(login_challenge)
|
887
|
+
> <LoginRequest> get_login_request(login_challenge)
|
667
888
|
|
668
889
|
Get a Login Request
|
669
890
|
|
670
891
|
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.
|
671
892
|
|
672
|
-
###
|
893
|
+
### Examples
|
673
894
|
|
674
895
|
```ruby
|
675
|
-
|
896
|
+
require 'time'
|
676
897
|
require 'ory-hydra-client'
|
677
898
|
|
678
899
|
api_instance = OryHydraClient::AdminApi.new
|
679
900
|
login_challenge = 'login_challenge_example' # String |
|
680
901
|
|
681
902
|
begin
|
682
|
-
#Get a Login Request
|
903
|
+
# Get a Login Request
|
683
904
|
result = api_instance.get_login_request(login_challenge)
|
684
905
|
p result
|
685
906
|
rescue OryHydraClient::ApiError => e
|
686
|
-
puts "
|
907
|
+
puts "Error when calling AdminApi->get_login_request: #{e}"
|
687
908
|
end
|
688
909
|
```
|
689
910
|
|
690
|
-
|
911
|
+
#### Using the get_login_request_with_http_info variant
|
691
912
|
|
913
|
+
This returns an Array which contains the response data, status code and headers.
|
692
914
|
|
693
|
-
|
694
|
-
|
695
|
-
|
915
|
+
> <Array(<LoginRequest>, Integer, Hash)> get_login_request_with_http_info(login_challenge)
|
916
|
+
|
917
|
+
```ruby
|
918
|
+
begin
|
919
|
+
# Get a Login Request
|
920
|
+
data, status_code, headers = api_instance.get_login_request_with_http_info(login_challenge)
|
921
|
+
p status_code # => 2xx
|
922
|
+
p headers # => { ... }
|
923
|
+
p data # => <LoginRequest>
|
924
|
+
rescue OryHydraClient::ApiError => e
|
925
|
+
puts "Error when calling AdminApi->get_login_request_with_http_info: #{e}"
|
926
|
+
end
|
927
|
+
```
|
928
|
+
|
929
|
+
### Parameters
|
930
|
+
|
931
|
+
| Name | Type | Description | Notes |
|
932
|
+
| ---- | ---- | ----------- | ----- |
|
933
|
+
| **login_challenge** | **String** | | |
|
696
934
|
|
697
935
|
### Return type
|
698
936
|
|
@@ -710,36 +948,53 @@ No authorization required
|
|
710
948
|
|
711
949
|
## get_logout_request
|
712
950
|
|
713
|
-
> LogoutRequest get_logout_request(logout_challenge)
|
951
|
+
> <LogoutRequest> get_logout_request(logout_challenge)
|
714
952
|
|
715
953
|
Get a Logout Request
|
716
954
|
|
717
955
|
Use this endpoint to fetch a logout request.
|
718
956
|
|
719
|
-
###
|
957
|
+
### Examples
|
720
958
|
|
721
959
|
```ruby
|
722
|
-
|
960
|
+
require 'time'
|
723
961
|
require 'ory-hydra-client'
|
724
962
|
|
725
963
|
api_instance = OryHydraClient::AdminApi.new
|
726
964
|
logout_challenge = 'logout_challenge_example' # String |
|
727
965
|
|
728
966
|
begin
|
729
|
-
#Get a Logout Request
|
967
|
+
# Get a Logout Request
|
730
968
|
result = api_instance.get_logout_request(logout_challenge)
|
731
969
|
p result
|
732
970
|
rescue OryHydraClient::ApiError => e
|
733
|
-
puts "
|
971
|
+
puts "Error when calling AdminApi->get_logout_request: #{e}"
|
734
972
|
end
|
735
973
|
```
|
736
974
|
|
737
|
-
|
975
|
+
#### Using the get_logout_request_with_http_info variant
|
976
|
+
|
977
|
+
This returns an Array which contains the response data, status code and headers.
|
978
|
+
|
979
|
+
> <Array(<LogoutRequest>, Integer, Hash)> get_logout_request_with_http_info(logout_challenge)
|
980
|
+
|
981
|
+
```ruby
|
982
|
+
begin
|
983
|
+
# Get a Logout Request
|
984
|
+
data, status_code, headers = api_instance.get_logout_request_with_http_info(logout_challenge)
|
985
|
+
p status_code # => 2xx
|
986
|
+
p headers # => { ... }
|
987
|
+
p data # => <LogoutRequest>
|
988
|
+
rescue OryHydraClient::ApiError => e
|
989
|
+
puts "Error when calling AdminApi->get_logout_request_with_http_info: #{e}"
|
990
|
+
end
|
991
|
+
```
|
738
992
|
|
993
|
+
### Parameters
|
739
994
|
|
740
|
-
Name | Type | Description
|
741
|
-
|
742
|
-
**logout_challenge** | **String
|
995
|
+
| Name | Type | Description | Notes |
|
996
|
+
| ---- | ---- | ----------- | ----- |
|
997
|
+
| **logout_challenge** | **String** | | |
|
743
998
|
|
744
999
|
### Return type
|
745
1000
|
|
@@ -757,36 +1012,53 @@ No authorization required
|
|
757
1012
|
|
758
1013
|
## get_o_auth2_client
|
759
1014
|
|
760
|
-
> OAuth2Client get_o_auth2_client(id)
|
1015
|
+
> <OAuth2Client> get_o_auth2_client(id)
|
761
1016
|
|
762
1017
|
Get an OAuth 2.0 Client.
|
763
1018
|
|
764
1019
|
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.
|
765
1020
|
|
766
|
-
###
|
1021
|
+
### Examples
|
767
1022
|
|
768
1023
|
```ruby
|
769
|
-
|
1024
|
+
require 'time'
|
770
1025
|
require 'ory-hydra-client'
|
771
1026
|
|
772
1027
|
api_instance = OryHydraClient::AdminApi.new
|
773
1028
|
id = 'id_example' # String | The id of the OAuth 2.0 Client.
|
774
1029
|
|
775
1030
|
begin
|
776
|
-
#Get an OAuth 2.0 Client.
|
1031
|
+
# Get an OAuth 2.0 Client.
|
777
1032
|
result = api_instance.get_o_auth2_client(id)
|
778
1033
|
p result
|
779
1034
|
rescue OryHydraClient::ApiError => e
|
780
|
-
puts "
|
1035
|
+
puts "Error when calling AdminApi->get_o_auth2_client: #{e}"
|
781
1036
|
end
|
782
1037
|
```
|
783
1038
|
|
784
|
-
|
1039
|
+
#### Using the get_o_auth2_client_with_http_info variant
|
1040
|
+
|
1041
|
+
This returns an Array which contains the response data, status code and headers.
|
785
1042
|
|
1043
|
+
> <Array(<OAuth2Client>, Integer, Hash)> get_o_auth2_client_with_http_info(id)
|
1044
|
+
|
1045
|
+
```ruby
|
1046
|
+
begin
|
1047
|
+
# Get an OAuth 2.0 Client.
|
1048
|
+
data, status_code, headers = api_instance.get_o_auth2_client_with_http_info(id)
|
1049
|
+
p status_code # => 2xx
|
1050
|
+
p headers # => { ... }
|
1051
|
+
p data # => <OAuth2Client>
|
1052
|
+
rescue OryHydraClient::ApiError => e
|
1053
|
+
puts "Error when calling AdminApi->get_o_auth2_client_with_http_info: #{e}"
|
1054
|
+
end
|
1055
|
+
```
|
1056
|
+
|
1057
|
+
### Parameters
|
786
1058
|
|
787
|
-
Name | Type | Description
|
788
|
-
|
789
|
-
**id** | **String
|
1059
|
+
| Name | Type | Description | Notes |
|
1060
|
+
| ---- | ---- | ----------- | ----- |
|
1061
|
+
| **id** | **String** | The id of the OAuth 2.0 Client. | |
|
790
1062
|
|
791
1063
|
### Return type
|
792
1064
|
|
@@ -804,26 +1076,44 @@ No authorization required
|
|
804
1076
|
|
805
1077
|
## get_version
|
806
1078
|
|
807
|
-
> Version get_version
|
1079
|
+
> <Version> get_version
|
808
1080
|
|
809
1081
|
Get Service Version
|
810
1082
|
|
811
1083
|
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.
|
812
1084
|
|
813
|
-
###
|
1085
|
+
### Examples
|
814
1086
|
|
815
1087
|
```ruby
|
816
|
-
|
1088
|
+
require 'time'
|
817
1089
|
require 'ory-hydra-client'
|
818
1090
|
|
819
1091
|
api_instance = OryHydraClient::AdminApi.new
|
820
1092
|
|
821
1093
|
begin
|
822
|
-
#Get Service Version
|
1094
|
+
# Get Service Version
|
823
1095
|
result = api_instance.get_version
|
824
1096
|
p result
|
825
1097
|
rescue OryHydraClient::ApiError => e
|
826
|
-
puts "
|
1098
|
+
puts "Error when calling AdminApi->get_version: #{e}"
|
1099
|
+
end
|
1100
|
+
```
|
1101
|
+
|
1102
|
+
#### Using the get_version_with_http_info variant
|
1103
|
+
|
1104
|
+
This returns an Array which contains the response data, status code and headers.
|
1105
|
+
|
1106
|
+
> <Array(<Version>, Integer, Hash)> get_version_with_http_info
|
1107
|
+
|
1108
|
+
```ruby
|
1109
|
+
begin
|
1110
|
+
# Get Service Version
|
1111
|
+
data, status_code, headers = api_instance.get_version_with_http_info
|
1112
|
+
p status_code # => 2xx
|
1113
|
+
p headers # => { ... }
|
1114
|
+
p data # => <Version>
|
1115
|
+
rescue OryHydraClient::ApiError => e
|
1116
|
+
puts "Error when calling AdminApi->get_version_with_http_info: #{e}"
|
827
1117
|
end
|
828
1118
|
```
|
829
1119
|
|
@@ -847,16 +1137,16 @@ No authorization required
|
|
847
1137
|
|
848
1138
|
## introspect_o_auth2_token
|
849
1139
|
|
850
|
-
> OAuth2TokenIntrospection introspect_o_auth2_token(token, opts)
|
1140
|
+
> <OAuth2TokenIntrospection> introspect_o_auth2_token(token, opts)
|
851
1141
|
|
852
1142
|
Introspect OAuth2 Tokens
|
853
1143
|
|
854
1144
|
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/).
|
855
1145
|
|
856
|
-
###
|
1146
|
+
### Examples
|
857
1147
|
|
858
1148
|
```ruby
|
859
|
-
|
1149
|
+
require 'time'
|
860
1150
|
require 'ory-hydra-client'
|
861
1151
|
|
862
1152
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -866,21 +1156,38 @@ opts = {
|
|
866
1156
|
}
|
867
1157
|
|
868
1158
|
begin
|
869
|
-
#Introspect OAuth2 Tokens
|
1159
|
+
# Introspect OAuth2 Tokens
|
870
1160
|
result = api_instance.introspect_o_auth2_token(token, opts)
|
871
1161
|
p result
|
872
1162
|
rescue OryHydraClient::ApiError => e
|
873
|
-
puts "
|
1163
|
+
puts "Error when calling AdminApi->introspect_o_auth2_token: #{e}"
|
874
1164
|
end
|
875
1165
|
```
|
876
1166
|
|
877
|
-
|
1167
|
+
#### Using the introspect_o_auth2_token_with_http_info variant
|
878
1168
|
|
1169
|
+
This returns an Array which contains the response data, status code and headers.
|
879
1170
|
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
1171
|
+
> <Array(<OAuth2TokenIntrospection>, Integer, Hash)> introspect_o_auth2_token_with_http_info(token, opts)
|
1172
|
+
|
1173
|
+
```ruby
|
1174
|
+
begin
|
1175
|
+
# Introspect OAuth2 Tokens
|
1176
|
+
data, status_code, headers = api_instance.introspect_o_auth2_token_with_http_info(token, opts)
|
1177
|
+
p status_code # => 2xx
|
1178
|
+
p headers # => { ... }
|
1179
|
+
p data # => <OAuth2TokenIntrospection>
|
1180
|
+
rescue OryHydraClient::ApiError => e
|
1181
|
+
puts "Error when calling AdminApi->introspect_o_auth2_token_with_http_info: #{e}"
|
1182
|
+
end
|
1183
|
+
```
|
1184
|
+
|
1185
|
+
### Parameters
|
1186
|
+
|
1187
|
+
| Name | Type | Description | Notes |
|
1188
|
+
| ---- | ---- | ----------- | ----- |
|
1189
|
+
| **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. | |
|
1190
|
+
| **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] |
|
884
1191
|
|
885
1192
|
### Return type
|
886
1193
|
|
@@ -898,26 +1205,44 @@ No authorization required
|
|
898
1205
|
|
899
1206
|
## is_instance_alive
|
900
1207
|
|
901
|
-
> HealthStatus is_instance_alive
|
1208
|
+
> <HealthStatus> is_instance_alive
|
902
1209
|
|
903
1210
|
Check Alive Status
|
904
1211
|
|
905
1212
|
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.
|
906
1213
|
|
907
|
-
###
|
1214
|
+
### Examples
|
908
1215
|
|
909
1216
|
```ruby
|
910
|
-
|
1217
|
+
require 'time'
|
911
1218
|
require 'ory-hydra-client'
|
912
1219
|
|
913
1220
|
api_instance = OryHydraClient::AdminApi.new
|
914
1221
|
|
915
1222
|
begin
|
916
|
-
#Check Alive Status
|
1223
|
+
# Check Alive Status
|
917
1224
|
result = api_instance.is_instance_alive
|
918
1225
|
p result
|
919
1226
|
rescue OryHydraClient::ApiError => e
|
920
|
-
puts "
|
1227
|
+
puts "Error when calling AdminApi->is_instance_alive: #{e}"
|
1228
|
+
end
|
1229
|
+
```
|
1230
|
+
|
1231
|
+
#### Using the is_instance_alive_with_http_info variant
|
1232
|
+
|
1233
|
+
This returns an Array which contains the response data, status code and headers.
|
1234
|
+
|
1235
|
+
> <Array(<HealthStatus>, Integer, Hash)> is_instance_alive_with_http_info
|
1236
|
+
|
1237
|
+
```ruby
|
1238
|
+
begin
|
1239
|
+
# Check Alive Status
|
1240
|
+
data, status_code, headers = api_instance.is_instance_alive_with_http_info
|
1241
|
+
p status_code # => 2xx
|
1242
|
+
p headers # => { ... }
|
1243
|
+
p data # => <HealthStatus>
|
1244
|
+
rescue OryHydraClient::ApiError => e
|
1245
|
+
puts "Error when calling AdminApi->is_instance_alive_with_http_info: #{e}"
|
921
1246
|
end
|
922
1247
|
```
|
923
1248
|
|
@@ -941,40 +1266,57 @@ No authorization required
|
|
941
1266
|
|
942
1267
|
## list_o_auth2_clients
|
943
1268
|
|
944
|
-
> Array
|
1269
|
+
> <Array<OAuth2Client>> list_o_auth2_clients(opts)
|
945
1270
|
|
946
1271
|
List OAuth 2.0 Clients
|
947
1272
|
|
948
|
-
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.
|
1273
|
+
This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. 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.
|
949
1274
|
|
950
|
-
###
|
1275
|
+
### Examples
|
951
1276
|
|
952
1277
|
```ruby
|
953
|
-
|
1278
|
+
require 'time'
|
954
1279
|
require 'ory-hydra-client'
|
955
1280
|
|
956
1281
|
api_instance = OryHydraClient::AdminApi.new
|
957
1282
|
opts = {
|
958
|
-
limit:
|
959
|
-
offset:
|
1283
|
+
limit: 789, # Integer | The maximum amount of policies returned, upper bound is 500 policies
|
1284
|
+
offset: 789 # Integer | The offset from where to start looking.
|
960
1285
|
}
|
961
1286
|
|
962
1287
|
begin
|
963
|
-
#List OAuth 2.0 Clients
|
1288
|
+
# List OAuth 2.0 Clients
|
964
1289
|
result = api_instance.list_o_auth2_clients(opts)
|
965
1290
|
p result
|
966
1291
|
rescue OryHydraClient::ApiError => e
|
967
|
-
puts "
|
1292
|
+
puts "Error when calling AdminApi->list_o_auth2_clients: #{e}"
|
968
1293
|
end
|
969
1294
|
```
|
970
1295
|
|
971
|
-
|
1296
|
+
#### Using the list_o_auth2_clients_with_http_info variant
|
972
1297
|
|
1298
|
+
This returns an Array which contains the response data, status code and headers.
|
973
1299
|
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
1300
|
+
> <Array(<Array<OAuth2Client>>, Integer, Hash)> list_o_auth2_clients_with_http_info(opts)
|
1301
|
+
|
1302
|
+
```ruby
|
1303
|
+
begin
|
1304
|
+
# List OAuth 2.0 Clients
|
1305
|
+
data, status_code, headers = api_instance.list_o_auth2_clients_with_http_info(opts)
|
1306
|
+
p status_code # => 2xx
|
1307
|
+
p headers # => { ... }
|
1308
|
+
p data # => <Array<OAuth2Client>>
|
1309
|
+
rescue OryHydraClient::ApiError => e
|
1310
|
+
puts "Error when calling AdminApi->list_o_auth2_clients_with_http_info: #{e}"
|
1311
|
+
end
|
1312
|
+
```
|
1313
|
+
|
1314
|
+
### Parameters
|
1315
|
+
|
1316
|
+
| Name | Type | Description | Notes |
|
1317
|
+
| ---- | ---- | ----------- | ----- |
|
1318
|
+
| **limit** | **Integer** | The maximum amount of policies returned, upper bound is 500 policies | [optional] |
|
1319
|
+
| **offset** | **Integer** | The offset from where to start looking. | [optional] |
|
978
1320
|
|
979
1321
|
### Return type
|
980
1322
|
|
@@ -992,36 +1334,53 @@ No authorization required
|
|
992
1334
|
|
993
1335
|
## list_subject_consent_sessions
|
994
1336
|
|
995
|
-
> Array
|
1337
|
+
> <Array<PreviousConsentSession>> list_subject_consent_sessions(subject)
|
996
1338
|
|
997
1339
|
Lists All Consent Sessions of a Subject
|
998
1340
|
|
999
1341
|
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.
|
1000
1342
|
|
1001
|
-
###
|
1343
|
+
### Examples
|
1002
1344
|
|
1003
1345
|
```ruby
|
1004
|
-
|
1346
|
+
require 'time'
|
1005
1347
|
require 'ory-hydra-client'
|
1006
1348
|
|
1007
1349
|
api_instance = OryHydraClient::AdminApi.new
|
1008
1350
|
subject = 'subject_example' # String |
|
1009
1351
|
|
1010
1352
|
begin
|
1011
|
-
#Lists All Consent Sessions of a Subject
|
1353
|
+
# Lists All Consent Sessions of a Subject
|
1012
1354
|
result = api_instance.list_subject_consent_sessions(subject)
|
1013
1355
|
p result
|
1014
1356
|
rescue OryHydraClient::ApiError => e
|
1015
|
-
puts "
|
1357
|
+
puts "Error when calling AdminApi->list_subject_consent_sessions: #{e}"
|
1016
1358
|
end
|
1017
1359
|
```
|
1018
1360
|
|
1019
|
-
|
1361
|
+
#### Using the list_subject_consent_sessions_with_http_info variant
|
1020
1362
|
|
1363
|
+
This returns an Array which contains the response data, status code and headers.
|
1021
1364
|
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1365
|
+
> <Array(<Array<PreviousConsentSession>>, Integer, Hash)> list_subject_consent_sessions_with_http_info(subject)
|
1366
|
+
|
1367
|
+
```ruby
|
1368
|
+
begin
|
1369
|
+
# Lists All Consent Sessions of a Subject
|
1370
|
+
data, status_code, headers = api_instance.list_subject_consent_sessions_with_http_info(subject)
|
1371
|
+
p status_code # => 2xx
|
1372
|
+
p headers # => { ... }
|
1373
|
+
p data # => <Array<PreviousConsentSession>>
|
1374
|
+
rescue OryHydraClient::ApiError => e
|
1375
|
+
puts "Error when calling AdminApi->list_subject_consent_sessions_with_http_info: #{e}"
|
1376
|
+
end
|
1377
|
+
```
|
1378
|
+
|
1379
|
+
### Parameters
|
1380
|
+
|
1381
|
+
| Name | Type | Description | Notes |
|
1382
|
+
| ---- | ---- | ----------- | ----- |
|
1383
|
+
| **subject** | **String** | | |
|
1025
1384
|
|
1026
1385
|
### Return type
|
1027
1386
|
|
@@ -1037,6 +1396,72 @@ No authorization required
|
|
1037
1396
|
- **Accept**: application/json
|
1038
1397
|
|
1039
1398
|
|
1399
|
+
## patch_o_auth2_client
|
1400
|
+
|
1401
|
+
> <OAuth2Client> patch_o_auth2_client(id, body)
|
1402
|
+
|
1403
|
+
Patch an OAuth 2.0 Client
|
1404
|
+
|
1405
|
+
Patch an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. 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.
|
1406
|
+
|
1407
|
+
### Examples
|
1408
|
+
|
1409
|
+
```ruby
|
1410
|
+
require 'time'
|
1411
|
+
require 'ory-hydra-client'
|
1412
|
+
|
1413
|
+
api_instance = OryHydraClient::AdminApi.new
|
1414
|
+
id = 'id_example' # String |
|
1415
|
+
body = [OryHydraClient::PatchDocument.new({op: '"replace"', path: '"/name"'})] # Array<PatchDocument> |
|
1416
|
+
|
1417
|
+
begin
|
1418
|
+
# Patch an OAuth 2.0 Client
|
1419
|
+
result = api_instance.patch_o_auth2_client(id, body)
|
1420
|
+
p result
|
1421
|
+
rescue OryHydraClient::ApiError => e
|
1422
|
+
puts "Error when calling AdminApi->patch_o_auth2_client: #{e}"
|
1423
|
+
end
|
1424
|
+
```
|
1425
|
+
|
1426
|
+
#### Using the patch_o_auth2_client_with_http_info variant
|
1427
|
+
|
1428
|
+
This returns an Array which contains the response data, status code and headers.
|
1429
|
+
|
1430
|
+
> <Array(<OAuth2Client>, Integer, Hash)> patch_o_auth2_client_with_http_info(id, body)
|
1431
|
+
|
1432
|
+
```ruby
|
1433
|
+
begin
|
1434
|
+
# Patch an OAuth 2.0 Client
|
1435
|
+
data, status_code, headers = api_instance.patch_o_auth2_client_with_http_info(id, body)
|
1436
|
+
p status_code # => 2xx
|
1437
|
+
p headers # => { ... }
|
1438
|
+
p data # => <OAuth2Client>
|
1439
|
+
rescue OryHydraClient::ApiError => e
|
1440
|
+
puts "Error when calling AdminApi->patch_o_auth2_client_with_http_info: #{e}"
|
1441
|
+
end
|
1442
|
+
```
|
1443
|
+
|
1444
|
+
### Parameters
|
1445
|
+
|
1446
|
+
| Name | Type | Description | Notes |
|
1447
|
+
| ---- | ---- | ----------- | ----- |
|
1448
|
+
| **id** | **String** | | |
|
1449
|
+
| **body** | [**Array<PatchDocument>**](PatchDocument.md) | | |
|
1450
|
+
|
1451
|
+
### Return type
|
1452
|
+
|
1453
|
+
[**OAuth2Client**](OAuth2Client.md)
|
1454
|
+
|
1455
|
+
### Authorization
|
1456
|
+
|
1457
|
+
No authorization required
|
1458
|
+
|
1459
|
+
### HTTP request headers
|
1460
|
+
|
1461
|
+
- **Content-Type**: application/json
|
1462
|
+
- **Accept**: application/json
|
1463
|
+
|
1464
|
+
|
1040
1465
|
## prometheus
|
1041
1466
|
|
1042
1467
|
> prometheus
|
@@ -1045,19 +1470,37 @@ Get Snapshot Metrics from the Hydra Service.
|
|
1045
1470
|
|
1046
1471
|
If you're using k8s, you can then add annotations to your deployment like so: ``` 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.
|
1047
1472
|
|
1048
|
-
###
|
1473
|
+
### Examples
|
1049
1474
|
|
1050
1475
|
```ruby
|
1051
|
-
|
1476
|
+
require 'time'
|
1052
1477
|
require 'ory-hydra-client'
|
1053
1478
|
|
1054
1479
|
api_instance = OryHydraClient::AdminApi.new
|
1055
1480
|
|
1056
1481
|
begin
|
1057
|
-
#Get Snapshot Metrics from the Hydra Service.
|
1482
|
+
# Get Snapshot Metrics from the Hydra Service.
|
1058
1483
|
api_instance.prometheus
|
1059
1484
|
rescue OryHydraClient::ApiError => e
|
1060
|
-
puts "
|
1485
|
+
puts "Error when calling AdminApi->prometheus: #{e}"
|
1486
|
+
end
|
1487
|
+
```
|
1488
|
+
|
1489
|
+
#### Using the prometheus_with_http_info variant
|
1490
|
+
|
1491
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1492
|
+
|
1493
|
+
> <Array(nil, Integer, Hash)> prometheus_with_http_info
|
1494
|
+
|
1495
|
+
```ruby
|
1496
|
+
begin
|
1497
|
+
# Get Snapshot Metrics from the Hydra Service.
|
1498
|
+
data, status_code, headers = api_instance.prometheus_with_http_info
|
1499
|
+
p status_code # => 2xx
|
1500
|
+
p headers # => { ... }
|
1501
|
+
p data # => nil
|
1502
|
+
rescue OryHydraClient::ApiError => e
|
1503
|
+
puts "Error when calling AdminApi->prometheus_with_http_info: #{e}"
|
1061
1504
|
end
|
1062
1505
|
```
|
1063
1506
|
|
@@ -1081,16 +1524,16 @@ No authorization required
|
|
1081
1524
|
|
1082
1525
|
## reject_consent_request
|
1083
1526
|
|
1084
|
-
> CompletedRequest reject_consent_request(consent_challenge, opts)
|
1527
|
+
> <CompletedRequest> reject_consent_request(consent_challenge, opts)
|
1085
1528
|
|
1086
1529
|
Reject a Consent Request
|
1087
1530
|
|
1088
1531
|
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.
|
1089
1532
|
|
1090
|
-
###
|
1533
|
+
### Examples
|
1091
1534
|
|
1092
1535
|
```ruby
|
1093
|
-
|
1536
|
+
require 'time'
|
1094
1537
|
require 'ory-hydra-client'
|
1095
1538
|
|
1096
1539
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -1100,21 +1543,38 @@ opts = {
|
|
1100
1543
|
}
|
1101
1544
|
|
1102
1545
|
begin
|
1103
|
-
#Reject a Consent Request
|
1546
|
+
# Reject a Consent Request
|
1104
1547
|
result = api_instance.reject_consent_request(consent_challenge, opts)
|
1105
1548
|
p result
|
1106
1549
|
rescue OryHydraClient::ApiError => e
|
1107
|
-
puts "
|
1550
|
+
puts "Error when calling AdminApi->reject_consent_request: #{e}"
|
1108
1551
|
end
|
1109
1552
|
```
|
1110
1553
|
|
1111
|
-
|
1554
|
+
#### Using the reject_consent_request_with_http_info variant
|
1555
|
+
|
1556
|
+
This returns an Array which contains the response data, status code and headers.
|
1557
|
+
|
1558
|
+
> <Array(<CompletedRequest>, Integer, Hash)> reject_consent_request_with_http_info(consent_challenge, opts)
|
1559
|
+
|
1560
|
+
```ruby
|
1561
|
+
begin
|
1562
|
+
# Reject a Consent Request
|
1563
|
+
data, status_code, headers = api_instance.reject_consent_request_with_http_info(consent_challenge, opts)
|
1564
|
+
p status_code # => 2xx
|
1565
|
+
p headers # => { ... }
|
1566
|
+
p data # => <CompletedRequest>
|
1567
|
+
rescue OryHydraClient::ApiError => e
|
1568
|
+
puts "Error when calling AdminApi->reject_consent_request_with_http_info: #{e}"
|
1569
|
+
end
|
1570
|
+
```
|
1112
1571
|
|
1572
|
+
### Parameters
|
1113
1573
|
|
1114
|
-
Name | Type | Description
|
1115
|
-
|
1116
|
-
**consent_challenge** | **String
|
1117
|
-
**body** | [**RejectRequest**](RejectRequest.md)| | [optional]
|
1574
|
+
| Name | Type | Description | Notes |
|
1575
|
+
| ---- | ---- | ----------- | ----- |
|
1576
|
+
| **consent_challenge** | **String** | | |
|
1577
|
+
| **body** | [**RejectRequest**](RejectRequest.md) | | [optional] |
|
1118
1578
|
|
1119
1579
|
### Return type
|
1120
1580
|
|
@@ -1132,16 +1592,16 @@ No authorization required
|
|
1132
1592
|
|
1133
1593
|
## reject_login_request
|
1134
1594
|
|
1135
|
-
> CompletedRequest reject_login_request(login_challenge, opts)
|
1595
|
+
> <CompletedRequest> reject_login_request(login_challenge, opts)
|
1136
1596
|
|
1137
1597
|
Reject a Login Request
|
1138
1598
|
|
1139
1599
|
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.
|
1140
1600
|
|
1141
|
-
###
|
1601
|
+
### Examples
|
1142
1602
|
|
1143
1603
|
```ruby
|
1144
|
-
|
1604
|
+
require 'time'
|
1145
1605
|
require 'ory-hydra-client'
|
1146
1606
|
|
1147
1607
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -1151,21 +1611,38 @@ opts = {
|
|
1151
1611
|
}
|
1152
1612
|
|
1153
1613
|
begin
|
1154
|
-
#Reject a Login Request
|
1614
|
+
# Reject a Login Request
|
1155
1615
|
result = api_instance.reject_login_request(login_challenge, opts)
|
1156
1616
|
p result
|
1157
1617
|
rescue OryHydraClient::ApiError => e
|
1158
|
-
puts "
|
1618
|
+
puts "Error when calling AdminApi->reject_login_request: #{e}"
|
1159
1619
|
end
|
1160
1620
|
```
|
1161
1621
|
|
1162
|
-
|
1622
|
+
#### Using the reject_login_request_with_http_info variant
|
1623
|
+
|
1624
|
+
This returns an Array which contains the response data, status code and headers.
|
1163
1625
|
|
1626
|
+
> <Array(<CompletedRequest>, Integer, Hash)> reject_login_request_with_http_info(login_challenge, opts)
|
1164
1627
|
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1628
|
+
```ruby
|
1629
|
+
begin
|
1630
|
+
# Reject a Login Request
|
1631
|
+
data, status_code, headers = api_instance.reject_login_request_with_http_info(login_challenge, opts)
|
1632
|
+
p status_code # => 2xx
|
1633
|
+
p headers # => { ... }
|
1634
|
+
p data # => <CompletedRequest>
|
1635
|
+
rescue OryHydraClient::ApiError => e
|
1636
|
+
puts "Error when calling AdminApi->reject_login_request_with_http_info: #{e}"
|
1637
|
+
end
|
1638
|
+
```
|
1639
|
+
|
1640
|
+
### Parameters
|
1641
|
+
|
1642
|
+
| Name | Type | Description | Notes |
|
1643
|
+
| ---- | ---- | ----------- | ----- |
|
1644
|
+
| **login_challenge** | **String** | | |
|
1645
|
+
| **body** | [**RejectRequest**](RejectRequest.md) | | [optional] |
|
1169
1646
|
|
1170
1647
|
### Return type
|
1171
1648
|
|
@@ -1189,10 +1666,10 @@ Reject a Logout Request
|
|
1189
1666
|
|
1190
1667
|
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.
|
1191
1668
|
|
1192
|
-
###
|
1669
|
+
### Examples
|
1193
1670
|
|
1194
1671
|
```ruby
|
1195
|
-
|
1672
|
+
require 'time'
|
1196
1673
|
require 'ory-hydra-client'
|
1197
1674
|
|
1198
1675
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -1202,20 +1679,37 @@ opts = {
|
|
1202
1679
|
}
|
1203
1680
|
|
1204
1681
|
begin
|
1205
|
-
#Reject a Logout Request
|
1682
|
+
# Reject a Logout Request
|
1206
1683
|
api_instance.reject_logout_request(logout_challenge, opts)
|
1207
1684
|
rescue OryHydraClient::ApiError => e
|
1208
|
-
puts "
|
1685
|
+
puts "Error when calling AdminApi->reject_logout_request: #{e}"
|
1209
1686
|
end
|
1210
1687
|
```
|
1211
1688
|
|
1212
|
-
|
1689
|
+
#### Using the reject_logout_request_with_http_info variant
|
1213
1690
|
|
1691
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1214
1692
|
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1693
|
+
> <Array(nil, Integer, Hash)> reject_logout_request_with_http_info(logout_challenge, opts)
|
1694
|
+
|
1695
|
+
```ruby
|
1696
|
+
begin
|
1697
|
+
# Reject a Logout Request
|
1698
|
+
data, status_code, headers = api_instance.reject_logout_request_with_http_info(logout_challenge, opts)
|
1699
|
+
p status_code # => 2xx
|
1700
|
+
p headers # => { ... }
|
1701
|
+
p data # => nil
|
1702
|
+
rescue OryHydraClient::ApiError => e
|
1703
|
+
puts "Error when calling AdminApi->reject_logout_request_with_http_info: #{e}"
|
1704
|
+
end
|
1705
|
+
```
|
1706
|
+
|
1707
|
+
### Parameters
|
1708
|
+
|
1709
|
+
| Name | Type | Description | Notes |
|
1710
|
+
| ---- | ---- | ----------- | ----- |
|
1711
|
+
| **logout_challenge** | **String** | | |
|
1712
|
+
| **body** | [**RejectRequest**](RejectRequest.md) | | [optional] |
|
1219
1713
|
|
1220
1714
|
### Return type
|
1221
1715
|
|
@@ -1239,29 +1733,46 @@ Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authent
|
|
1239
1733
|
|
1240
1734
|
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.
|
1241
1735
|
|
1242
|
-
###
|
1736
|
+
### Examples
|
1243
1737
|
|
1244
1738
|
```ruby
|
1245
|
-
|
1739
|
+
require 'time'
|
1246
1740
|
require 'ory-hydra-client'
|
1247
1741
|
|
1248
1742
|
api_instance = OryHydraClient::AdminApi.new
|
1249
1743
|
subject = 'subject_example' # String |
|
1250
1744
|
|
1251
1745
|
begin
|
1252
|
-
#Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
|
1746
|
+
# Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
|
1253
1747
|
api_instance.revoke_authentication_session(subject)
|
1254
1748
|
rescue OryHydraClient::ApiError => e
|
1255
|
-
puts "
|
1749
|
+
puts "Error when calling AdminApi->revoke_authentication_session: #{e}"
|
1256
1750
|
end
|
1257
1751
|
```
|
1258
1752
|
|
1259
|
-
|
1753
|
+
#### Using the revoke_authentication_session_with_http_info variant
|
1260
1754
|
|
1755
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1261
1756
|
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1757
|
+
> <Array(nil, Integer, Hash)> revoke_authentication_session_with_http_info(subject)
|
1758
|
+
|
1759
|
+
```ruby
|
1760
|
+
begin
|
1761
|
+
# Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session
|
1762
|
+
data, status_code, headers = api_instance.revoke_authentication_session_with_http_info(subject)
|
1763
|
+
p status_code # => 2xx
|
1764
|
+
p headers # => { ... }
|
1765
|
+
p data # => nil
|
1766
|
+
rescue OryHydraClient::ApiError => e
|
1767
|
+
puts "Error when calling AdminApi->revoke_authentication_session_with_http_info: #{e}"
|
1768
|
+
end
|
1769
|
+
```
|
1770
|
+
|
1771
|
+
### Parameters
|
1772
|
+
|
1773
|
+
| Name | Type | Description | Notes |
|
1774
|
+
| ---- | ---- | ----------- | ----- |
|
1775
|
+
| **subject** | **String** | | |
|
1265
1776
|
|
1266
1777
|
### Return type
|
1267
1778
|
|
@@ -1285,10 +1796,10 @@ Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
|
|
1285
1796
|
|
1286
1797
|
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.
|
1287
1798
|
|
1288
|
-
###
|
1799
|
+
### Examples
|
1289
1800
|
|
1290
1801
|
```ruby
|
1291
|
-
|
1802
|
+
require 'time'
|
1292
1803
|
require 'ory-hydra-client'
|
1293
1804
|
|
1294
1805
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -1299,21 +1810,38 @@ opts = {
|
|
1299
1810
|
}
|
1300
1811
|
|
1301
1812
|
begin
|
1302
|
-
#Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
|
1813
|
+
# Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
|
1303
1814
|
api_instance.revoke_consent_sessions(subject, opts)
|
1304
1815
|
rescue OryHydraClient::ApiError => e
|
1305
|
-
puts "
|
1816
|
+
puts "Error when calling AdminApi->revoke_consent_sessions: #{e}"
|
1306
1817
|
end
|
1307
1818
|
```
|
1308
1819
|
|
1309
|
-
|
1820
|
+
#### Using the revoke_consent_sessions_with_http_info variant
|
1310
1821
|
|
1822
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1311
1823
|
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1824
|
+
> <Array(nil, Integer, Hash)> revoke_consent_sessions_with_http_info(subject, opts)
|
1825
|
+
|
1826
|
+
```ruby
|
1827
|
+
begin
|
1828
|
+
# Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client
|
1829
|
+
data, status_code, headers = api_instance.revoke_consent_sessions_with_http_info(subject, opts)
|
1830
|
+
p status_code # => 2xx
|
1831
|
+
p headers # => { ... }
|
1832
|
+
p data # => nil
|
1833
|
+
rescue OryHydraClient::ApiError => e
|
1834
|
+
puts "Error when calling AdminApi->revoke_consent_sessions_with_http_info: #{e}"
|
1835
|
+
end
|
1836
|
+
```
|
1837
|
+
|
1838
|
+
### Parameters
|
1839
|
+
|
1840
|
+
| Name | Type | Description | Notes |
|
1841
|
+
| ---- | ---- | ----------- | ----- |
|
1842
|
+
| **subject** | **String** | The subject (Subject) who's consent sessions should be deleted. | |
|
1843
|
+
| **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] |
|
1844
|
+
| **all** | **Boolean** | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | [optional] |
|
1317
1845
|
|
1318
1846
|
### Return type
|
1319
1847
|
|
@@ -1331,42 +1859,59 @@ No authorization required
|
|
1331
1859
|
|
1332
1860
|
## update_json_web_key
|
1333
1861
|
|
1334
|
-
> JSONWebKey update_json_web_key(kid, set, opts)
|
1862
|
+
> <JSONWebKey> update_json_web_key(kid, set, opts)
|
1335
1863
|
|
1336
1864
|
Update a JSON Web Key
|
1337
1865
|
|
1338
1866
|
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.
|
1339
1867
|
|
1340
|
-
###
|
1868
|
+
### Examples
|
1341
1869
|
|
1342
1870
|
```ruby
|
1343
|
-
|
1871
|
+
require 'time'
|
1344
1872
|
require 'ory-hydra-client'
|
1345
1873
|
|
1346
1874
|
api_instance = OryHydraClient::AdminApi.new
|
1347
1875
|
kid = 'kid_example' # String | The kid of the desired key
|
1348
1876
|
set = 'set_example' # String | The set
|
1349
1877
|
opts = {
|
1350
|
-
body: OryHydraClient::JSONWebKey.new # JSONWebKey |
|
1878
|
+
body: OryHydraClient::JSONWebKey.new({alg: 'RS256', kid: '1603dfe0af8f4596', kty: 'RSA', use: 'sig'}) # JSONWebKey |
|
1351
1879
|
}
|
1352
1880
|
|
1353
1881
|
begin
|
1354
|
-
#Update a JSON Web Key
|
1882
|
+
# Update a JSON Web Key
|
1355
1883
|
result = api_instance.update_json_web_key(kid, set, opts)
|
1356
1884
|
p result
|
1357
1885
|
rescue OryHydraClient::ApiError => e
|
1358
|
-
puts "
|
1886
|
+
puts "Error when calling AdminApi->update_json_web_key: #{e}"
|
1359
1887
|
end
|
1360
1888
|
```
|
1361
1889
|
|
1362
|
-
|
1890
|
+
#### Using the update_json_web_key_with_http_info variant
|
1891
|
+
|
1892
|
+
This returns an Array which contains the response data, status code and headers.
|
1893
|
+
|
1894
|
+
> <Array(<JSONWebKey>, Integer, Hash)> update_json_web_key_with_http_info(kid, set, opts)
|
1895
|
+
|
1896
|
+
```ruby
|
1897
|
+
begin
|
1898
|
+
# Update a JSON Web Key
|
1899
|
+
data, status_code, headers = api_instance.update_json_web_key_with_http_info(kid, set, opts)
|
1900
|
+
p status_code # => 2xx
|
1901
|
+
p headers # => { ... }
|
1902
|
+
p data # => <JSONWebKey>
|
1903
|
+
rescue OryHydraClient::ApiError => e
|
1904
|
+
puts "Error when calling AdminApi->update_json_web_key_with_http_info: #{e}"
|
1905
|
+
end
|
1906
|
+
```
|
1363
1907
|
|
1908
|
+
### Parameters
|
1364
1909
|
|
1365
|
-
Name | Type | Description
|
1366
|
-
|
1367
|
-
**kid** | **String
|
1368
|
-
**set** | **String
|
1369
|
-
**body** | [**JSONWebKey**](JSONWebKey.md)| | [optional]
|
1910
|
+
| Name | Type | Description | Notes |
|
1911
|
+
| ---- | ---- | ----------- | ----- |
|
1912
|
+
| **kid** | **String** | The kid of the desired key | |
|
1913
|
+
| **set** | **String** | The set | |
|
1914
|
+
| **body** | [**JSONWebKey**](JSONWebKey.md) | | [optional] |
|
1370
1915
|
|
1371
1916
|
### Return type
|
1372
1917
|
|
@@ -1384,16 +1929,16 @@ No authorization required
|
|
1384
1929
|
|
1385
1930
|
## update_json_web_key_set
|
1386
1931
|
|
1387
|
-
> JSONWebKeySet update_json_web_key_set(set, opts)
|
1932
|
+
> <JSONWebKeySet> update_json_web_key_set(set, opts)
|
1388
1933
|
|
1389
1934
|
Update a JSON Web Key Set
|
1390
1935
|
|
1391
1936
|
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.
|
1392
1937
|
|
1393
|
-
###
|
1938
|
+
### Examples
|
1394
1939
|
|
1395
1940
|
```ruby
|
1396
|
-
|
1941
|
+
require 'time'
|
1397
1942
|
require 'ory-hydra-client'
|
1398
1943
|
|
1399
1944
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -1403,21 +1948,38 @@ opts = {
|
|
1403
1948
|
}
|
1404
1949
|
|
1405
1950
|
begin
|
1406
|
-
#Update a JSON Web Key Set
|
1951
|
+
# Update a JSON Web Key Set
|
1407
1952
|
result = api_instance.update_json_web_key_set(set, opts)
|
1408
1953
|
p result
|
1409
1954
|
rescue OryHydraClient::ApiError => e
|
1410
|
-
puts "
|
1955
|
+
puts "Error when calling AdminApi->update_json_web_key_set: #{e}"
|
1411
1956
|
end
|
1412
1957
|
```
|
1413
1958
|
|
1414
|
-
|
1959
|
+
#### Using the update_json_web_key_set_with_http_info variant
|
1960
|
+
|
1961
|
+
This returns an Array which contains the response data, status code and headers.
|
1415
1962
|
|
1963
|
+
> <Array(<JSONWebKeySet>, Integer, Hash)> update_json_web_key_set_with_http_info(set, opts)
|
1964
|
+
|
1965
|
+
```ruby
|
1966
|
+
begin
|
1967
|
+
# Update a JSON Web Key Set
|
1968
|
+
data, status_code, headers = api_instance.update_json_web_key_set_with_http_info(set, opts)
|
1969
|
+
p status_code # => 2xx
|
1970
|
+
p headers # => { ... }
|
1971
|
+
p data # => <JSONWebKeySet>
|
1972
|
+
rescue OryHydraClient::ApiError => e
|
1973
|
+
puts "Error when calling AdminApi->update_json_web_key_set_with_http_info: #{e}"
|
1974
|
+
end
|
1975
|
+
```
|
1976
|
+
|
1977
|
+
### Parameters
|
1416
1978
|
|
1417
|
-
Name | Type | Description
|
1418
|
-
|
1419
|
-
**set** | **String
|
1420
|
-
**body** | [**JSONWebKeySet**](JSONWebKeySet.md)| | [optional]
|
1979
|
+
| Name | Type | Description | Notes |
|
1980
|
+
| ---- | ---- | ----------- | ----- |
|
1981
|
+
| **set** | **String** | The set | |
|
1982
|
+
| **body** | [**JSONWebKeySet**](JSONWebKeySet.md) | | [optional] |
|
1421
1983
|
|
1422
1984
|
### Return type
|
1423
1985
|
|
@@ -1435,16 +1997,16 @@ No authorization required
|
|
1435
1997
|
|
1436
1998
|
## update_o_auth2_client
|
1437
1999
|
|
1438
|
-
> OAuth2Client update_o_auth2_client(id, body)
|
2000
|
+
> <OAuth2Client> update_o_auth2_client(id, body)
|
1439
2001
|
|
1440
2002
|
Update an OAuth 2.0 Client
|
1441
2003
|
|
1442
2004
|
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.
|
1443
2005
|
|
1444
|
-
###
|
2006
|
+
### Examples
|
1445
2007
|
|
1446
2008
|
```ruby
|
1447
|
-
|
2009
|
+
require 'time'
|
1448
2010
|
require 'ory-hydra-client'
|
1449
2011
|
|
1450
2012
|
api_instance = OryHydraClient::AdminApi.new
|
@@ -1452,21 +2014,38 @@ id = 'id_example' # String |
|
|
1452
2014
|
body = OryHydraClient::OAuth2Client.new # OAuth2Client |
|
1453
2015
|
|
1454
2016
|
begin
|
1455
|
-
#Update an OAuth 2.0 Client
|
2017
|
+
# Update an OAuth 2.0 Client
|
1456
2018
|
result = api_instance.update_o_auth2_client(id, body)
|
1457
2019
|
p result
|
1458
2020
|
rescue OryHydraClient::ApiError => e
|
1459
|
-
puts "
|
2021
|
+
puts "Error when calling AdminApi->update_o_auth2_client: #{e}"
|
1460
2022
|
end
|
1461
2023
|
```
|
1462
2024
|
|
1463
|
-
|
2025
|
+
#### Using the update_o_auth2_client_with_http_info variant
|
2026
|
+
|
2027
|
+
This returns an Array which contains the response data, status code and headers.
|
2028
|
+
|
2029
|
+
> <Array(<OAuth2Client>, Integer, Hash)> update_o_auth2_client_with_http_info(id, body)
|
2030
|
+
|
2031
|
+
```ruby
|
2032
|
+
begin
|
2033
|
+
# Update an OAuth 2.0 Client
|
2034
|
+
data, status_code, headers = api_instance.update_o_auth2_client_with_http_info(id, body)
|
2035
|
+
p status_code # => 2xx
|
2036
|
+
p headers # => { ... }
|
2037
|
+
p data # => <OAuth2Client>
|
2038
|
+
rescue OryHydraClient::ApiError => e
|
2039
|
+
puts "Error when calling AdminApi->update_o_auth2_client_with_http_info: #{e}"
|
2040
|
+
end
|
2041
|
+
```
|
1464
2042
|
|
2043
|
+
### Parameters
|
1465
2044
|
|
1466
|
-
Name | Type | Description
|
1467
|
-
|
1468
|
-
**id** | **String
|
1469
|
-
**body** | [**OAuth2Client**](OAuth2Client.md)| |
|
2045
|
+
| Name | Type | Description | Notes |
|
2046
|
+
| ---- | ---- | ----------- | ----- |
|
2047
|
+
| **id** | **String** | | |
|
2048
|
+
| **body** | [**OAuth2Client**](OAuth2Client.md) | | |
|
1470
2049
|
|
1471
2050
|
### Return type
|
1472
2051
|
|