ory-kratos-client 0.0.3.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +128 -0
  4. data/Rakefile +10 -0
  5. data/docs/AdminApi.md +389 -0
  6. data/docs/CommonApi.md +152 -0
  7. data/docs/CompleteSelfServiceBrowserProfileManagementFlowPayload.md +17 -0
  8. data/docs/Error.md +17 -0
  9. data/docs/Form.md +23 -0
  10. data/docs/FormField.md +25 -0
  11. data/docs/GenericError.md +17 -0
  12. data/docs/GenericErrorPayload.md +29 -0
  13. data/docs/HealthApi.md +96 -0
  14. data/docs/HealthNotReadyStatus.md +17 -0
  15. data/docs/HealthStatus.md +17 -0
  16. data/docs/Identity.md +23 -0
  17. data/docs/LoginRequest.md +27 -0
  18. data/docs/LoginRequestMethod.md +19 -0
  19. data/docs/LoginRequestMethodConfig.md +16 -0
  20. data/docs/OidcStrategyCredentialsConfig.md +19 -0
  21. data/docs/OidcStrategyRequestMethod.md +25 -0
  22. data/docs/ProfileManagementRequest.md +29 -0
  23. data/docs/PublicApi.md +419 -0
  24. data/docs/RegistrationRequest.md +27 -0
  25. data/docs/RegistrationRequestMethod.md +19 -0
  26. data/docs/RegistrationRequestMethodConfig.md +16 -0
  27. data/docs/Session.md +25 -0
  28. data/docs/Version.md +17 -0
  29. data/docs/VersionApi.md +52 -0
  30. data/lib/ory-kratos-client.rb +62 -0
  31. data/lib/ory-kratos-client/api/admin_api.rb +525 -0
  32. data/lib/ory-kratos-client/api/common_api.rb +211 -0
  33. data/lib/ory-kratos-client/api/health_api.rb +134 -0
  34. data/lib/ory-kratos-client/api/public_api.rb +558 -0
  35. data/lib/ory-kratos-client/api/version_api.rb +78 -0
  36. data/lib/ory-kratos-client/api_client.rb +385 -0
  37. data/lib/ory-kratos-client/api_error.rb +57 -0
  38. data/lib/ory-kratos-client/configuration.rb +241 -0
  39. data/lib/ory-kratos-client/models/complete_self_service_browser_profile_management_flow_payload.rb +212 -0
  40. data/lib/ory-kratos-client/models/error.rb +207 -0
  41. data/lib/ory-kratos-client/models/form.rb +242 -0
  42. data/lib/ory-kratos-client/models/form_field.rb +250 -0
  43. data/lib/ory-kratos-client/models/generic_error.rb +207 -0
  44. data/lib/ory-kratos-client/models/generic_error_payload.rb +265 -0
  45. data/lib/ory-kratos-client/models/health_not_ready_status.rb +209 -0
  46. data/lib/ory-kratos-client/models/health_status.rb +207 -0
  47. data/lib/ory-kratos-client/models/identity.rb +245 -0
  48. data/lib/ory-kratos-client/models/login_request.rb +258 -0
  49. data/lib/ory-kratos-client/models/login_request_method.rb +216 -0
  50. data/lib/ory-kratos-client/models/login_request_method_config.rb +197 -0
  51. data/lib/ory-kratos-client/models/oidc_strategy_credentials_config.rb +215 -0
  52. data/lib/ory-kratos-client/models/oidc_strategy_request_method.rb +252 -0
  53. data/lib/ory-kratos-client/models/profile_management_request.rb +265 -0
  54. data/lib/ory-kratos-client/models/registration_request.rb +258 -0
  55. data/lib/ory-kratos-client/models/registration_request_method.rb +216 -0
  56. data/lib/ory-kratos-client/models/registration_request_method_config.rb +197 -0
  57. data/lib/ory-kratos-client/models/session.rb +242 -0
  58. data/lib/ory-kratos-client/models/version.rb +207 -0
  59. data/lib/ory-kratos-client/version.rb +15 -0
  60. data/ory-kratos-client.gemspec +39 -0
  61. data/spec/api/admin_api_spec.rb +131 -0
  62. data/spec/api/common_api_spec.rb +71 -0
  63. data/spec/api/health_api_spec.rb +57 -0
  64. data/spec/api/public_api_spec.rb +113 -0
  65. data/spec/api/version_api_spec.rb +46 -0
  66. data/spec/api_client_spec.rb +226 -0
  67. data/spec/configuration_spec.rb +42 -0
  68. data/spec/models/complete_self_service_browser_profile_management_flow_payload_spec.rb +41 -0
  69. data/spec/models/error_spec.rb +41 -0
  70. data/spec/models/form_field_spec.rb +65 -0
  71. data/spec/models/form_spec.rb +59 -0
  72. data/spec/models/generic_error_payload_spec.rb +77 -0
  73. data/spec/models/generic_error_spec.rb +59 -0
  74. data/spec/models/health_not_ready_status_spec.rb +41 -0
  75. data/spec/models/health_status_spec.rb +41 -0
  76. data/spec/models/identity_spec.rb +53 -0
  77. data/spec/models/login_request_method_config_spec.rb +35 -0
  78. data/spec/models/login_request_method_spec.rb +47 -0
  79. data/spec/models/login_request_spec.rb +71 -0
  80. data/spec/models/oidc_strategy_credentials_config_spec.rb +47 -0
  81. data/spec/models/oidc_strategy_request_method_spec.rb +65 -0
  82. data/spec/models/profile_management_request_spec.rb +77 -0
  83. data/spec/models/registration_request_method_config_spec.rb +35 -0
  84. data/spec/models/registration_request_method_spec.rb +47 -0
  85. data/spec/models/registration_request_spec.rb +71 -0
  86. data/spec/models/session_spec.rb +65 -0
  87. data/spec/models/version_spec.rb +41 -0
  88. data/spec/spec_helper.rb +111 -0
  89. metadata +219 -0
