ory-kratos-client 0.0.3.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +128 -0
- data/Rakefile +10 -0
- data/docs/AdminApi.md +389 -0
- data/docs/CommonApi.md +152 -0
- data/docs/CompleteSelfServiceBrowserProfileManagementFlowPayload.md +17 -0
- data/docs/Error.md +17 -0
- data/docs/Form.md +23 -0
- data/docs/FormField.md +25 -0
- data/docs/GenericError.md +17 -0
- data/docs/GenericErrorPayload.md +29 -0
- data/docs/HealthApi.md +96 -0
- data/docs/HealthNotReadyStatus.md +17 -0
- data/docs/HealthStatus.md +17 -0
- data/docs/Identity.md +23 -0
- data/docs/LoginRequest.md +27 -0
- data/docs/LoginRequestMethod.md +19 -0
- data/docs/LoginRequestMethodConfig.md +16 -0
- data/docs/OidcStrategyCredentialsConfig.md +19 -0
- data/docs/OidcStrategyRequestMethod.md +25 -0
- data/docs/ProfileManagementRequest.md +29 -0
- data/docs/PublicApi.md +419 -0
- data/docs/RegistrationRequest.md +27 -0
- data/docs/RegistrationRequestMethod.md +19 -0
- data/docs/RegistrationRequestMethodConfig.md +16 -0
- data/docs/Session.md +25 -0
- data/docs/Version.md +17 -0
- data/docs/VersionApi.md +52 -0
- data/lib/ory-kratos-client.rb +62 -0
- data/lib/ory-kratos-client/api/admin_api.rb +525 -0
- data/lib/ory-kratos-client/api/common_api.rb +211 -0
- data/lib/ory-kratos-client/api/health_api.rb +134 -0
- data/lib/ory-kratos-client/api/public_api.rb +558 -0
- data/lib/ory-kratos-client/api/version_api.rb +78 -0
- data/lib/ory-kratos-client/api_client.rb +385 -0
- data/lib/ory-kratos-client/api_error.rb +57 -0
- data/lib/ory-kratos-client/configuration.rb +241 -0
- data/lib/ory-kratos-client/models/complete_self_service_browser_profile_management_flow_payload.rb +212 -0
- data/lib/ory-kratos-client/models/error.rb +207 -0
- data/lib/ory-kratos-client/models/form.rb +242 -0
- data/lib/ory-kratos-client/models/form_field.rb +250 -0
- data/lib/ory-kratos-client/models/generic_error.rb +207 -0
- data/lib/ory-kratos-client/models/generic_error_payload.rb +265 -0
- data/lib/ory-kratos-client/models/health_not_ready_status.rb +209 -0
- data/lib/ory-kratos-client/models/health_status.rb +207 -0
- data/lib/ory-kratos-client/models/identity.rb +245 -0
- data/lib/ory-kratos-client/models/login_request.rb +258 -0
- data/lib/ory-kratos-client/models/login_request_method.rb +216 -0
- data/lib/ory-kratos-client/models/login_request_method_config.rb +197 -0
- data/lib/ory-kratos-client/models/oidc_strategy_credentials_config.rb +215 -0
- data/lib/ory-kratos-client/models/oidc_strategy_request_method.rb +252 -0
- data/lib/ory-kratos-client/models/profile_management_request.rb +265 -0
- data/lib/ory-kratos-client/models/registration_request.rb +258 -0
- data/lib/ory-kratos-client/models/registration_request_method.rb +216 -0
- data/lib/ory-kratos-client/models/registration_request_method_config.rb +197 -0
- data/lib/ory-kratos-client/models/session.rb +242 -0
- data/lib/ory-kratos-client/models/version.rb +207 -0
- data/lib/ory-kratos-client/version.rb +15 -0
- data/ory-kratos-client.gemspec +39 -0
- data/spec/api/admin_api_spec.rb +131 -0
- data/spec/api/common_api_spec.rb +71 -0
- data/spec/api/health_api_spec.rb +57 -0
- data/spec/api/public_api_spec.rb +113 -0
- data/spec/api/version_api_spec.rb +46 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/complete_self_service_browser_profile_management_flow_payload_spec.rb +41 -0
- data/spec/models/error_spec.rb +41 -0
- data/spec/models/form_field_spec.rb +65 -0
- data/spec/models/form_spec.rb +59 -0
- data/spec/models/generic_error_payload_spec.rb +77 -0
- data/spec/models/generic_error_spec.rb +59 -0
- data/spec/models/health_not_ready_status_spec.rb +41 -0
- data/spec/models/health_status_spec.rb +41 -0
- data/spec/models/identity_spec.rb +53 -0
- data/spec/models/login_request_method_config_spec.rb +35 -0
- data/spec/models/login_request_method_spec.rb +47 -0
- data/spec/models/login_request_spec.rb +71 -0
- data/spec/models/oidc_strategy_credentials_config_spec.rb +47 -0
- data/spec/models/oidc_strategy_request_method_spec.rb +65 -0
- data/spec/models/profile_management_request_spec.rb +77 -0
- data/spec/models/registration_request_method_config_spec.rb +35 -0
- data/spec/models/registration_request_method_spec.rb +47 -0
- data/spec/models/registration_request_spec.rb +71 -0
- data/spec/models/session_spec.rb +65 -0
- data/spec/models/version_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +219 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
# OryHydraClient::RegistrationRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**active** | **String** | and so on. | [optional]
|
8
|
+
**expires_at** | **DateTime** | ExpiresAt is the time (UTC) when the request expires. If the user still wishes to log in, a new request has to be initiated. | [optional]
|
9
|
+
**id** | **String** | | [optional]
|
10
|
+
**issued_at** | **DateTime** | IssuedAt is the time (UTC) when the request occurred. | [optional]
|
11
|
+
**methods** | [**Hash<String, RegistrationRequestMethod>**](RegistrationRequestMethod.md) | Methods contains context for all enabled registration methods. If a registration request has been processed, but for example the password is incorrect, this will contain error messages. | [optional]
|
12
|
+
**request_url** | **String** | RequestURL is the initial URL that was requested from ORY Kratos. It can be used to forward information contained in the URL's path or query for example. | [optional]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'OryHydraClient'
|
18
|
+
|
19
|
+
instance = OryHydraClient::RegistrationRequest.new(active: null,
|
20
|
+
expires_at: null,
|
21
|
+
id: null,
|
22
|
+
issued_at: null,
|
23
|
+
methods: null,
|
24
|
+
request_url: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::RegistrationRequestMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**config** | [**RegistrationRequestMethodConfig**](RegistrationRequestMethodConfig.md) | | [optional]
|
8
|
+
**method** | **String** | and so on. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::RegistrationRequestMethod.new(config: null,
|
16
|
+
method: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# OryHydraClient::RegistrationRequestMethodConfig
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'OryHydraClient'
|
12
|
+
|
13
|
+
instance = OryHydraClient::RegistrationRequestMethodConfig.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
data/docs/Session.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# OryHydraClient::Session
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**authenticated_at** | **DateTime** | | [optional]
|
8
|
+
**expires_at** | **DateTime** | | [optional]
|
9
|
+
**identity** | [**Identity**](Identity.md) | | [optional]
|
10
|
+
**issued_at** | **DateTime** | | [optional]
|
11
|
+
**sid** | **String** | | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'OryHydraClient'
|
17
|
+
|
18
|
+
instance = OryHydraClient::Session.new(authenticated_at: null,
|
19
|
+
expires_at: null,
|
20
|
+
identity: null,
|
21
|
+
issued_at: null,
|
22
|
+
sid: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/docs/Version.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# OryHydraClient::Version
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**version** | **String** | Version is the service's version. | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'OryHydraClient'
|
13
|
+
|
14
|
+
instance = OryHydraClient::Version.new(version: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/VersionApi.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# OryHydraClient::VersionApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_version**](VersionApi.md#get_version) | **GET** /version | Get service version
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## get_version
|
12
|
+
|
13
|
+
> Version get_version
|
14
|
+
|
15
|
+
Get service version
|
16
|
+
|
17
|
+
This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
18
|
+
|
19
|
+
### Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'ory-kratos-client'
|
24
|
+
|
25
|
+
api_instance = OryHydraClient::VersionApi.new
|
26
|
+
|
27
|
+
begin
|
28
|
+
#Get service version
|
29
|
+
result = api_instance.get_version
|
30
|
+
p result
|
31
|
+
rescue OryHydraClient::ApiError => e
|
32
|
+
puts "Exception when calling VersionApi->get_version: #{e}"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
### Parameters
|
37
|
+
|
38
|
+
This endpoint does not need any parameter.
|
39
|
+
|
40
|
+
### Return type
|
41
|
+
|
42
|
+
[**Version**](Version.md)
|
43
|
+
|
44
|
+
### Authorization
|
45
|
+
|
46
|
+
No authorization required
|
47
|
+
|
48
|
+
### HTTP request headers
|
49
|
+
|
50
|
+
- **Content-Type**: Not defined
|
51
|
+
- **Accept**: application/json
|
52
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory Kratos
|
3
|
+
|
4
|
+
#Welcome to the ORY Kratos HTTP API documentation!
|
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
|
+
# Common files
|
14
|
+
require 'ory-kratos-client/api_client'
|
15
|
+
require 'ory-kratos-client/api_error'
|
16
|
+
require 'ory-kratos-client/version'
|
17
|
+
require 'ory-kratos-client/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'ory-kratos-client/models/complete_self_service_browser_profile_management_flow_payload'
|
21
|
+
require 'ory-kratos-client/models/error'
|
22
|
+
require 'ory-kratos-client/models/form'
|
23
|
+
require 'ory-kratos-client/models/form_field'
|
24
|
+
require 'ory-kratos-client/models/generic_error'
|
25
|
+
require 'ory-kratos-client/models/generic_error_payload'
|
26
|
+
require 'ory-kratos-client/models/health_not_ready_status'
|
27
|
+
require 'ory-kratos-client/models/health_status'
|
28
|
+
require 'ory-kratos-client/models/identity'
|
29
|
+
require 'ory-kratos-client/models/login_request'
|
30
|
+
require 'ory-kratos-client/models/login_request_method'
|
31
|
+
require 'ory-kratos-client/models/login_request_method_config'
|
32
|
+
require 'ory-kratos-client/models/profile_management_request'
|
33
|
+
require 'ory-kratos-client/models/registration_request'
|
34
|
+
require 'ory-kratos-client/models/registration_request_method'
|
35
|
+
require 'ory-kratos-client/models/registration_request_method_config'
|
36
|
+
require 'ory-kratos-client/models/session'
|
37
|
+
require 'ory-kratos-client/models/version'
|
38
|
+
|
39
|
+
# APIs
|
40
|
+
require 'ory-kratos-client/api/admin_api'
|
41
|
+
require 'ory-kratos-client/api/common_api'
|
42
|
+
require 'ory-kratos-client/api/health_api'
|
43
|
+
require 'ory-kratos-client/api/public_api'
|
44
|
+
require 'ory-kratos-client/api/version_api'
|
45
|
+
|
46
|
+
module OryHydraClient
|
47
|
+
class << self
|
48
|
+
# Customize default settings for the SDK using block.
|
49
|
+
# OryHydraClient.configure do |config|
|
50
|
+
# config.username = "xxx"
|
51
|
+
# config.password = "xxx"
|
52
|
+
# end
|
53
|
+
# If no block given, return the default Configuration object.
|
54
|
+
def configure
|
55
|
+
if block_given?
|
56
|
+
yield(Configuration.default)
|
57
|
+
else
|
58
|
+
Configuration.default
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,525 @@
|
|
1
|
+
=begin
|
2
|
+
#Ory Kratos
|
3
|
+
|
4
|
+
#Welcome to the ORY Kratos HTTP API documentation!
|
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 'cgi'
|
14
|
+
|
15
|
+
module OryHydraClient
|
16
|
+
class AdminApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an identity
|
23
|
+
# This endpoint creates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
24
|
+
# @param body [Identity]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Identity]
|
27
|
+
def create_identity(body, opts = {})
|
28
|
+
data, _status_code, _headers = create_identity_with_http_info(body, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create an identity
|
33
|
+
# This endpoint creates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
34
|
+
# @param body [Identity]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
|
37
|
+
def create_identity_with_http_info(body, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.create_identity ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'body' is set
|
42
|
+
if @api_client.config.client_side_validation && body.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.create_identity"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/identities'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'Identity'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || []
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: AdminApi#create_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete an identity
|
87
|
+
# This endpoint deletes an identity. This can not be undone. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
88
|
+
# @param id [String] ID is the identity's ID.
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [nil]
|
91
|
+
def delete_identity(id, opts = {})
|
92
|
+
delete_identity_with_http_info(id, opts)
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete an identity
|
97
|
+
# This endpoint deletes an identity. This can not be undone. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
98
|
+
# @param id [String] ID is the identity's ID.
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
101
|
+
def delete_identity_with_http_info(id, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.delete_identity ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'id' is set
|
106
|
+
if @api_client.config.client_side_validation && id.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.delete_identity"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
111
|
+
|
112
|
+
# query parameters
|
113
|
+
query_params = opts[:query_params] || {}
|
114
|
+
|
115
|
+
# header parameters
|
116
|
+
header_params = opts[:header_params] || {}
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
119
|
+
|
120
|
+
# form parameters
|
121
|
+
form_params = opts[:form_params] || {}
|
122
|
+
|
123
|
+
# http body (model)
|
124
|
+
post_body = opts[:body]
|
125
|
+
|
126
|
+
# return_type
|
127
|
+
return_type = opts[:return_type]
|
128
|
+
|
129
|
+
# auth_names
|
130
|
+
auth_names = opts[:auth_names] || []
|
131
|
+
|
132
|
+
new_options = opts.merge(
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => return_type
|
139
|
+
)
|
140
|
+
|
141
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
142
|
+
if @api_client.config.debugging
|
143
|
+
@api_client.config.logger.debug "API called: AdminApi#delete_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# Get an identity
|
149
|
+
# Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
150
|
+
# @param id [String] ID must be set to the ID of identity you want to get
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @return [Identity]
|
153
|
+
def get_identity(id, opts = {})
|
154
|
+
data, _status_code, _headers = get_identity_with_http_info(id, opts)
|
155
|
+
data
|
156
|
+
end
|
157
|
+
|
158
|
+
# Get an identity
|
159
|
+
# Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
160
|
+
# @param id [String] ID must be set to the ID of identity you want to get
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
|
163
|
+
def get_identity_with_http_info(id, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.get_identity ...'
|
166
|
+
end
|
167
|
+
# verify the required parameter 'id' is set
|
168
|
+
if @api_client.config.client_side_validation && id.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.get_identity"
|
170
|
+
end
|
171
|
+
# resource path
|
172
|
+
local_var_path = '/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
173
|
+
|
174
|
+
# query parameters
|
175
|
+
query_params = opts[:query_params] || {}
|
176
|
+
|
177
|
+
# header parameters
|
178
|
+
header_params = opts[:header_params] || {}
|
179
|
+
# HTTP header 'Accept' (if needed)
|
180
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
181
|
+
|
182
|
+
# form parameters
|
183
|
+
form_params = opts[:form_params] || {}
|
184
|
+
|
185
|
+
# http body (model)
|
186
|
+
post_body = opts[:body]
|
187
|
+
|
188
|
+
# return_type
|
189
|
+
return_type = opts[:return_type] || 'Identity'
|
190
|
+
|
191
|
+
# auth_names
|
192
|
+
auth_names = opts[:auth_names] || []
|
193
|
+
|
194
|
+
new_options = opts.merge(
|
195
|
+
:header_params => header_params,
|
196
|
+
:query_params => query_params,
|
197
|
+
:form_params => form_params,
|
198
|
+
:body => post_body,
|
199
|
+
:auth_names => auth_names,
|
200
|
+
:return_type => return_type
|
201
|
+
)
|
202
|
+
|
203
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
204
|
+
if @api_client.config.debugging
|
205
|
+
@api_client.config.logger.debug "API called: AdminApi#get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
206
|
+
end
|
207
|
+
return data, status_code, headers
|
208
|
+
end
|
209
|
+
|
210
|
+
# Get the request context of browser-based login user flows
|
211
|
+
# This endpoint returns a login request's context with, for example, error details and other information. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
|
212
|
+
# @param request [String] Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
|
213
|
+
# @param [Hash] opts the optional parameters
|
214
|
+
# @return [LoginRequest]
|
215
|
+
def get_self_service_browser_login_request(request, opts = {})
|
216
|
+
data, _status_code, _headers = get_self_service_browser_login_request_with_http_info(request, opts)
|
217
|
+
data
|
218
|
+
end
|
219
|
+
|
220
|
+
# Get the request context of browser-based login user flows
|
221
|
+
# This endpoint returns a login request's context with, for example, error details and other information. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
|
222
|
+
# @param request [String] Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers
|
225
|
+
def get_self_service_browser_login_request_with_http_info(request, opts = {})
|
226
|
+
if @api_client.config.debugging
|
227
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.get_self_service_browser_login_request ...'
|
228
|
+
end
|
229
|
+
# verify the required parameter 'request' is set
|
230
|
+
if @api_client.config.client_side_validation && request.nil?
|
231
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling AdminApi.get_self_service_browser_login_request"
|
232
|
+
end
|
233
|
+
# resource path
|
234
|
+
local_var_path = '/self-service/browser/flows/requests/login'
|
235
|
+
|
236
|
+
# query parameters
|
237
|
+
query_params = opts[:query_params] || {}
|
238
|
+
query_params[:'request'] = request
|
239
|
+
|
240
|
+
# header parameters
|
241
|
+
header_params = opts[:header_params] || {}
|
242
|
+
# HTTP header 'Accept' (if needed)
|
243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
244
|
+
|
245
|
+
# form parameters
|
246
|
+
form_params = opts[:form_params] || {}
|
247
|
+
|
248
|
+
# http body (model)
|
249
|
+
post_body = opts[:body]
|
250
|
+
|
251
|
+
# return_type
|
252
|
+
return_type = opts[:return_type] || 'LoginRequest'
|
253
|
+
|
254
|
+
# auth_names
|
255
|
+
auth_names = opts[:auth_names] || []
|
256
|
+
|
257
|
+
new_options = opts.merge(
|
258
|
+
:header_params => header_params,
|
259
|
+
:query_params => query_params,
|
260
|
+
:form_params => form_params,
|
261
|
+
:body => post_body,
|
262
|
+
:auth_names => auth_names,
|
263
|
+
:return_type => return_type
|
264
|
+
)
|
265
|
+
|
266
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
267
|
+
if @api_client.config.debugging
|
268
|
+
@api_client.config.logger.debug "API called: AdminApi#get_self_service_browser_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
269
|
+
end
|
270
|
+
return data, status_code, headers
|
271
|
+
end
|
272
|
+
|
273
|
+
# Get the request context of browser-based profile management flows
|
274
|
+
# When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-profile-management).
|
275
|
+
# @param request [String] Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
|
276
|
+
# @param [Hash] opts the optional parameters
|
277
|
+
# @return [ProfileManagementRequest]
|
278
|
+
def get_self_service_browser_profile_management_request(request, opts = {})
|
279
|
+
data, _status_code, _headers = get_self_service_browser_profile_management_request_with_http_info(request, opts)
|
280
|
+
data
|
281
|
+
end
|
282
|
+
|
283
|
+
# Get the request context of browser-based profile management flows
|
284
|
+
# When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for checking the auth session. To prevent scanning attacks, the public endpoint does not return 404 status codes but instead 403 or 500. More information can be found at [ORY Kratos Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-profile-management).
|
285
|
+
# @param request [String] Request is the Login Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/login?request=abcde`).
|
286
|
+
# @param [Hash] opts the optional parameters
|
287
|
+
# @return [Array<(ProfileManagementRequest, Integer, Hash)>] ProfileManagementRequest data, response status code and response headers
|
288
|
+
def get_self_service_browser_profile_management_request_with_http_info(request, opts = {})
|
289
|
+
if @api_client.config.debugging
|
290
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.get_self_service_browser_profile_management_request ...'
|
291
|
+
end
|
292
|
+
# verify the required parameter 'request' is set
|
293
|
+
if @api_client.config.client_side_validation && request.nil?
|
294
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling AdminApi.get_self_service_browser_profile_management_request"
|
295
|
+
end
|
296
|
+
# resource path
|
297
|
+
local_var_path = '/self-service/browser/flows/requests/profile'
|
298
|
+
|
299
|
+
# query parameters
|
300
|
+
query_params = opts[:query_params] || {}
|
301
|
+
query_params[:'request'] = request
|
302
|
+
|
303
|
+
# header parameters
|
304
|
+
header_params = opts[:header_params] || {}
|
305
|
+
# HTTP header 'Accept' (if needed)
|
306
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
307
|
+
|
308
|
+
# form parameters
|
309
|
+
form_params = opts[:form_params] || {}
|
310
|
+
|
311
|
+
# http body (model)
|
312
|
+
post_body = opts[:body]
|
313
|
+
|
314
|
+
# return_type
|
315
|
+
return_type = opts[:return_type] || 'ProfileManagementRequest'
|
316
|
+
|
317
|
+
# auth_names
|
318
|
+
auth_names = opts[:auth_names] || []
|
319
|
+
|
320
|
+
new_options = opts.merge(
|
321
|
+
:header_params => header_params,
|
322
|
+
:query_params => query_params,
|
323
|
+
:form_params => form_params,
|
324
|
+
:body => post_body,
|
325
|
+
:auth_names => auth_names,
|
326
|
+
:return_type => return_type
|
327
|
+
)
|
328
|
+
|
329
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
330
|
+
if @api_client.config.debugging
|
331
|
+
@api_client.config.logger.debug "API called: AdminApi#get_self_service_browser_profile_management_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
332
|
+
end
|
333
|
+
return data, status_code, headers
|
334
|
+
end
|
335
|
+
|
336
|
+
# Get the request context of browser-based registration user flows
|
337
|
+
# This endpoint returns a registration request's context with, for example, error details and other information. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
|
338
|
+
# @param request [String] Request is the Registration Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/registration?request=abcde`).
|
339
|
+
# @param [Hash] opts the optional parameters
|
340
|
+
# @return [RegistrationRequest]
|
341
|
+
def get_self_service_browser_registration_request(request, opts = {})
|
342
|
+
data, _status_code, _headers = get_self_service_browser_registration_request_with_http_info(request, opts)
|
343
|
+
data
|
344
|
+
end
|
345
|
+
|
346
|
+
# Get the request context of browser-based registration user flows
|
347
|
+
# This endpoint returns a registration request's context with, for example, error details and other information. When accessing this endpoint through ORY Kratos' Public API, ensure that cookies are set as they are required for CSRF to work. To prevent token scanning attacks, the public endpoint does not return 404 status codes to prevent scanning attacks. More information can be found at [ORY Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
|
348
|
+
# @param request [String] Request is the Registration Request ID The value for this parameter comes from `request` URL Query parameter sent to your application (e.g. `/registration?request=abcde`).
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @return [Array<(RegistrationRequest, Integer, Hash)>] RegistrationRequest data, response status code and response headers
|
351
|
+
def get_self_service_browser_registration_request_with_http_info(request, opts = {})
|
352
|
+
if @api_client.config.debugging
|
353
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.get_self_service_browser_registration_request ...'
|
354
|
+
end
|
355
|
+
# verify the required parameter 'request' is set
|
356
|
+
if @api_client.config.client_side_validation && request.nil?
|
357
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling AdminApi.get_self_service_browser_registration_request"
|
358
|
+
end
|
359
|
+
# resource path
|
360
|
+
local_var_path = '/self-service/browser/flows/requests/registration'
|
361
|
+
|
362
|
+
# query parameters
|
363
|
+
query_params = opts[:query_params] || {}
|
364
|
+
query_params[:'request'] = request
|
365
|
+
|
366
|
+
# header parameters
|
367
|
+
header_params = opts[:header_params] || {}
|
368
|
+
# HTTP header 'Accept' (if needed)
|
369
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
370
|
+
|
371
|
+
# form parameters
|
372
|
+
form_params = opts[:form_params] || {}
|
373
|
+
|
374
|
+
# http body (model)
|
375
|
+
post_body = opts[:body]
|
376
|
+
|
377
|
+
# return_type
|
378
|
+
return_type = opts[:return_type] || 'RegistrationRequest'
|
379
|
+
|
380
|
+
# auth_names
|
381
|
+
auth_names = opts[:auth_names] || []
|
382
|
+
|
383
|
+
new_options = opts.merge(
|
384
|
+
:header_params => header_params,
|
385
|
+
:query_params => query_params,
|
386
|
+
:form_params => form_params,
|
387
|
+
:body => post_body,
|
388
|
+
:auth_names => auth_names,
|
389
|
+
:return_type => return_type
|
390
|
+
)
|
391
|
+
|
392
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
393
|
+
if @api_client.config.debugging
|
394
|
+
@api_client.config.logger.debug "API called: AdminApi#get_self_service_browser_registration_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
395
|
+
end
|
396
|
+
return data, status_code, headers
|
397
|
+
end
|
398
|
+
|
399
|
+
# List all identities in the system
|
400
|
+
# This endpoint returns a login request's context with, for example, error details and other information. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
401
|
+
# @param [Hash] opts the optional parameters
|
402
|
+
# @return [Array<Identity>]
|
403
|
+
def list_identities(opts = {})
|
404
|
+
data, _status_code, _headers = list_identities_with_http_info(opts)
|
405
|
+
data
|
406
|
+
end
|
407
|
+
|
408
|
+
# List all identities in the system
|
409
|
+
# This endpoint returns a login request's context with, for example, error details and other information. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
410
|
+
# @param [Hash] opts the optional parameters
|
411
|
+
# @return [Array<(Array<Identity>, Integer, Hash)>] Array<Identity> data, response status code and response headers
|
412
|
+
def list_identities_with_http_info(opts = {})
|
413
|
+
if @api_client.config.debugging
|
414
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.list_identities ...'
|
415
|
+
end
|
416
|
+
# resource path
|
417
|
+
local_var_path = '/identities'
|
418
|
+
|
419
|
+
# query parameters
|
420
|
+
query_params = opts[:query_params] || {}
|
421
|
+
|
422
|
+
# header parameters
|
423
|
+
header_params = opts[:header_params] || {}
|
424
|
+
# HTTP header 'Accept' (if needed)
|
425
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
426
|
+
|
427
|
+
# form parameters
|
428
|
+
form_params = opts[:form_params] || {}
|
429
|
+
|
430
|
+
# http body (model)
|
431
|
+
post_body = opts[:body]
|
432
|
+
|
433
|
+
# return_type
|
434
|
+
return_type = opts[:return_type] || 'Array<Identity>'
|
435
|
+
|
436
|
+
# auth_names
|
437
|
+
auth_names = opts[:auth_names] || []
|
438
|
+
|
439
|
+
new_options = opts.merge(
|
440
|
+
:header_params => header_params,
|
441
|
+
:query_params => query_params,
|
442
|
+
:form_params => form_params,
|
443
|
+
:body => post_body,
|
444
|
+
:auth_names => auth_names,
|
445
|
+
:return_type => return_type
|
446
|
+
)
|
447
|
+
|
448
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
449
|
+
if @api_client.config.debugging
|
450
|
+
@api_client.config.logger.debug "API called: AdminApi#list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
451
|
+
end
|
452
|
+
return data, status_code, headers
|
453
|
+
end
|
454
|
+
|
455
|
+
# Update an identity
|
456
|
+
# This endpoint updates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
457
|
+
# @param id [String] ID must be set to the ID of identity you want to update
|
458
|
+
# @param body [Identity]
|
459
|
+
# @param [Hash] opts the optional parameters
|
460
|
+
# @return [Identity]
|
461
|
+
def update_identity(id, body, opts = {})
|
462
|
+
data, _status_code, _headers = update_identity_with_http_info(id, body, opts)
|
463
|
+
data
|
464
|
+
end
|
465
|
+
|
466
|
+
# Update an identity
|
467
|
+
# This endpoint updates an identity. It is NOT possible to set an identity's credentials (password, ...) using this method! A way to achieve that will be introduced in the future. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
468
|
+
# @param id [String] ID must be set to the ID of identity you want to update
|
469
|
+
# @param body [Identity]
|
470
|
+
# @param [Hash] opts the optional parameters
|
471
|
+
# @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
|
472
|
+
def update_identity_with_http_info(id, body, opts = {})
|
473
|
+
if @api_client.config.debugging
|
474
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.update_identity ...'
|
475
|
+
end
|
476
|
+
# verify the required parameter 'id' is set
|
477
|
+
if @api_client.config.client_side_validation && id.nil?
|
478
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.update_identity"
|
479
|
+
end
|
480
|
+
# verify the required parameter 'body' is set
|
481
|
+
if @api_client.config.client_side_validation && body.nil?
|
482
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.update_identity"
|
483
|
+
end
|
484
|
+
# resource path
|
485
|
+
local_var_path = '/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
486
|
+
|
487
|
+
# query parameters
|
488
|
+
query_params = opts[:query_params] || {}
|
489
|
+
|
490
|
+
# header parameters
|
491
|
+
header_params = opts[:header_params] || {}
|
492
|
+
# HTTP header 'Accept' (if needed)
|
493
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
494
|
+
# HTTP header 'Content-Type'
|
495
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
496
|
+
|
497
|
+
# form parameters
|
498
|
+
form_params = opts[:form_params] || {}
|
499
|
+
|
500
|
+
# http body (model)
|
501
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
502
|
+
|
503
|
+
# return_type
|
504
|
+
return_type = opts[:return_type] || 'Identity'
|
505
|
+
|
506
|
+
# auth_names
|
507
|
+
auth_names = opts[:auth_names] || []
|
508
|
+
|
509
|
+
new_options = opts.merge(
|
510
|
+
:header_params => header_params,
|
511
|
+
:query_params => query_params,
|
512
|
+
:form_params => form_params,
|
513
|
+
:body => post_body,
|
514
|
+
:auth_names => auth_names,
|
515
|
+
:return_type => return_type
|
516
|
+
)
|
517
|
+
|
518
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
519
|
+
if @api_client.config.debugging
|
520
|
+
@api_client.config.logger.debug "API called: AdminApi#update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
521
|
+
end
|
522
|
+
return data, status_code, headers
|
523
|
+
end
|
524
|
+
end
|
525
|
+
end
|