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::LoginRequest
|
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, LoginRequestMethod>**](LoginRequestMethod.md) | Methods contains context for all enabled login methods. If a login 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::LoginRequest.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::LoginRequestMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**config** | [**LoginRequestMethodConfig**](LoginRequestMethodConfig.md) | | [optional]
|
8
|
+
**method** | **String** | and so on. | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::LoginRequestMethod.new(config: null,
|
16
|
+
method: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# OryHydraClient::LoginRequestMethodConfig
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
|
8
|
+
## Code Sample
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'OryHydraClient'
|
12
|
+
|
13
|
+
instance = OryHydraClient::LoginRequestMethodConfig.new()
|
14
|
+
```
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# OryHydraClient::OidcStrategyCredentialsConfig
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**provider** | **String** | | [optional]
|
8
|
+
**subject** | **String** | | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'OryHydraClient'
|
14
|
+
|
15
|
+
instance = OryHydraClient::OidcStrategyCredentialsConfig.new(provider: null,
|
16
|
+
subject: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# OryHydraClient::OidcStrategyRequestMethod
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**action** | **String** | Action should be used as the form action URL (<form action=\"{{ .Action }}\" method=\"post\">). | [optional]
|
8
|
+
**errors** | [**Array<Error>**](Error.md) | Errors contains all form errors. These will be duplicates of the individual field errors. | [optional]
|
9
|
+
**fields** | [**Hash<String, FormField>**](FormField.md) | Fields contains multiple fields asdfasdf | [optional]
|
10
|
+
**method** | **String** | Method is the form method (e.g. POST) | [optional]
|
11
|
+
**providers** | [**Array<FormField>**](FormField.md) | | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'OryHydraClient'
|
17
|
+
|
18
|
+
instance = OryHydraClient::OidcStrategyRequestMethod.new(action: null,
|
19
|
+
errors: null,
|
20
|
+
fields: null,
|
21
|
+
method: null,
|
22
|
+
providers: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# OryHydraClient::ProfileManagementRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**expires_at** | **DateTime** | ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the profile, a new request has to be initiated. | [optional]
|
8
|
+
**form** | [**Form**](Form.md) | | [optional]
|
9
|
+
**id** | **String** | | [optional]
|
10
|
+
**identity** | [**Identity**](Identity.md) | | [optional]
|
11
|
+
**issued_at** | **DateTime** | IssuedAt is the time (UTC) when the request occurred. | [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
|
+
**update_successful** | **Boolean** | UpdateSuccessful, if true, indicates that the profile has been updated successfully with the provided data. Done will stay true when repeatedly checking. If set to true, done will revert back to false only when a request with invalid (e.g. \"please use a valid phone number\") data was sent. | [optional]
|
14
|
+
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'OryHydraClient'
|
19
|
+
|
20
|
+
instance = OryHydraClient::ProfileManagementRequest.new(expires_at: null,
|
21
|
+
form: null,
|
22
|
+
id: null,
|
23
|
+
identity: null,
|
24
|
+
issued_at: null,
|
25
|
+
request_url: null,
|
26
|
+
update_successful: null)
|
27
|
+
```
|
28
|
+
|
29
|
+
|
data/docs/PublicApi.md
ADDED
@@ -0,0 +1,419 @@
|
|
1
|
+
# OryHydraClient::PublicApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**complete_self_service_browser_profile_management_flow**](PublicApi.md#complete_self_service_browser_profile_management_flow) | **POST** /self-service/browser/flows/profile/update | Complete the browser-based profile management flows
|
8
|
+
[**get_self_service_browser_login_request**](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
|
9
|
+
[**get_self_service_browser_profile_management_request**](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
|
10
|
+
[**get_self_service_browser_registration_request**](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
|
11
|
+
[**initialize_self_service_browser_login_flow**](PublicApi.md#initialize_self_service_browser_login_flow) | **GET** /self-service/browser/flows/login | Initialize browser-based login user flow
|
12
|
+
[**initialize_self_service_browser_logout_flow**](PublicApi.md#initialize_self_service_browser_logout_flow) | **GET** /self-service/browser/flows/logout | Initialize Browser-Based Logout User Flow
|
13
|
+
[**initialize_self_service_browser_registration_flow**](PublicApi.md#initialize_self_service_browser_registration_flow) | **GET** /self-service/browser/flows/registration | Initialize browser-based registration user flow
|
14
|
+
[**initialize_self_service_profile_management_flow**](PublicApi.md#initialize_self_service_profile_management_flow) | **GET** /self-service/browser/flows/profile | Initialize browser-based profile management flow
|
15
|
+
[**whoami**](PublicApi.md#whoami) | **GET** /sessions/whoami | Check who the current HTTP session belongs to
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
## complete_self_service_browser_profile_management_flow
|
20
|
+
|
21
|
+
> complete_self_service_browser_profile_management_flow(body, opts)
|
22
|
+
|
23
|
+
Complete the browser-based profile management flows
|
24
|
+
|
25
|
+
This endpoint completes a browser-based profile management flow. This is usually achieved by POSTing data to this endpoint. If the provided profile data is valid against the Identity's Traits JSON Schema, the data will be updated and the browser redirected to `url.profile_ui` for further steps. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...) and HTML Forms. More information can be found at [ORY Kratos Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-profile-management).
|
26
|
+
|
27
|
+
### Example
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
# load the gem
|
31
|
+
require 'ory-kratos-client'
|
32
|
+
|
33
|
+
api_instance = OryHydraClient::PublicApi.new
|
34
|
+
body = OryHydraClient::CompleteSelfServiceBrowserProfileManagementFlowPayload.new # CompleteSelfServiceBrowserProfileManagementFlowPayload |
|
35
|
+
opts = {
|
36
|
+
request: 'request_example' # String | Request is the request ID. type: string
|
37
|
+
}
|
38
|
+
|
39
|
+
begin
|
40
|
+
#Complete the browser-based profile management flows
|
41
|
+
api_instance.complete_self_service_browser_profile_management_flow(body, opts)
|
42
|
+
rescue OryHydraClient::ApiError => e
|
43
|
+
puts "Exception when calling PublicApi->complete_self_service_browser_profile_management_flow: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
|
50
|
+
Name | Type | Description | Notes
|
51
|
+
------------- | ------------- | ------------- | -------------
|
52
|
+
**body** | [**CompleteSelfServiceBrowserProfileManagementFlowPayload**](CompleteSelfServiceBrowserProfileManagementFlowPayload.md)| |
|
53
|
+
**request** | **String**| Request is the request ID. type: string | [optional]
|
54
|
+
|
55
|
+
### Return type
|
56
|
+
|
57
|
+
nil (empty response body)
|
58
|
+
|
59
|
+
### Authorization
|
60
|
+
|
61
|
+
No authorization required
|
62
|
+
|
63
|
+
### HTTP request headers
|
64
|
+
|
65
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded
|
66
|
+
- **Accept**: application/json
|
67
|
+
|
68
|
+
|
69
|
+
## get_self_service_browser_login_request
|
70
|
+
|
71
|
+
> LoginRequest get_self_service_browser_login_request(request)
|
72
|
+
|
73
|
+
Get the request context of browser-based login user flows
|
74
|
+
|
75
|
+
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).
|
76
|
+
|
77
|
+
### Example
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
# load the gem
|
81
|
+
require 'ory-kratos-client'
|
82
|
+
|
83
|
+
api_instance = OryHydraClient::PublicApi.new
|
84
|
+
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`).
|
85
|
+
|
86
|
+
begin
|
87
|
+
#Get the request context of browser-based login user flows
|
88
|
+
result = api_instance.get_self_service_browser_login_request(request)
|
89
|
+
p result
|
90
|
+
rescue OryHydraClient::ApiError => e
|
91
|
+
puts "Exception when calling PublicApi->get_self_service_browser_login_request: #{e}"
|
92
|
+
end
|
93
|
+
```
|
94
|
+
|
95
|
+
### Parameters
|
96
|
+
|
97
|
+
|
98
|
+
Name | Type | Description | Notes
|
99
|
+
------------- | ------------- | ------------- | -------------
|
100
|
+
**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`). |
|
101
|
+
|
102
|
+
### Return type
|
103
|
+
|
104
|
+
[**LoginRequest**](LoginRequest.md)
|
105
|
+
|
106
|
+
### Authorization
|
107
|
+
|
108
|
+
No authorization required
|
109
|
+
|
110
|
+
### HTTP request headers
|
111
|
+
|
112
|
+
- **Content-Type**: Not defined
|
113
|
+
- **Accept**: application/json
|
114
|
+
|
115
|
+
|
116
|
+
## get_self_service_browser_profile_management_request
|
117
|
+
|
118
|
+
> ProfileManagementRequest get_self_service_browser_profile_management_request(request)
|
119
|
+
|
120
|
+
Get the request context of browser-based profile management flows
|
121
|
+
|
122
|
+
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).
|
123
|
+
|
124
|
+
### Example
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
# load the gem
|
128
|
+
require 'ory-kratos-client'
|
129
|
+
|
130
|
+
api_instance = OryHydraClient::PublicApi.new
|
131
|
+
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`).
|
132
|
+
|
133
|
+
begin
|
134
|
+
#Get the request context of browser-based profile management flows
|
135
|
+
result = api_instance.get_self_service_browser_profile_management_request(request)
|
136
|
+
p result
|
137
|
+
rescue OryHydraClient::ApiError => e
|
138
|
+
puts "Exception when calling PublicApi->get_self_service_browser_profile_management_request: #{e}"
|
139
|
+
end
|
140
|
+
```
|
141
|
+
|
142
|
+
### Parameters
|
143
|
+
|
144
|
+
|
145
|
+
Name | Type | Description | Notes
|
146
|
+
------------- | ------------- | ------------- | -------------
|
147
|
+
**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`). |
|
148
|
+
|
149
|
+
### Return type
|
150
|
+
|
151
|
+
[**ProfileManagementRequest**](ProfileManagementRequest.md)
|
152
|
+
|
153
|
+
### Authorization
|
154
|
+
|
155
|
+
No authorization required
|
156
|
+
|
157
|
+
### HTTP request headers
|
158
|
+
|
159
|
+
- **Content-Type**: Not defined
|
160
|
+
- **Accept**: application/json
|
161
|
+
|
162
|
+
|
163
|
+
## get_self_service_browser_registration_request
|
164
|
+
|
165
|
+
> RegistrationRequest get_self_service_browser_registration_request(request)
|
166
|
+
|
167
|
+
Get the request context of browser-based registration user flows
|
168
|
+
|
169
|
+
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).
|
170
|
+
|
171
|
+
### Example
|
172
|
+
|
173
|
+
```ruby
|
174
|
+
# load the gem
|
175
|
+
require 'ory-kratos-client'
|
176
|
+
|
177
|
+
api_instance = OryHydraClient::PublicApi.new
|
178
|
+
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`).
|
179
|
+
|
180
|
+
begin
|
181
|
+
#Get the request context of browser-based registration user flows
|
182
|
+
result = api_instance.get_self_service_browser_registration_request(request)
|
183
|
+
p result
|
184
|
+
rescue OryHydraClient::ApiError => e
|
185
|
+
puts "Exception when calling PublicApi->get_self_service_browser_registration_request: #{e}"
|
186
|
+
end
|
187
|
+
```
|
188
|
+
|
189
|
+
### Parameters
|
190
|
+
|
191
|
+
|
192
|
+
Name | Type | Description | Notes
|
193
|
+
------------- | ------------- | ------------- | -------------
|
194
|
+
**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`). |
|
195
|
+
|
196
|
+
### Return type
|
197
|
+
|
198
|
+
[**RegistrationRequest**](RegistrationRequest.md)
|
199
|
+
|
200
|
+
### Authorization
|
201
|
+
|
202
|
+
No authorization required
|
203
|
+
|
204
|
+
### HTTP request headers
|
205
|
+
|
206
|
+
- **Content-Type**: Not defined
|
207
|
+
- **Accept**: application/json
|
208
|
+
|
209
|
+
|
210
|
+
## initialize_self_service_browser_login_flow
|
211
|
+
|
212
|
+
> initialize_self_service_browser_login_flow
|
213
|
+
|
214
|
+
Initialize browser-based login user flow
|
215
|
+
|
216
|
+
This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to `urls.login_ui` with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). 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).
|
217
|
+
|
218
|
+
### Example
|
219
|
+
|
220
|
+
```ruby
|
221
|
+
# load the gem
|
222
|
+
require 'ory-kratos-client'
|
223
|
+
|
224
|
+
api_instance = OryHydraClient::PublicApi.new
|
225
|
+
|
226
|
+
begin
|
227
|
+
#Initialize browser-based login user flow
|
228
|
+
api_instance.initialize_self_service_browser_login_flow
|
229
|
+
rescue OryHydraClient::ApiError => e
|
230
|
+
puts "Exception when calling PublicApi->initialize_self_service_browser_login_flow: #{e}"
|
231
|
+
end
|
232
|
+
```
|
233
|
+
|
234
|
+
### Parameters
|
235
|
+
|
236
|
+
This endpoint does not need any parameter.
|
237
|
+
|
238
|
+
### Return type
|
239
|
+
|
240
|
+
nil (empty response body)
|
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
|
+
## initialize_self_service_browser_logout_flow
|
253
|
+
|
254
|
+
> initialize_self_service_browser_logout_flow
|
255
|
+
|
256
|
+
Initialize Browser-Based Logout User Flow
|
257
|
+
|
258
|
+
This endpoint initializes a logout flow. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). On successful logout, the browser will be redirected (HTTP 302 Found) to `urls.default_return_to`. More information can be found at [ORY Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
|
259
|
+
|
260
|
+
### Example
|
261
|
+
|
262
|
+
```ruby
|
263
|
+
# load the gem
|
264
|
+
require 'ory-kratos-client'
|
265
|
+
|
266
|
+
api_instance = OryHydraClient::PublicApi.new
|
267
|
+
|
268
|
+
begin
|
269
|
+
#Initialize Browser-Based Logout User Flow
|
270
|
+
api_instance.initialize_self_service_browser_logout_flow
|
271
|
+
rescue OryHydraClient::ApiError => e
|
272
|
+
puts "Exception when calling PublicApi->initialize_self_service_browser_logout_flow: #{e}"
|
273
|
+
end
|
274
|
+
```
|
275
|
+
|
276
|
+
### Parameters
|
277
|
+
|
278
|
+
This endpoint does not need any parameter.
|
279
|
+
|
280
|
+
### Return type
|
281
|
+
|
282
|
+
nil (empty response body)
|
283
|
+
|
284
|
+
### Authorization
|
285
|
+
|
286
|
+
No authorization required
|
287
|
+
|
288
|
+
### HTTP request headers
|
289
|
+
|
290
|
+
- **Content-Type**: Not defined
|
291
|
+
- **Accept**: application/json
|
292
|
+
|
293
|
+
|
294
|
+
## initialize_self_service_browser_registration_flow
|
295
|
+
|
296
|
+
> initialize_self_service_browser_registration_flow
|
297
|
+
|
298
|
+
Initialize browser-based registration user flow
|
299
|
+
|
300
|
+
This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to `urls.registration_ui` with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to `urls.default_redirect_url`. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). 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).
|
301
|
+
|
302
|
+
### Example
|
303
|
+
|
304
|
+
```ruby
|
305
|
+
# load the gem
|
306
|
+
require 'ory-kratos-client'
|
307
|
+
|
308
|
+
api_instance = OryHydraClient::PublicApi.new
|
309
|
+
|
310
|
+
begin
|
311
|
+
#Initialize browser-based registration user flow
|
312
|
+
api_instance.initialize_self_service_browser_registration_flow
|
313
|
+
rescue OryHydraClient::ApiError => e
|
314
|
+
puts "Exception when calling PublicApi->initialize_self_service_browser_registration_flow: #{e}"
|
315
|
+
end
|
316
|
+
```
|
317
|
+
|
318
|
+
### Parameters
|
319
|
+
|
320
|
+
This endpoint does not need any parameter.
|
321
|
+
|
322
|
+
### Return type
|
323
|
+
|
324
|
+
nil (empty response body)
|
325
|
+
|
326
|
+
### Authorization
|
327
|
+
|
328
|
+
No authorization required
|
329
|
+
|
330
|
+
### HTTP request headers
|
331
|
+
|
332
|
+
- **Content-Type**: Not defined
|
333
|
+
- **Accept**: application/json
|
334
|
+
|
335
|
+
|
336
|
+
## initialize_self_service_profile_management_flow
|
337
|
+
|
338
|
+
> initialize_self_service_profile_management_flow
|
339
|
+
|
340
|
+
Initialize browser-based profile management flow
|
341
|
+
|
342
|
+
This endpoint initializes a browser-based profile management flow. Once initialized, the browser will be redirected to `urls.profile_ui` with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. > This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). More information can be found at [ORY Kratos Profile Management Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-profile-management).
|
343
|
+
|
344
|
+
### Example
|
345
|
+
|
346
|
+
```ruby
|
347
|
+
# load the gem
|
348
|
+
require 'ory-kratos-client'
|
349
|
+
|
350
|
+
api_instance = OryHydraClient::PublicApi.new
|
351
|
+
|
352
|
+
begin
|
353
|
+
#Initialize browser-based profile management flow
|
354
|
+
api_instance.initialize_self_service_profile_management_flow
|
355
|
+
rescue OryHydraClient::ApiError => e
|
356
|
+
puts "Exception when calling PublicApi->initialize_self_service_profile_management_flow: #{e}"
|
357
|
+
end
|
358
|
+
```
|
359
|
+
|
360
|
+
### Parameters
|
361
|
+
|
362
|
+
This endpoint does not need any parameter.
|
363
|
+
|
364
|
+
### Return type
|
365
|
+
|
366
|
+
nil (empty response body)
|
367
|
+
|
368
|
+
### Authorization
|
369
|
+
|
370
|
+
No authorization required
|
371
|
+
|
372
|
+
### HTTP request headers
|
373
|
+
|
374
|
+
- **Content-Type**: Not defined
|
375
|
+
- **Accept**: application/json
|
376
|
+
|
377
|
+
|
378
|
+
## whoami
|
379
|
+
|
380
|
+
> Session whoami
|
381
|
+
|
382
|
+
Check who the current HTTP session belongs to
|
383
|
+
|
384
|
+
Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated. Returns a session object or 401 if the credentials are invalid or no credentials were sent. This endpoint is useful for reverse proxies and API Gateways.
|
385
|
+
|
386
|
+
### Example
|
387
|
+
|
388
|
+
```ruby
|
389
|
+
# load the gem
|
390
|
+
require 'ory-kratos-client'
|
391
|
+
|
392
|
+
api_instance = OryHydraClient::PublicApi.new
|
393
|
+
|
394
|
+
begin
|
395
|
+
#Check who the current HTTP session belongs to
|
396
|
+
result = api_instance.whoami
|
397
|
+
p result
|
398
|
+
rescue OryHydraClient::ApiError => e
|
399
|
+
puts "Exception when calling PublicApi->whoami: #{e}"
|
400
|
+
end
|
401
|
+
```
|
402
|
+
|
403
|
+
### Parameters
|
404
|
+
|
405
|
+
This endpoint does not need any parameter.
|
406
|
+
|
407
|
+
### Return type
|
408
|
+
|
409
|
+
[**Session**](Session.md)
|
410
|
+
|
411
|
+
### Authorization
|
412
|
+
|
413
|
+
No authorization required
|
414
|
+
|
415
|
+
### HTTP request headers
|
416
|
+
|
417
|
+
- **Content-Type**: Not defined
|
418
|
+
- **Accept**: application/json
|
419
|
+
|