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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d9583284f88c2316a1eda66d477cead9e4041da12b3249d5db8046e637b76171
|
4
|
+
data.tar.gz: 75d1e620ec93e5d6139d3c1fc670093bcabebbcf948235e727911e0c72be8d53
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1317f9ec4f01158e724a036edeed7ac977a6243ab1d2a61d4ebf098b820a46d08fb48fd8f1cf20a991a6d150b36e41d044aa77eb96ce47551c03d35169eb4d9f
|
7
|
+
data.tar.gz: 27f95f77813b08daaa540187fd83f5bc920915aaa633973ba37c2e8ecf6507e94314909580135b06fb2f1831e81495844176affe0630ad694a4bf496e74db928
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
# ory-kratos-client
|
2
|
+
|
3
|
+
OryHydraClient - the Ruby gem for the Ory Kratos
|
4
|
+
|
5
|
+
Welcome to the ORY Kratos HTTP API documentation!
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
|
+
|
9
|
+
- API version: latest
|
10
|
+
- Package version: v0.0.3-alpha.2
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build ory-kratos-client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./ory-kratos-client-v0.0.3-alpha.2.gem
|
27
|
+
```
|
28
|
+
|
29
|
+
(for development, run `gem install --dev ./ory-kratos-client-v0.0.3-alpha.2.gem` to install the development dependencies)
|
30
|
+
|
31
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
|
+
|
33
|
+
Finally add this to the Gemfile:
|
34
|
+
|
35
|
+
gem 'ory-kratos-client', '~> v0.0.3-alpha.2'
|
36
|
+
|
37
|
+
### Install from Git
|
38
|
+
|
39
|
+
If the Ruby gem is hosted at a git repository: https://github.com/ory/sdk, then add the following in the Gemfile:
|
40
|
+
|
41
|
+
gem 'ory-kratos-client', :git => 'https://github.com/ory/sdk.git'
|
42
|
+
|
43
|
+
### Include the Ruby code directly
|
44
|
+
|
45
|
+
Include the Ruby code directly using `-I` as follows:
|
46
|
+
|
47
|
+
```shell
|
48
|
+
ruby -Ilib script.rb
|
49
|
+
```
|
50
|
+
|
51
|
+
## Getting Started
|
52
|
+
|
53
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
# Load the gem
|
57
|
+
require 'ory-kratos-client'
|
58
|
+
|
59
|
+
api_instance = OryHydraClient::AdminApi.new
|
60
|
+
body = OryHydraClient::Identity.new # Identity |
|
61
|
+
|
62
|
+
begin
|
63
|
+
#Create an identity
|
64
|
+
result = api_instance.create_identity(body)
|
65
|
+
p result
|
66
|
+
rescue OryHydraClient::ApiError => e
|
67
|
+
puts "Exception when calling AdminApi->create_identity: #{e}"
|
68
|
+
end
|
69
|
+
|
70
|
+
```
|
71
|
+
|
72
|
+
## Documentation for API Endpoints
|
73
|
+
|
74
|
+
All URIs are relative to *http://localhost*
|
75
|
+
|
76
|
+
Class | Method | HTTP request | Description
|
77
|
+
------------ | ------------- | ------------- | -------------
|
78
|
+
*OryHydraClient::AdminApi* | [**create_identity**](docs/AdminApi.md#create_identity) | **POST** /identities | Create an identity
|
79
|
+
*OryHydraClient::AdminApi* | [**delete_identity**](docs/AdminApi.md#delete_identity) | **DELETE** /identities/{id} | Delete an identity
|
80
|
+
*OryHydraClient::AdminApi* | [**get_identity**](docs/AdminApi.md#get_identity) | **GET** /identities/{id} | Get an identity
|
81
|
+
*OryHydraClient::AdminApi* | [**get_self_service_browser_login_request**](docs/AdminApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
82
|
+
*OryHydraClient::AdminApi* | [**get_self_service_browser_profile_management_request**](docs/AdminApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
83
|
+
*OryHydraClient::AdminApi* | [**get_self_service_browser_registration_request**](docs/AdminApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
84
|
+
*OryHydraClient::AdminApi* | [**list_identities**](docs/AdminApi.md#list_identities) | **GET** /identities | List all identities in the system
|
85
|
+
*OryHydraClient::AdminApi* | [**update_identity**](docs/AdminApi.md#update_identity) | **PUT** /identities/{id} | Update an identity
|
86
|
+
*OryHydraClient::CommonApi* | [**get_self_service_browser_login_request**](docs/CommonApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
87
|
+
*OryHydraClient::CommonApi* | [**get_self_service_browser_profile_management_request**](docs/CommonApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
88
|
+
*OryHydraClient::CommonApi* | [**get_self_service_browser_registration_request**](docs/CommonApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
89
|
+
*OryHydraClient::HealthApi* | [**is_instance_alive**](docs/HealthApi.md#is_instance_alive) | **GET** /health/alive | Check alive status
|
90
|
+
*OryHydraClient::HealthApi* | [**is_instance_ready**](docs/HealthApi.md#is_instance_ready) | **GET** /health/ready | Check readiness status
|
91
|
+
*OryHydraClient::PublicApi* | [**complete_self_service_browser_profile_management_flow**](docs/PublicApi.md#complete_self_service_browser_profile_management_flow) | **POST** /self-service/browser/flows/profile/update | Complete the browser-based profile management flows
|
92
|
+
*OryHydraClient::PublicApi* | [**get_self_service_browser_login_request**](docs/PublicApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
93
|
+
*OryHydraClient::PublicApi* | [**get_self_service_browser_profile_management_request**](docs/PublicApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
94
|
+
*OryHydraClient::PublicApi* | [**get_self_service_browser_registration_request**](docs/PublicApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
95
|
+
*OryHydraClient::PublicApi* | [**initialize_self_service_browser_login_flow**](docs/PublicApi.md#initialize_self_service_browser_login_flow) | **GET** /self-service/browser/flows/login | Initialize browser-based login user flow
|
96
|
+
*OryHydraClient::PublicApi* | [**initialize_self_service_browser_logout_flow**](docs/PublicApi.md#initialize_self_service_browser_logout_flow) | **GET** /self-service/browser/flows/logout | Initialize Browser-Based Logout User Flow
|
97
|
+
*OryHydraClient::PublicApi* | [**initialize_self_service_browser_registration_flow**](docs/PublicApi.md#initialize_self_service_browser_registration_flow) | **GET** /self-service/browser/flows/registration | Initialize browser-based registration user flow
|
98
|
+
*OryHydraClient::PublicApi* | [**initialize_self_service_profile_management_flow**](docs/PublicApi.md#initialize_self_service_profile_management_flow) | **GET** /self-service/browser/flows/profile | Initialize browser-based profile management flow
|
99
|
+
*OryHydraClient::PublicApi* | [**whoami**](docs/PublicApi.md#whoami) | **GET** /sessions/whoami | Check who the current HTTP session belongs to
|
100
|
+
*OryHydraClient::VersionApi* | [**get_version**](docs/VersionApi.md#get_version) | **GET** /version | Get service version
|
101
|
+
|
102
|
+
|
103
|
+
## Documentation for Models
|
104
|
+
|
105
|
+
- [OryHydraClient::CompleteSelfServiceBrowserProfileManagementFlowPayload](docs/CompleteSelfServiceBrowserProfileManagementFlowPayload.md)
|
106
|
+
- [OryHydraClient::Error](docs/Error.md)
|
107
|
+
- [OryHydraClient::Form](docs/Form.md)
|
108
|
+
- [OryHydraClient::FormField](docs/FormField.md)
|
109
|
+
- [OryHydraClient::GenericError](docs/GenericError.md)
|
110
|
+
- [OryHydraClient::GenericErrorPayload](docs/GenericErrorPayload.md)
|
111
|
+
- [OryHydraClient::HealthNotReadyStatus](docs/HealthNotReadyStatus.md)
|
112
|
+
- [OryHydraClient::HealthStatus](docs/HealthStatus.md)
|
113
|
+
- [OryHydraClient::Identity](docs/Identity.md)
|
114
|
+
- [OryHydraClient::LoginRequest](docs/LoginRequest.md)
|
115
|
+
- [OryHydraClient::LoginRequestMethod](docs/LoginRequestMethod.md)
|
116
|
+
- [OryHydraClient::LoginRequestMethodConfig](docs/LoginRequestMethodConfig.md)
|
117
|
+
- [OryHydraClient::ProfileManagementRequest](docs/ProfileManagementRequest.md)
|
118
|
+
- [OryHydraClient::RegistrationRequest](docs/RegistrationRequest.md)
|
119
|
+
- [OryHydraClient::RegistrationRequestMethod](docs/RegistrationRequestMethod.md)
|
120
|
+
- [OryHydraClient::RegistrationRequestMethodConfig](docs/RegistrationRequestMethodConfig.md)
|
121
|
+
- [OryHydraClient::Session](docs/Session.md)
|
122
|
+
- [OryHydraClient::Version](docs/Version.md)
|
123
|
+
|
124
|
+
|
125
|
+
## Documentation for Authorization
|
126
|
+
|
127
|
+
All endpoints do not require authorization.
|
128
|
+
|
data/Rakefile
ADDED
data/docs/AdminApi.md
ADDED
@@ -0,0 +1,389 @@
|
|
1
|
+
# OryHydraClient::AdminApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_identity**](AdminApi.md#create_identity) | **POST** /identities | Create an identity
|
8
|
+
[**delete_identity**](AdminApi.md#delete_identity) | **DELETE** /identities/{id} | Delete an identity
|
9
|
+
[**get_identity**](AdminApi.md#get_identity) | **GET** /identities/{id} | Get an identity
|
10
|
+
[**get_self_service_browser_login_request**](AdminApi.md#get_self_service_browser_login_request) | **GET** /self-service/browser/flows/requests/login | Get the request context of browser-based login user flows
|
11
|
+
[**get_self_service_browser_profile_management_request**](AdminApi.md#get_self_service_browser_profile_management_request) | **GET** /self-service/browser/flows/requests/profile | Get the request context of browser-based profile management flows
|
12
|
+
[**get_self_service_browser_registration_request**](AdminApi.md#get_self_service_browser_registration_request) | **GET** /self-service/browser/flows/requests/registration | Get the request context of browser-based registration user flows
|
13
|
+
[**list_identities**](AdminApi.md#list_identities) | **GET** /identities | List all identities in the system
|
14
|
+
[**update_identity**](AdminApi.md#update_identity) | **PUT** /identities/{id} | Update an identity
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
## create_identity
|
19
|
+
|
20
|
+
> Identity create_identity(body)
|
21
|
+
|
22
|
+
Create an identity
|
23
|
+
|
24
|
+
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).
|
25
|
+
|
26
|
+
### Example
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
# load the gem
|
30
|
+
require 'ory-kratos-client'
|
31
|
+
|
32
|
+
api_instance = OryHydraClient::AdminApi.new
|
33
|
+
body = OryHydraClient::Identity.new # Identity |
|
34
|
+
|
35
|
+
begin
|
36
|
+
#Create an identity
|
37
|
+
result = api_instance.create_identity(body)
|
38
|
+
p result
|
39
|
+
rescue OryHydraClient::ApiError => e
|
40
|
+
puts "Exception when calling AdminApi->create_identity: #{e}"
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
### Parameters
|
45
|
+
|
46
|
+
|
47
|
+
Name | Type | Description | Notes
|
48
|
+
------------- | ------------- | ------------- | -------------
|
49
|
+
**body** | [**Identity**](Identity.md)| |
|
50
|
+
|
51
|
+
### Return type
|
52
|
+
|
53
|
+
[**Identity**](Identity.md)
|
54
|
+
|
55
|
+
### Authorization
|
56
|
+
|
57
|
+
No authorization required
|
58
|
+
|
59
|
+
### HTTP request headers
|
60
|
+
|
61
|
+
- **Content-Type**: application/json
|
62
|
+
- **Accept**: application/json
|
63
|
+
|
64
|
+
|
65
|
+
## delete_identity
|
66
|
+
|
67
|
+
> delete_identity(id)
|
68
|
+
|
69
|
+
Delete an identity
|
70
|
+
|
71
|
+
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).
|
72
|
+
|
73
|
+
### Example
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
# load the gem
|
77
|
+
require 'ory-kratos-client'
|
78
|
+
|
79
|
+
api_instance = OryHydraClient::AdminApi.new
|
80
|
+
id = 'id_example' # String | ID is the identity's ID.
|
81
|
+
|
82
|
+
begin
|
83
|
+
#Delete an identity
|
84
|
+
api_instance.delete_identity(id)
|
85
|
+
rescue OryHydraClient::ApiError => e
|
86
|
+
puts "Exception when calling AdminApi->delete_identity: #{e}"
|
87
|
+
end
|
88
|
+
```
|
89
|
+
|
90
|
+
### Parameters
|
91
|
+
|
92
|
+
|
93
|
+
Name | Type | Description | Notes
|
94
|
+
------------- | ------------- | ------------- | -------------
|
95
|
+
**id** | **String**| ID is the identity's ID. |
|
96
|
+
|
97
|
+
### Return type
|
98
|
+
|
99
|
+
nil (empty response body)
|
100
|
+
|
101
|
+
### Authorization
|
102
|
+
|
103
|
+
No authorization required
|
104
|
+
|
105
|
+
### HTTP request headers
|
106
|
+
|
107
|
+
- **Content-Type**: Not defined
|
108
|
+
- **Accept**: application/json
|
109
|
+
|
110
|
+
|
111
|
+
## get_identity
|
112
|
+
|
113
|
+
> Identity get_identity(id)
|
114
|
+
|
115
|
+
Get an identity
|
116
|
+
|
117
|
+
Learn how identities work in [ORY Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
|
118
|
+
|
119
|
+
### Example
|
120
|
+
|
121
|
+
```ruby
|
122
|
+
# load the gem
|
123
|
+
require 'ory-kratos-client'
|
124
|
+
|
125
|
+
api_instance = OryHydraClient::AdminApi.new
|
126
|
+
id = 'id_example' # String | ID must be set to the ID of identity you want to get
|
127
|
+
|
128
|
+
begin
|
129
|
+
#Get an identity
|
130
|
+
result = api_instance.get_identity(id)
|
131
|
+
p result
|
132
|
+
rescue OryHydraClient::ApiError => e
|
133
|
+
puts "Exception when calling AdminApi->get_identity: #{e}"
|
134
|
+
end
|
135
|
+
```
|
136
|
+
|
137
|
+
### Parameters
|
138
|
+
|
139
|
+
|
140
|
+
Name | Type | Description | Notes
|
141
|
+
------------- | ------------- | ------------- | -------------
|
142
|
+
**id** | **String**| ID must be set to the ID of identity you want to get |
|
143
|
+
|
144
|
+
### Return type
|
145
|
+
|
146
|
+
[**Identity**](Identity.md)
|
147
|
+
|
148
|
+
### Authorization
|
149
|
+
|
150
|
+
No authorization required
|
151
|
+
|
152
|
+
### HTTP request headers
|
153
|
+
|
154
|
+
- **Content-Type**: Not defined
|
155
|
+
- **Accept**: application/json
|
156
|
+
|
157
|
+
|
158
|
+
## get_self_service_browser_login_request
|
159
|
+
|
160
|
+
> LoginRequest get_self_service_browser_login_request(request)
|
161
|
+
|
162
|
+
Get the request context of browser-based login user flows
|
163
|
+
|
164
|
+
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).
|
165
|
+
|
166
|
+
### Example
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
# load the gem
|
170
|
+
require 'ory-kratos-client'
|
171
|
+
|
172
|
+
api_instance = OryHydraClient::AdminApi.new
|
173
|
+
request = 'request_example' # 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`).
|
174
|
+
|
175
|
+
begin
|
176
|
+
#Get the request context of browser-based login user flows
|
177
|
+
result = api_instance.get_self_service_browser_login_request(request)
|
178
|
+
p result
|
179
|
+
rescue OryHydraClient::ApiError => e
|
180
|
+
puts "Exception when calling AdminApi->get_self_service_browser_login_request: #{e}"
|
181
|
+
end
|
182
|
+
```
|
183
|
+
|
184
|
+
### Parameters
|
185
|
+
|
186
|
+
|
187
|
+
Name | Type | Description | Notes
|
188
|
+
------------- | ------------- | ------------- | -------------
|
189
|
+
**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`). |
|
190
|
+
|
191
|
+
### Return type
|
192
|
+
|
193
|
+
[**LoginRequest**](LoginRequest.md)
|
194
|
+
|
195
|
+
### Authorization
|
196
|
+
|
197
|
+
No authorization required
|
198
|
+
|
199
|
+
### HTTP request headers
|
200
|
+
|
201
|
+
- **Content-Type**: Not defined
|
202
|
+
- **Accept**: application/json
|
203
|
+
|
204
|
+
|
205
|
+
## get_self_service_browser_profile_management_request
|
206
|
+
|
207
|
+
> ProfileManagementRequest get_self_service_browser_profile_management_request(request)
|
208
|
+
|
209
|
+
Get the request context of browser-based profile management flows
|
210
|
+
|
211
|
+
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).
|
212
|
+
|
213
|
+
### Example
|
214
|
+
|
215
|
+
```ruby
|
216
|
+
# load the gem
|
217
|
+
require 'ory-kratos-client'
|
218
|
+
|
219
|
+
api_instance = OryHydraClient::AdminApi.new
|
220
|
+
request = 'request_example' # 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`).
|
221
|
+
|
222
|
+
begin
|
223
|
+
#Get the request context of browser-based profile management flows
|
224
|
+
result = api_instance.get_self_service_browser_profile_management_request(request)
|
225
|
+
p result
|
226
|
+
rescue OryHydraClient::ApiError => e
|
227
|
+
puts "Exception when calling AdminApi->get_self_service_browser_profile_management_request: #{e}"
|
228
|
+
end
|
229
|
+
```
|
230
|
+
|
231
|
+
### Parameters
|
232
|
+
|
233
|
+
|
234
|
+
Name | Type | Description | Notes
|
235
|
+
------------- | ------------- | ------------- | -------------
|
236
|
+
**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`). |
|
237
|
+
|
238
|
+
### Return type
|
239
|
+
|
240
|
+
[**ProfileManagementRequest**](ProfileManagementRequest.md)
|
241
|
+
|
242
|
+
### Authorization
|
243
|
+
|
244
|
+
No authorization required
|
245
|
+
|
246
|
+
### HTTP request headers
|
247
|
+
|
248
|
+
- **Content-Type**: Not defined
|
249
|
+
- **Accept**: application/json
|
250
|
+
|
251
|
+
|
252
|
+
## get_self_service_browser_registration_request
|
253
|
+
|
254
|
+
> RegistrationRequest get_self_service_browser_registration_request(request)
|
255
|
+
|
256
|
+
Get the request context of browser-based registration user flows
|
257
|
+
|
258
|
+
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).
|
259
|
+
|
260
|
+
### Example
|
261
|
+
|
262
|
+
```ruby
|
263
|
+
# load the gem
|
264
|
+
require 'ory-kratos-client'
|
265
|
+
|
266
|
+
api_instance = OryHydraClient::AdminApi.new
|
267
|
+
request = 'request_example' # 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`).
|
268
|
+
|
269
|
+
begin
|
270
|
+
#Get the request context of browser-based registration user flows
|
271
|
+
result = api_instance.get_self_service_browser_registration_request(request)
|
272
|
+
p result
|
273
|
+
rescue OryHydraClient::ApiError => e
|
274
|
+
puts "Exception when calling AdminApi->get_self_service_browser_registration_request: #{e}"
|
275
|
+
end
|
276
|
+
```
|
277
|
+
|
278
|
+
### Parameters
|
279
|
+
|
280
|
+
|
281
|
+
Name | Type | Description | Notes
|
282
|
+
------------- | ------------- | ------------- | -------------
|
283
|
+
**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`). |
|
284
|
+
|
285
|
+
### Return type
|
286
|
+
|
287
|
+
[**RegistrationRequest**](RegistrationRequest.md)
|
288
|
+
|
289
|
+
### Authorization
|
290
|
+
|
291
|
+
No authorization required
|
292
|
+
|
293
|
+
### HTTP request headers
|
294
|
+
|
295
|
+
- **Content-Type**: Not defined
|
296
|
+
- **Accept**: application/json
|
297
|
+
|
298
|
+
|
299
|
+
## list_identities
|
300
|
+
|
301
|
+
> Array<Identity> list_identities
|
302
|
+
|
303
|
+
List all identities in the system
|
304
|
+
|
305
|
+
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).
|
306
|
+
|
307
|
+
### Example
|
308
|
+
|
309
|
+
```ruby
|
310
|
+
# load the gem
|
311
|
+
require 'ory-kratos-client'
|
312
|
+
|
313
|
+
api_instance = OryHydraClient::AdminApi.new
|
314
|
+
|
315
|
+
begin
|
316
|
+
#List all identities in the system
|
317
|
+
result = api_instance.list_identities
|
318
|
+
p result
|
319
|
+
rescue OryHydraClient::ApiError => e
|
320
|
+
puts "Exception when calling AdminApi->list_identities: #{e}"
|
321
|
+
end
|
322
|
+
```
|
323
|
+
|
324
|
+
### Parameters
|
325
|
+
|
326
|
+
This endpoint does not need any parameter.
|
327
|
+
|
328
|
+
### Return type
|
329
|
+
|
330
|
+
[**Array<Identity>**](Identity.md)
|
331
|
+
|
332
|
+
### Authorization
|
333
|
+
|
334
|
+
No authorization required
|
335
|
+
|
336
|
+
### HTTP request headers
|
337
|
+
|
338
|
+
- **Content-Type**: Not defined
|
339
|
+
- **Accept**: application/json
|
340
|
+
|
341
|
+
|
342
|
+
## update_identity
|
343
|
+
|
344
|
+
> Identity update_identity(id, body)
|
345
|
+
|
346
|
+
Update an identity
|
347
|
+
|
348
|
+
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).
|
349
|
+
|
350
|
+
### Example
|
351
|
+
|
352
|
+
```ruby
|
353
|
+
# load the gem
|
354
|
+
require 'ory-kratos-client'
|
355
|
+
|
356
|
+
api_instance = OryHydraClient::AdminApi.new
|
357
|
+
id = 'id_example' # String | ID must be set to the ID of identity you want to update
|
358
|
+
body = OryHydraClient::Identity.new # Identity |
|
359
|
+
|
360
|
+
begin
|
361
|
+
#Update an identity
|
362
|
+
result = api_instance.update_identity(id, body)
|
363
|
+
p result
|
364
|
+
rescue OryHydraClient::ApiError => e
|
365
|
+
puts "Exception when calling AdminApi->update_identity: #{e}"
|
366
|
+
end
|
367
|
+
```
|
368
|
+
|
369
|
+
### Parameters
|
370
|
+
|
371
|
+
|
372
|
+
Name | Type | Description | Notes
|
373
|
+
------------- | ------------- | ------------- | -------------
|
374
|
+
**id** | **String**| ID must be set to the ID of identity you want to update |
|
375
|
+
**body** | [**Identity**](Identity.md)| |
|
376
|
+
|
377
|
+
### Return type
|
378
|
+
|
379
|
+
[**Identity**](Identity.md)
|
380
|
+
|
381
|
+
### Authorization
|
382
|
+
|
383
|
+
No authorization required
|
384
|
+
|
385
|
+
### HTTP request headers
|
386
|
+
|
387
|
+
- **Content-Type**: application/json
|
388
|
+
- **Accept**: application/json
|
389
|
+
|