ory-hydra-client 1.2.0 → 1.2.1
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 -10
- data/docs/AdminApi.md +12 -12
- data/docs/FlushInactiveOAuth2TokensRequest.md +1 -1
- data/docs/JSONWebKey.md +12 -12
- data/lib/ory-hydra-client.rb +0 -1
- data/lib/ory-hydra-client/api/admin_api.rb +8 -8
- data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +2 -2
- data/lib/ory-hydra-client/models/json_web_key.rb +0 -13
- data/lib/ory-hydra-client/models/json_web_key_set.rb +1 -1
- data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +1 -0
- data/lib/ory-hydra-client/models/oauth2_token_response.rb +1 -1
- data/lib/ory-hydra-client/models/previous_consent_session.rb +1 -1
- data/lib/ory-hydra-client/models/userinfo_response.rb +1 -1
- data/lib/ory-hydra-client/version.rb +1 -1
- metadata +20 -24
- data/docs/AttributeTypeAndValue.md +0 -19
- data/lib/ory-hydra-client/models/attribute_type_and_value.rb +0 -219
- data/spec/models/attribute_type_and_value_spec.rb +0 -47
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4acd346da71cc0c00088ab861088927954f3310a8ac8fb289e3c72eef45cf01f
|
4
|
+
data.tar.gz: '03955c8945a3998146cd86d71a662a04a0b61bcf9e2f0eb7dc63efca12607ae1'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f3ef35f3525812e5cf78f6f4d8c879dbf3245a94670eca733cdfdbd92c04c7b115b79bb3a0f2d2a0fa410b0a2ac07d0f20c62e296e495e39243186f337ebad2
|
7
|
+
data.tar.gz: a06470a502fc6ef7550afd5885a9eeb622ba57c6965e446319d3381febb116aa106ee59baabe09b33e3d6883d437791ded140119df518f6463c5b99d3e82064c
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Welcome to the ORY Hydra HTTP API documentation. You will find documentation for
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: latest
|
10
|
-
- Package version: v1.2.
|
10
|
+
- Package version: v1.2.1
|
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.2.
|
26
|
+
gem install ./ory-hydra-client-v1.2.1.gem
|
27
27
|
```
|
28
28
|
|
29
|
-
(for development, run `gem install --dev ./ory-hydra-client-v1.2.
|
29
|
+
(for development, run `gem install --dev ./ory-hydra-client-v1.2.1.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.2.
|
35
|
+
gem 'ory-hydra-client', '~> v1.2.1'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -63,7 +63,7 @@ opts = {
|
|
63
63
|
}
|
64
64
|
|
65
65
|
begin
|
66
|
-
#Accept
|
66
|
+
#Accept a consent request
|
67
67
|
result = api_instance.accept_consent_request(consent_challenge, opts)
|
68
68
|
p result
|
69
69
|
rescue OryHydraClient::ApiError => e
|
@@ -78,8 +78,8 @@ All URIs are relative to *http://localhost*
|
|
78
78
|
|
79
79
|
Class | Method | HTTP request | Description
|
80
80
|
------------ | ------------- | ------------- | -------------
|
81
|
-
*OryHydraClient::AdminApi* | [**accept_consent_request**](docs/AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept
|
82
|
-
*OryHydraClient::AdminApi* | [**accept_login_request**](docs/AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept
|
81
|
+
*OryHydraClient::AdminApi* | [**accept_consent_request**](docs/AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a consent request
|
82
|
+
*OryHydraClient::AdminApi* | [**accept_login_request**](docs/AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a login request
|
83
83
|
*OryHydraClient::AdminApi* | [**accept_logout_request**](docs/AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a logout request
|
84
84
|
*OryHydraClient::AdminApi* | [**create_json_web_key_set**](docs/AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a new JSON Web Key
|
85
85
|
*OryHydraClient::AdminApi* | [**create_o_auth2_client**](docs/AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 client
|
@@ -90,7 +90,7 @@ Class | Method | HTTP request | Description
|
|
90
90
|
*OryHydraClient::AdminApi* | [**get_consent_request**](docs/AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get consent request information
|
91
91
|
*OryHydraClient::AdminApi* | [**get_json_web_key**](docs/AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key
|
92
92
|
*OryHydraClient::AdminApi* | [**get_json_web_key_set**](docs/AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set
|
93
|
-
*OryHydraClient::AdminApi* | [**get_login_request**](docs/AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get
|
93
|
+
*OryHydraClient::AdminApi* | [**get_login_request**](docs/AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a login request
|
94
94
|
*OryHydraClient::AdminApi* | [**get_logout_request**](docs/AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a logout request
|
95
95
|
*OryHydraClient::AdminApi* | [**get_o_auth2_client**](docs/AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client.
|
96
96
|
*OryHydraClient::AdminApi* | [**get_version**](docs/AdminApi.md#get_version) | **GET** /version | Get service version
|
@@ -99,7 +99,7 @@ Class | Method | HTTP request | Description
|
|
99
99
|
*OryHydraClient::AdminApi* | [**list_o_auth2_clients**](docs/AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients
|
100
100
|
*OryHydraClient::AdminApi* | [**list_subject_consent_sessions**](docs/AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
|
101
101
|
*OryHydraClient::AdminApi* | [**prometheus**](docs/AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
|
102
|
-
*OryHydraClient::AdminApi* | [**reject_consent_request**](docs/AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject
|
102
|
+
*OryHydraClient::AdminApi* | [**reject_consent_request**](docs/AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a consent request
|
103
103
|
*OryHydraClient::AdminApi* | [**reject_login_request**](docs/AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
|
104
104
|
*OryHydraClient::AdminApi* | [**reject_logout_request**](docs/AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
|
105
105
|
*OryHydraClient::AdminApi* | [**revoke_authentication_session**](docs/AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates all login sessions of a certain user Invalidates a subject's authentication session
|
@@ -121,7 +121,6 @@ Class | Method | HTTP request | Description
|
|
121
121
|
|
122
122
|
- [OryHydraClient::AcceptConsentRequest](docs/AcceptConsentRequest.md)
|
123
123
|
- [OryHydraClient::AcceptLoginRequest](docs/AcceptLoginRequest.md)
|
124
|
-
- [OryHydraClient::AttributeTypeAndValue](docs/AttributeTypeAndValue.md)
|
125
124
|
- [OryHydraClient::CompletedRequest](docs/CompletedRequest.md)
|
126
125
|
- [OryHydraClient::ConsentRequest](docs/ConsentRequest.md)
|
127
126
|
- [OryHydraClient::ConsentRequestSession](docs/ConsentRequestSession.md)
|
data/docs/AdminApi.md
CHANGED
@@ -4,8 +4,8 @@ All URIs are relative to *http://localhost*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**accept_consent_request**](AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept
|
8
|
-
[**accept_login_request**](AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept
|
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
9
|
[**accept_logout_request**](AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a logout request
|
10
10
|
[**create_json_web_key_set**](AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a new JSON Web Key
|
11
11
|
[**create_o_auth2_client**](AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 client
|
@@ -16,7 +16,7 @@ Method | HTTP request | Description
|
|
16
16
|
[**get_consent_request**](AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get consent request information
|
17
17
|
[**get_json_web_key**](AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key
|
18
18
|
[**get_json_web_key_set**](AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set
|
19
|
-
[**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get
|
19
|
+
[**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a login request
|
20
20
|
[**get_logout_request**](AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a logout request
|
21
21
|
[**get_o_auth2_client**](AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client.
|
22
22
|
[**get_version**](AdminApi.md#get_version) | **GET** /version | Get service version
|
@@ -25,7 +25,7 @@ Method | HTTP request | Description
|
|
25
25
|
[**list_o_auth2_clients**](AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients
|
26
26
|
[**list_subject_consent_sessions**](AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists all consent sessions of a subject
|
27
27
|
[**prometheus**](AdminApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the Hydra service. If you're using k8s, you can then add annotations to your deployment like so:
|
28
|
-
[**reject_consent_request**](AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject
|
28
|
+
[**reject_consent_request**](AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a consent request
|
29
29
|
[**reject_login_request**](AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a login request
|
30
30
|
[**reject_logout_request**](AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a logout request
|
31
31
|
[**revoke_authentication_session**](AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates all login sessions of a certain user Invalidates a subject's authentication session
|
@@ -40,7 +40,7 @@ Method | HTTP request | Description
|
|
40
40
|
|
41
41
|
> CompletedRequest accept_consent_request(consent_challenge, opts)
|
42
42
|
|
43
|
-
Accept
|
43
|
+
Accept a consent request
|
44
44
|
|
45
45
|
When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.
|
46
46
|
|
@@ -57,7 +57,7 @@ opts = {
|
|
57
57
|
}
|
58
58
|
|
59
59
|
begin
|
60
|
-
#Accept
|
60
|
+
#Accept a consent request
|
61
61
|
result = api_instance.accept_consent_request(consent_challenge, opts)
|
62
62
|
p result
|
63
63
|
rescue OryHydraClient::ApiError => e
|
@@ -91,7 +91,7 @@ No authorization required
|
|
91
91
|
|
92
92
|
> CompletedRequest accept_login_request(login_challenge, opts)
|
93
93
|
|
94
|
-
Accept
|
94
|
+
Accept a login request
|
95
95
|
|
96
96
|
When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.
|
97
97
|
|
@@ -108,7 +108,7 @@ opts = {
|
|
108
108
|
}
|
109
109
|
|
110
110
|
begin
|
111
|
-
#Accept
|
111
|
+
#Accept a login request
|
112
112
|
result = api_instance.accept_login_request(login_challenge, opts)
|
113
113
|
p result
|
114
114
|
rescue OryHydraClient::ApiError => e
|
@@ -618,7 +618,7 @@ No authorization required
|
|
618
618
|
|
619
619
|
> LoginRequest get_login_request(login_challenge)
|
620
620
|
|
621
|
-
Get
|
621
|
+
Get a login request
|
622
622
|
|
623
623
|
When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
|
624
624
|
|
@@ -632,7 +632,7 @@ api_instance = OryHydraClient::AdminApi.new
|
|
632
632
|
login_challenge = 'login_challenge_example' # String |
|
633
633
|
|
634
634
|
begin
|
635
|
-
#Get
|
635
|
+
#Get a login request
|
636
636
|
result = api_instance.get_login_request(login_challenge)
|
637
637
|
p result
|
638
638
|
rescue OryHydraClient::ApiError => e
|
@@ -1045,7 +1045,7 @@ No authorization required
|
|
1045
1045
|
|
1046
1046
|
> CompletedRequest reject_consent_request(consent_challenge, opts)
|
1047
1047
|
|
1048
|
-
Reject
|
1048
|
+
Reject a consent request
|
1049
1049
|
|
1050
1050
|
When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.
|
1051
1051
|
|
@@ -1062,7 +1062,7 @@ opts = {
|
|
1062
1062
|
}
|
1063
1063
|
|
1064
1064
|
begin
|
1065
|
-
#Reject
|
1065
|
+
#Reject a consent request
|
1066
1066
|
result = api_instance.reject_consent_request(consent_challenge, opts)
|
1067
1067
|
p result
|
1068
1068
|
rescue OryHydraClient::ApiError => e
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**not_after** | **DateTime** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. Format: date-time | [optional]
|
7
|
+
**not_after** | **DateTime** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. Format: date-time Format: date-time | [optional]
|
8
8
|
|
9
9
|
## Code Sample
|
10
10
|
|
data/docs/JSONWebKey.md
CHANGED
@@ -5,22 +5,22 @@
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**alg** | **String** | The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. |
|
8
|
-
**crv** | **String** |
|
9
|
-
**d** | **String** |
|
10
|
-
**dp** | **String** |
|
11
|
-
**dq** | **String** |
|
12
|
-
**e** | **String** |
|
13
|
-
**k** | **String** |
|
8
|
+
**crv** | **String** | | [optional]
|
9
|
+
**d** | **String** | | [optional]
|
10
|
+
**dp** | **String** | | [optional]
|
11
|
+
**dq** | **String** | | [optional]
|
12
|
+
**e** | **String** | | [optional]
|
13
|
+
**k** | **String** | | [optional]
|
14
14
|
**kid** | **String** | The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string. |
|
15
15
|
**kty** | **String** | The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string. |
|
16
|
-
**n** | **String** |
|
17
|
-
**p** | **String** |
|
18
|
-
**q** | **String** |
|
19
|
-
**qi** | **String** |
|
16
|
+
**n** | **String** | | [optional]
|
17
|
+
**p** | **String** | | [optional]
|
18
|
+
**q** | **String** | | [optional]
|
19
|
+
**qi** | **String** | | [optional]
|
20
20
|
**use** | **String** | Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption). |
|
21
|
-
**x** | **String** |
|
21
|
+
**x** | **String** | | [optional]
|
22
22
|
**x5c** | **Array<String>** | The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate. | [optional]
|
23
|
-
**y** | **String** |
|
23
|
+
**y** | **String** | | [optional]
|
24
24
|
|
25
25
|
## Code Sample
|
26
26
|
|
data/lib/ory-hydra-client.rb
CHANGED
@@ -19,7 +19,6 @@ require 'ory-hydra-client/configuration'
|
|
19
19
|
# Models
|
20
20
|
require 'ory-hydra-client/models/accept_consent_request'
|
21
21
|
require 'ory-hydra-client/models/accept_login_request'
|
22
|
-
require 'ory-hydra-client/models/attribute_type_and_value'
|
23
22
|
require 'ory-hydra-client/models/completed_request'
|
24
23
|
require 'ory-hydra-client/models/consent_request'
|
25
24
|
require 'ory-hydra-client/models/consent_request_session'
|
@@ -19,7 +19,7 @@ module OryHydraClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Accept
|
22
|
+
# Accept a consent request
|
23
23
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.
|
24
24
|
# @param consent_challenge [String]
|
25
25
|
# @param [Hash] opts the optional parameters
|
@@ -30,7 +30,7 @@ module OryHydraClient
|
|
30
30
|
data
|
31
31
|
end
|
32
32
|
|
33
|
-
# Accept
|
33
|
+
# Accept a consent request
|
34
34
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.
|
35
35
|
# @param consent_challenge [String]
|
36
36
|
# @param [Hash] opts the optional parameters
|
@@ -86,7 +86,7 @@ module OryHydraClient
|
|
86
86
|
return data, status_code, headers
|
87
87
|
end
|
88
88
|
|
89
|
-
# Accept
|
89
|
+
# Accept a login request
|
90
90
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.
|
91
91
|
# @param login_challenge [String]
|
92
92
|
# @param [Hash] opts the optional parameters
|
@@ -97,7 +97,7 @@ module OryHydraClient
|
|
97
97
|
data
|
98
98
|
end
|
99
99
|
|
100
|
-
# Accept
|
100
|
+
# Accept a login request
|
101
101
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.
|
102
102
|
# @param login_challenge [String]
|
103
103
|
# @param [Hash] opts the optional parameters
|
@@ -791,7 +791,7 @@ module OryHydraClient
|
|
791
791
|
return data, status_code, headers
|
792
792
|
end
|
793
793
|
|
794
|
-
# Get
|
794
|
+
# Get a login request
|
795
795
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
|
796
796
|
# @param login_challenge [String]
|
797
797
|
# @param [Hash] opts the optional parameters
|
@@ -801,7 +801,7 @@ module OryHydraClient
|
|
801
801
|
data
|
802
802
|
end
|
803
803
|
|
804
|
-
# Get
|
804
|
+
# Get a login request
|
805
805
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
|
806
806
|
# @param login_challenge [String]
|
807
807
|
# @param [Hash] opts the optional parameters
|
@@ -1338,7 +1338,7 @@ module OryHydraClient
|
|
1338
1338
|
return data, status_code, headers
|
1339
1339
|
end
|
1340
1340
|
|
1341
|
-
# Reject
|
1341
|
+
# Reject a consent request
|
1342
1342
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.
|
1343
1343
|
# @param consent_challenge [String]
|
1344
1344
|
# @param [Hash] opts the optional parameters
|
@@ -1349,7 +1349,7 @@ module OryHydraClient
|
|
1349
1349
|
data
|
1350
1350
|
end
|
1351
1351
|
|
1352
|
-
# Reject
|
1352
|
+
# Reject a consent request
|
1353
1353
|
# When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.
|
1354
1354
|
# @param consent_challenge [String]
|
1355
1355
|
# @param [Hash] opts the optional parameters
|
@@ -13,9 +13,9 @@ OpenAPI Generator version: 4.2.2
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
# FlushInactiveOAuth2TokensRequest flush inactive o auth2 tokens request
|
16
|
+
# FlushInactiveOAuth2TokensRequest FlushInactiveOAuth2TokensRequest flush inactive o auth2 tokens request
|
17
17
|
class FlushInactiveOAuth2TokensRequest
|
18
|
-
# NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. Format: date-time
|
18
|
+
# NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. Format: date-time Format: date-time
|
19
19
|
attr_accessor :not_after
|
20
20
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -13,27 +13,20 @@ OpenAPI Generator version: 4.2.2
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
# JSONWebKey JSONWebKey JSON web key
|
17
16
|
class JSONWebKey
|
18
17
|
# The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.
|
19
18
|
attr_accessor :alg
|
20
19
|
|
21
|
-
# crv
|
22
20
|
attr_accessor :crv
|
23
21
|
|
24
|
-
# d
|
25
22
|
attr_accessor :d
|
26
23
|
|
27
|
-
# dp
|
28
24
|
attr_accessor :dp
|
29
25
|
|
30
|
-
# dq
|
31
26
|
attr_accessor :dq
|
32
27
|
|
33
|
-
# e
|
34
28
|
attr_accessor :e
|
35
29
|
|
36
|
-
# k
|
37
30
|
attr_accessor :k
|
38
31
|
|
39
32
|
# The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string.
|
@@ -42,28 +35,22 @@ module OryHydraClient
|
|
42
35
|
# The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string.
|
43
36
|
attr_accessor :kty
|
44
37
|
|
45
|
-
# n
|
46
38
|
attr_accessor :n
|
47
39
|
|
48
|
-
# p
|
49
40
|
attr_accessor :p
|
50
41
|
|
51
|
-
# q
|
52
42
|
attr_accessor :q
|
53
43
|
|
54
|
-
# qi
|
55
44
|
attr_accessor :qi
|
56
45
|
|
57
46
|
# Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).
|
58
47
|
attr_accessor :use
|
59
48
|
|
60
|
-
# x
|
61
49
|
attr_accessor :x
|
62
50
|
|
63
51
|
# The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.
|
64
52
|
attr_accessor :x5c
|
65
53
|
|
66
|
-
# y
|
67
54
|
attr_accessor :y
|
68
55
|
|
69
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.2
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
# JSONWebKeySet JSON web key set
|
16
|
+
# JSONWebKeySet JSONWebKeySet JSON web key set
|
17
17
|
class JSONWebKeySet
|
18
18
|
# The value of the \"keys\" parameter is an array of JWK values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.
|
19
19
|
attr_accessor :keys
|
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.2.2
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
+
# JSONWebKeySetGeneratorRequest JSONWebKeySetGeneratorRequest json web key set generator request
|
16
17
|
class JsonWebKeySetGeneratorRequest
|
17
18
|
# The algorithm to be used for creating the key. Supports \"RS256\", \"ES512\", \"HS512\", and \"HS256\"
|
18
19
|
attr_accessor :alg
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.2
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
# Oauth2TokenResponse Oauth2TokenResponse The Access Token Response
|
16
|
+
# Oauth2TokenResponse Oauth2TokenResponse Oauth2TokenResponse The Access Token Response
|
17
17
|
class Oauth2TokenResponse
|
18
18
|
# access token
|
19
19
|
attr_accessor :access_token
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.2
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
# PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json
|
16
|
+
# PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json
|
17
17
|
class PreviousConsentSession
|
18
18
|
attr_accessor :consent_request
|
19
19
|
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.2
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module OryHydraClient
|
16
|
-
# UserinfoResponse The userinfo response
|
16
|
+
# UserinfoResponse UserinfoResponse UserinfoResponse UserinfoResponse The userinfo response
|
17
17
|
class UserinfoResponse
|
18
18
|
# End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format. The year MAY be 0000, indicating that it is omitted. To represent only the year, YYYY format is allowed. Note that depending on the underlying platform's date related function, providing just year can result in varying month and day, so the implementers need to take this factor into account to correctly process the dates.
|
19
19
|
attr_accessor :birthdate
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ory-hydra-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ORY GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -84,7 +84,6 @@ files:
|
|
84
84
|
- docs/AcceptConsentRequest.md
|
85
85
|
- docs/AcceptLoginRequest.md
|
86
86
|
- docs/AdminApi.md
|
87
|
-
- docs/AttributeTypeAndValue.md
|
88
87
|
- docs/CompletedRequest.md
|
89
88
|
- docs/ConsentRequest.md
|
90
89
|
- docs/ConsentRequestSession.md
|
@@ -116,7 +115,6 @@ files:
|
|
116
115
|
- lib/ory-hydra-client/configuration.rb
|
117
116
|
- lib/ory-hydra-client/models/accept_consent_request.rb
|
118
117
|
- lib/ory-hydra-client/models/accept_login_request.rb
|
119
|
-
- lib/ory-hydra-client/models/attribute_type_and_value.rb
|
120
118
|
- lib/ory-hydra-client/models/completed_request.rb
|
121
119
|
- lib/ory-hydra-client/models/consent_request.rb
|
122
120
|
- lib/ory-hydra-client/models/consent_request_session.rb
|
@@ -147,7 +145,6 @@ files:
|
|
147
145
|
- spec/configuration_spec.rb
|
148
146
|
- spec/models/accept_consent_request_spec.rb
|
149
147
|
- spec/models/accept_login_request_spec.rb
|
150
|
-
- spec/models/attribute_type_and_value_spec.rb
|
151
148
|
- spec/models/completed_request_spec.rb
|
152
149
|
- spec/models/consent_request_session_spec.rb
|
153
150
|
- spec/models/consent_request_spec.rb
|
@@ -196,33 +193,32 @@ signing_key:
|
|
196
193
|
specification_version: 4
|
197
194
|
summary: ORY Hydra Ruby Gem
|
198
195
|
test_files:
|
199
|
-
- spec/api/public_api_spec.rb
|
200
196
|
- spec/api/admin_api_spec.rb
|
197
|
+
- spec/api/public_api_spec.rb
|
201
198
|
- spec/api_client_spec.rb
|
202
199
|
- spec/configuration_spec.rb
|
203
|
-
- spec/models/well_known_spec.rb
|
204
|
-
- spec/models/previous_consent_session_spec.rb
|
205
|
-
- spec/models/oauth_token_response_spec.rb
|
206
|
-
- spec/models/accept_login_request_spec.rb
|
207
|
-
- spec/models/login_request_spec.rb
|
208
|
-
- spec/models/o_auth2_token_introspection_spec.rb
|
209
200
|
- spec/models/o_auth2_client_spec.rb
|
210
|
-
- spec/models/
|
211
|
-
- spec/models/version_spec.rb
|
212
|
-
- spec/models/attribute_type_and_value_spec.rb
|
201
|
+
- spec/models/userinfo_response_spec.rb
|
213
202
|
- spec/models/accept_consent_request_spec.rb
|
203
|
+
- spec/models/version_spec.rb
|
204
|
+
- spec/models/json_web_key_spec.rb
|
214
205
|
- spec/models/json_web_key_set_generator_request_spec.rb
|
215
|
-
- spec/models/generic_error_spec.rb
|
216
|
-
- spec/models/consent_request_spec.rb
|
217
206
|
- spec/models/logout_request_spec.rb
|
218
|
-
- spec/models/
|
219
|
-
- spec/models/
|
207
|
+
- spec/models/generic_error_spec.rb
|
208
|
+
- spec/models/login_request_spec.rb
|
209
|
+
- spec/models/health_status_spec.rb
|
210
|
+
- spec/models/well_known_spec.rb
|
211
|
+
- spec/models/previous_consent_session_spec.rb
|
220
212
|
- spec/models/open_id_connect_context_spec.rb
|
221
|
-
- spec/models/userinfo_response_spec.rb
|
222
|
-
- spec/models/consent_request_session_spec.rb
|
223
|
-
- spec/models/json_web_key_spec.rb
|
224
213
|
- spec/models/json_web_key_set_spec.rb
|
225
|
-
- spec/models/
|
226
|
-
- spec/models/
|
214
|
+
- spec/models/accept_login_request_spec.rb
|
215
|
+
- spec/models/reject_request_spec.rb
|
216
|
+
- spec/models/oauth_token_response_spec.rb
|
227
217
|
- spec/models/flush_inactive_o_auth2_tokens_request_spec.rb
|
218
|
+
- spec/models/health_not_ready_status_spec.rb
|
219
|
+
- spec/models/consent_request_spec.rb
|
220
|
+
- spec/models/consent_request_session_spec.rb
|
221
|
+
- spec/models/oauth2_token_response_spec.rb
|
222
|
+
- spec/models/o_auth2_token_introspection_spec.rb
|
223
|
+
- spec/models/completed_request_spec.rb
|
228
224
|
- spec/spec_helper.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# OryHydraClient::AttributeTypeAndValue
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**type** | **Array<Integer>** | | [optional]
|
8
|
-
**value** | [**Object**](.md) | value | [optional]
|
9
|
-
|
10
|
-
## Code Sample
|
11
|
-
|
12
|
-
```ruby
|
13
|
-
require 'OryHydraClient'
|
14
|
-
|
15
|
-
instance = OryHydraClient::AttributeTypeAndValue.new(type: null,
|
16
|
-
value: null)
|
17
|
-
```
|
18
|
-
|
19
|
-
|
@@ -1,219 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#ORY Hydra
|
3
|
-
|
4
|
-
#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: latest
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module OryHydraClient
|
16
|
-
# AttributeTypeAndValue AttributeTypeAndValue AttributeTypeAndValue AttributeTypeAndValue AttributeTypeAndValue AttributeTypeAndValue AttributeTypeAndValue mirrors the ASN.1 structure of the same name in RFC 5280, Section 4.1.2.4.
|
17
|
-
class AttributeTypeAndValue
|
18
|
-
attr_accessor :type
|
19
|
-
|
20
|
-
# value
|
21
|
-
attr_accessor :value
|
22
|
-
|
23
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
-
def self.attribute_map
|
25
|
-
{
|
26
|
-
:'type' => :'Type',
|
27
|
-
:'value' => :'Value'
|
28
|
-
}
|
29
|
-
end
|
30
|
-
|
31
|
-
# Attribute type mapping.
|
32
|
-
def self.openapi_types
|
33
|
-
{
|
34
|
-
:'type' => :'Array<Integer>',
|
35
|
-
:'value' => :'Object'
|
36
|
-
}
|
37
|
-
end
|
38
|
-
|
39
|
-
# List of attributes with nullable: true
|
40
|
-
def self.openapi_nullable
|
41
|
-
Set.new([
|
42
|
-
])
|
43
|
-
end
|
44
|
-
|
45
|
-
# Initializes the object
|
46
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
-
def initialize(attributes = {})
|
48
|
-
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::AttributeTypeAndValue` initialize method"
|
50
|
-
end
|
51
|
-
|
52
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::AttributeTypeAndValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
-
end
|
57
|
-
h[k.to_sym] = v
|
58
|
-
}
|
59
|
-
|
60
|
-
if attributes.key?(:'type')
|
61
|
-
if (value = attributes[:'type']).is_a?(Array)
|
62
|
-
self.type = value
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
if attributes.key?(:'value')
|
67
|
-
self.value = attributes[:'value']
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
72
|
-
# @return Array for valid properties with the reasons
|
73
|
-
def list_invalid_properties
|
74
|
-
invalid_properties = Array.new
|
75
|
-
invalid_properties
|
76
|
-
end
|
77
|
-
|
78
|
-
# Check to see if the all the properties in the model are valid
|
79
|
-
# @return true if the model is valid
|
80
|
-
def valid?
|
81
|
-
true
|
82
|
-
end
|
83
|
-
|
84
|
-
# Checks equality by comparing each attribute.
|
85
|
-
# @param [Object] Object to be compared
|
86
|
-
def ==(o)
|
87
|
-
return true if self.equal?(o)
|
88
|
-
self.class == o.class &&
|
89
|
-
type == o.type &&
|
90
|
-
value == o.value
|
91
|
-
end
|
92
|
-
|
93
|
-
# @see the `==` method
|
94
|
-
# @param [Object] Object to be compared
|
95
|
-
def eql?(o)
|
96
|
-
self == o
|
97
|
-
end
|
98
|
-
|
99
|
-
# Calculates hash code according to all attributes.
|
100
|
-
# @return [Integer] Hash code
|
101
|
-
def hash
|
102
|
-
[type, value].hash
|
103
|
-
end
|
104
|
-
|
105
|
-
# Builds the object from hash
|
106
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
-
# @return [Object] Returns the model itself
|
108
|
-
def self.build_from_hash(attributes)
|
109
|
-
new.build_from_hash(attributes)
|
110
|
-
end
|
111
|
-
|
112
|
-
# Builds the object from hash
|
113
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
-
# @return [Object] Returns the model itself
|
115
|
-
def build_from_hash(attributes)
|
116
|
-
return nil unless attributes.is_a?(Hash)
|
117
|
-
self.class.openapi_types.each_pair do |key, type|
|
118
|
-
if type =~ /\AArray<(.*)>/i
|
119
|
-
# check to ensure the input is an array given that the attribute
|
120
|
-
# is documented as an array but the input is not
|
121
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
123
|
-
end
|
124
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
127
|
-
end
|
128
|
-
|
129
|
-
self
|
130
|
-
end
|
131
|
-
|
132
|
-
# Deserializes the data based on type
|
133
|
-
# @param string type Data type
|
134
|
-
# @param string value Value to be deserialized
|
135
|
-
# @return [Object] Deserialized data
|
136
|
-
def _deserialize(type, value)
|
137
|
-
case type.to_sym
|
138
|
-
when :DateTime
|
139
|
-
DateTime.parse(value)
|
140
|
-
when :Date
|
141
|
-
Date.parse(value)
|
142
|
-
when :String
|
143
|
-
value.to_s
|
144
|
-
when :Integer
|
145
|
-
value.to_i
|
146
|
-
when :Float
|
147
|
-
value.to_f
|
148
|
-
when :Boolean
|
149
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
150
|
-
true
|
151
|
-
else
|
152
|
-
false
|
153
|
-
end
|
154
|
-
when :Object
|
155
|
-
# generic object (usually a Hash), return directly
|
156
|
-
value
|
157
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
-
inner_type = Regexp.last_match[:inner_type]
|
159
|
-
value.map { |v| _deserialize(inner_type, v) }
|
160
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
161
|
-
k_type = Regexp.last_match[:k_type]
|
162
|
-
v_type = Regexp.last_match[:v_type]
|
163
|
-
{}.tap do |hash|
|
164
|
-
value.each do |k, v|
|
165
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
-
end
|
167
|
-
end
|
168
|
-
else # model
|
169
|
-
OryHydraClient.const_get(type).build_from_hash(value)
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
|
-
# Returns the string representation of the object
|
174
|
-
# @return [String] String presentation of the object
|
175
|
-
def to_s
|
176
|
-
to_hash.to_s
|
177
|
-
end
|
178
|
-
|
179
|
-
# to_body is an alias to to_hash (backward compatibility)
|
180
|
-
# @return [Hash] Returns the object in the form of hash
|
181
|
-
def to_body
|
182
|
-
to_hash
|
183
|
-
end
|
184
|
-
|
185
|
-
# Returns the object in the form of hash
|
186
|
-
# @return [Hash] Returns the object in the form of hash
|
187
|
-
def to_hash
|
188
|
-
hash = {}
|
189
|
-
self.class.attribute_map.each_pair do |attr, param|
|
190
|
-
value = self.send(attr)
|
191
|
-
if value.nil?
|
192
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
193
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
194
|
-
end
|
195
|
-
|
196
|
-
hash[param] = _to_hash(value)
|
197
|
-
end
|
198
|
-
hash
|
199
|
-
end
|
200
|
-
|
201
|
-
# Outputs non-array value in the form of hash
|
202
|
-
# For object, use to_hash. Otherwise, just return the value
|
203
|
-
# @param [Object] value Any valid value
|
204
|
-
# @return [Hash] Returns the value in the form of hash
|
205
|
-
def _to_hash(value)
|
206
|
-
if value.is_a?(Array)
|
207
|
-
value.compact.map { |v| _to_hash(v) }
|
208
|
-
elsif value.is_a?(Hash)
|
209
|
-
{}.tap do |hash|
|
210
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
-
end
|
212
|
-
elsif value.respond_to? :to_hash
|
213
|
-
value.to_hash
|
214
|
-
else
|
215
|
-
value
|
216
|
-
end
|
217
|
-
end
|
218
|
-
end
|
219
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#ORY Hydra
|
3
|
-
|
4
|
-
#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: latest
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for OryHydraClient::AttributeTypeAndValue
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe 'AttributeTypeAndValue' do
|
21
|
-
before do
|
22
|
-
# run before each test
|
23
|
-
@instance = OryHydraClient::AttributeTypeAndValue.new
|
24
|
-
end
|
25
|
-
|
26
|
-
after do
|
27
|
-
# run after each test
|
28
|
-
end
|
29
|
-
|
30
|
-
describe 'test an instance of AttributeTypeAndValue' do
|
31
|
-
it 'should create an instance of AttributeTypeAndValue' do
|
32
|
-
expect(@instance).to be_instance_of(OryHydraClient::AttributeTypeAndValue)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
describe 'test attribute "type"' do
|
36
|
-
it 'should work' do
|
37
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe 'test attribute "value"' do
|
42
|
-
it 'should work' do
|
43
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|