@@ -0,0 +1,152 @@
1
+ # OryHydraClient::CommonApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_self_service_browser_login_request**](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
8
+ [**get_self_service_browser_profile_management_request**](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
9
+ [**get_self_service_browser_registration_request**](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
10
+
11
+
12
+
13
+ ## get_self_service_browser_login_request
14
+
15
+ > LoginRequest get_self_service_browser_login_request(request)
16
+
17
+ Get the request context of browser-based login user flows
18
+
19
+ 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).
20
+
21
+ ### Example
22
+
23
+ ```ruby
24
+ # load the gem
25
+ require 'ory-kratos-client'
26
+
27
+ api_instance = OryHydraClient::CommonApi.new
28
+ 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`).
29
+
30
+ begin
31
+ #Get the request context of browser-based login user flows
32
+ result = api_instance.get_self_service_browser_login_request(request)
33
+ p result
34
+ rescue OryHydraClient::ApiError => e
35
+ puts "Exception when calling CommonApi->get_self_service_browser_login_request: #{e}"
36
+ end
37
+ ```
38
+
39
+ ### Parameters
40
+
41
+
42
+ Name | Type | Description | Notes
43
+ ------------- | ------------- | ------------- | -------------
44
+ **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`). |
45
+
46
+ ### Return type
47
+
48
+ [**LoginRequest**](LoginRequest.md)
49
+
50
+ ### Authorization
51
+
52
+ No authorization required
53
+
54
+ ### HTTP request headers
55
+
56
+ - **Content-Type**: Not defined
57
+ - **Accept**: application/json
58
+
59
+
60
+ ## get_self_service_browser_profile_management_request
61
+
62
+ > ProfileManagementRequest get_self_service_browser_profile_management_request(request)
63
+
64
+ Get the request context of browser-based profile management flows
65
+
66
+ 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).
67
+
68
+ ### Example
69
+
70
+ ```ruby
71
+ # load the gem
72
+ require 'ory-kratos-client'
73
+
74
+ api_instance = OryHydraClient::CommonApi.new
75
+ 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`).
76
+
77
+ begin
78
+ #Get the request context of browser-based profile management flows
79
+ result = api_instance.get_self_service_browser_profile_management_request(request)
80
+ p result
81
+ rescue OryHydraClient::ApiError => e
82
+ puts "Exception when calling CommonApi->get_self_service_browser_profile_management_request: #{e}"
83
+ end
84
+ ```
85
+
86
+ ### Parameters
87
+
88
+
89
+ Name | Type | Description | Notes
90
+ ------------- | ------------- | ------------- | -------------
91
+ **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`). |
92
+
93
+ ### Return type
94
+
95
+ [**ProfileManagementRequest**](ProfileManagementRequest.md)
96
+
97
+ ### Authorization
98
+
99
+ No authorization required
100
+
101
+ ### HTTP request headers
102
+
103
+ - **Content-Type**: Not defined
104
+ - **Accept**: application/json
105
+
106
+
107
+ ## get_self_service_browser_registration_request
108
+
109
+ > RegistrationRequest get_self_service_browser_registration_request(request)
110
+
111
+ Get the request context of browser-based registration user flows
112
+
113
+ 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).
114
+
115
+ ### Example
116
+
117
+ ```ruby
118
+ # load the gem
119
+ require 'ory-kratos-client'
120
+
121
+ api_instance = OryHydraClient::CommonApi.new
122
+ 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`).
123
+
124
+ begin
125
+ #Get the request context of browser-based registration user flows
126
+ result = api_instance.get_self_service_browser_registration_request(request)
127
+ p result
128
+ rescue OryHydraClient::ApiError => e
129
+ puts "Exception when calling CommonApi->get_self_service_browser_registration_request: #{e}"
130
+ end
131
+ ```
132
+
133
+ ### Parameters
134
+
135
+
136
+ Name | Type | Description | Notes
137
+ ------------- | ------------- | ------------- | -------------
138
+ **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`). |
139
+
140
+ ### Return type
141
+
142
+ [**RegistrationRequest**](RegistrationRequest.md)
143
+
144
+ ### Authorization
145
+
146
+ No authorization required
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: Not defined
151
+ - **Accept**: application/json
152
+
@@ -0,0 +1,17 @@
1
+ # OryHydraClient::CompleteSelfServiceBrowserProfileManagementFlowPayload
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **traits** | [**Object**](.md) | Traits contains all of the identity's traits. type: string format: binary |
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OryHydraClient'
13
+
14
+ instance = OryHydraClient::CompleteSelfServiceBrowserProfileManagementFlowPayload.new(traits: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,17 @@
1
+ # OryHydraClient::Error
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **message** | **String** | Code FormErrorCode `json:\"id,omitempty\"` | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OryHydraClient'
13
+
14
+ instance = OryHydraClient::Error.new(message: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,23 @@
1
+ # OryHydraClient::Form
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** | [**Array<FormField>**](FormField.md) | Fields contains multiple fields | [optional]
10
+ **method** | **String** | Method is the form method (e.g. POST) | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'OryHydraClient'
16
+
17
+ instance = OryHydraClient::Form.new(action: null,
18
+ errors: null,
19
+ fields: null,
20
+ method: null)
21
+ ```
22
+
23
+
@@ -0,0 +1,25 @@
1
+ # OryHydraClient::FormField
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **errors** | [**Array<Error>**](Error.md) | Errors contains all validation errors this particular field has caused. | [optional]
8
+ **name** | **String** | Name is the equivalent of <input name=\"{{.Name}}\"> | [optional]
9
+ **required** | **Boolean** | Required is the equivalent of <input required=\"{{.Required}}\"> | [optional]
10
+ **type** | **String** | Type is the equivalent of <input type=\"{{.Type}}\"> | [optional]
11
+ **value** | [**Object**](.md) | Value is the equivalent of <input value=\"{{.Value}}\"> | [optional]
12
+
13
+ ## Code Sample
14
+
15
+ ```ruby
16
+ require 'OryHydraClient'
17
+
18
+ instance = OryHydraClient::FormField.new(errors: null,
19
+ name: null,
20
+ required: null,
21
+ type: null,
22
+ value: null)
23
+ ```
24
+
25
+
@@ -0,0 +1,17 @@
1
+ # OryHydraClient::GenericError
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **error** | [**GenericErrorPayload**](GenericErrorPayload.md) | | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OryHydraClient'
13
+
14
+ instance = OryHydraClient::GenericError.new(error: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,29 @@
1
+ # OryHydraClient::GenericErrorPayload
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **code** | **Integer** | Code represents the error status code (404, 403, 401, ...). | [optional]
8
+ **debug** | **String** | Debug contains debug information. This is usually not available and has to be enabled. | [optional]
9
+ **details** | **Array<Hash<String, Object>>** | | [optional]
10
+ **message** | **String** | | [optional]
11
+ **reason** | **String** | | [optional]
12
+ **request** | **String** | | [optional]
13
+ **status** | **String** | | [optional]
14
+
15
+ ## Code Sample
16
+
17
+ ```ruby
18
+ require 'OryHydraClient'
19
+
20
+ instance = OryHydraClient::GenericErrorPayload.new(code: 404,
21
+ debug: The database adapter was unable to find the element,
22
+ details: null,
23
+ message: null,
24
+ reason: null,
25
+ request: null,
26
+ status: null)
27
+ ```
28
+
29
+
@@ -0,0 +1,96 @@
1
+ # OryHydraClient::HealthApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**is_instance_alive**](HealthApi.md#is_instance_alive) | **GET** /health/alive | Check alive status
8
+ [**is_instance_ready**](HealthApi.md#is_instance_ready) | **GET** /health/ready | Check readiness status
9
+
10
+
11
+
12
+ ## is_instance_alive
13
+
14
+ > HealthStatus is_instance_alive
15
+
16
+ Check alive status
17
+
18
+ This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
19
+
20
+ ### Example
21
+
22
+ ```ruby
23
+ # load the gem
24
+ require 'ory-kratos-client'
25
+
26
+ api_instance = OryHydraClient::HealthApi.new
27
+
28
+ begin
29
+ #Check alive status
30
+ result = api_instance.is_instance_alive
31
+ p result
32
+ rescue OryHydraClient::ApiError => e
33
+ puts "Exception when calling HealthApi->is_instance_alive: #{e}"
34
+ end
35
+ ```
36
+
37
+ ### Parameters
38
+
39
+ This endpoint does not need any parameter.
40
+
41
+ ### Return type
42
+
43
+ [**HealthStatus**](HealthStatus.md)
44
+
45
+ ### Authorization
46
+
47
+ No authorization required
48
+
49
+ ### HTTP request headers
50
+
51
+ - **Content-Type**: Not defined
52
+ - **Accept**: application/json
53
+
54
+
55
+ ## is_instance_ready
56
+
57
+ > HealthStatus is_instance_ready
58
+
59
+ Check readiness status
60
+
61
+ This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. 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.
62
+
63
+ ### Example
64
+
65
+ ```ruby
66
+ # load the gem
67
+ require 'ory-kratos-client'
68
+
69
+ api_instance = OryHydraClient::HealthApi.new
70
+
71
+ begin
72
+ #Check readiness status
73
+ result = api_instance.is_instance_ready
74
+ p result
75
+ rescue OryHydraClient::ApiError => e
76
+ puts "Exception when calling HealthApi->is_instance_ready: #{e}"
77
+ end
78
+ ```
79
+
80
+ ### Parameters
81
+
82
+ This endpoint does not need any parameter.
83
+
84
+ ### Return type
85
+
86
+ [**HealthStatus**](HealthStatus.md)
87
+
88
+ ### Authorization
89
+
90
+ No authorization required
91
+
92
+ ### HTTP request headers
93
+
94
+ - **Content-Type**: Not defined
95
+ - **Accept**: application/json
96
+
@@ -0,0 +1,17 @@
1
+ # OryHydraClient::HealthNotReadyStatus
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **errors** | **Hash<String, String>** | Errors contains a list of errors that caused the not ready status. | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OryHydraClient'
13
+
14
+ instance = OryHydraClient::HealthNotReadyStatus.new(errors: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,17 @@
1
+ # OryHydraClient::HealthStatus
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **status** | **String** | Status always contains \"ok\". | [optional]
8
+
9
+ ## Code Sample
10
+
11
+ ```ruby
12
+ require 'OryHydraClient'
13
+
14
+ instance = OryHydraClient::HealthStatus.new(status: null)
15
+ ```
16
+
17
+
@@ -0,0 +1,23 @@
1
+ # OryHydraClient::Identity
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **id** | **String** | |
8
+ **traits** | [**Object**](.md) | |
9
+ **traits_schema_id** | **String** | TraitsSchemaID is the ID of the JSON Schema to be used for validating the identity's traits. | [optional]
10
+ **traits_schema_url** | **String** | TraitsSchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url | [optional]
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'OryHydraClient'
16
+
17
+ instance = OryHydraClient::Identity.new(id: null,
18
+ traits: null,
19
+ traits_schema_id: null,
20
+ traits_schema_url: null)
21
+ ```
22
+
23
+