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,211 @@
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 CommonApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get the request context of browser-based login user flows
23
+ # 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).
24
+ # @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`).
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [LoginRequest]
27
+ def get_self_service_browser_login_request(request, opts = {})
28
+ data, _status_code, _headers = get_self_service_browser_login_request_with_http_info(request, opts)
29
+ data
30
+ end
31
+
32
+ # Get the request context of browser-based login user flows
33
+ # 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).
34
+ # @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`).
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers
37
+ def get_self_service_browser_login_request_with_http_info(request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CommonApi.get_self_service_browser_login_request ...'
40
+ end
41
+ # verify the required parameter 'request' is set
42
+ if @api_client.config.client_side_validation && request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'request' when calling CommonApi.get_self_service_browser_login_request"
44
+ end
45
+ # resource path
46
+ local_var_path = '/self-service/browser/flows/requests/login'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+ query_params[:'request'] = request
51
+
52
+ # header parameters
53
+ header_params = opts[:header_params] || {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+
57
+ # form parameters
58
+ form_params = opts[:form_params] || {}
59
+
60
+ # http body (model)
61
+ post_body = opts[:body]
62
+
63
+ # return_type
64
+ return_type = opts[:return_type] || 'LoginRequest'
65
+
66
+ # auth_names
67
+ auth_names = opts[:auth_names] || []
68
+
69
+ new_options = opts.merge(
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: CommonApi#get_self_service_browser_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Get the request context of browser-based profile management flows
86
+ # 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).
87
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
88
+ # @param [Hash] opts the optional parameters
89
+ # @return [ProfileManagementRequest]
90
+ def get_self_service_browser_profile_management_request(request, opts = {})
91
+ data, _status_code, _headers = get_self_service_browser_profile_management_request_with_http_info(request, opts)
92
+ data
93
+ end
94
+
95
+ # Get the request context of browser-based profile management flows
96
+ # When accessing this endpoint through ORY Kratos&#39; 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).
97
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
98
+ # @param [Hash] opts the optional parameters
99
+ # @return [Array<(ProfileManagementRequest, Integer, Hash)>] ProfileManagementRequest data, response status code and response headers
100
+ def get_self_service_browser_profile_management_request_with_http_info(request, opts = {})
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug 'Calling API: CommonApi.get_self_service_browser_profile_management_request ...'
103
+ end
104
+ # verify the required parameter 'request' is set
105
+ if @api_client.config.client_side_validation && request.nil?
106
+ fail ArgumentError, "Missing the required parameter 'request' when calling CommonApi.get_self_service_browser_profile_management_request"
107
+ end
108
+ # resource path
109
+ local_var_path = '/self-service/browser/flows/requests/profile'
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+ query_params[:'request'] = request
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] || 'ProfileManagementRequest'
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(:GET, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: CommonApi#get_self_service_browser_profile_management_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Get the request context of browser-based registration user flows
149
+ # 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).
150
+ # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [RegistrationRequest]
153
+ def get_self_service_browser_registration_request(request, opts = {})
154
+ data, _status_code, _headers = get_self_service_browser_registration_request_with_http_info(request, opts)
155
+ data
156
+ end
157
+
158
+ # Get the request context of browser-based registration user flows
159
+ # This endpoint returns a registration request&#39;s context with, for example, error details and other information. When accessing this endpoint through ORY Kratos&#39; 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).
160
+ # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(RegistrationRequest, Integer, Hash)>] RegistrationRequest data, response status code and response headers
163
+ def get_self_service_browser_registration_request_with_http_info(request, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: CommonApi.get_self_service_browser_registration_request ...'
166
+ end
167
+ # verify the required parameter 'request' is set
168
+ if @api_client.config.client_side_validation && request.nil?
169
+ fail ArgumentError, "Missing the required parameter 'request' when calling CommonApi.get_self_service_browser_registration_request"
170
+ end
171
+ # resource path
172
+ local_var_path = '/self-service/browser/flows/requests/registration'
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+ query_params[:'request'] = request
177
+
178
+ # header parameters
179
+ header_params = opts[:header_params] || {}
180
+ # HTTP header 'Accept' (if needed)
181
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
182
+
183
+ # form parameters
184
+ form_params = opts[:form_params] || {}
185
+
186
+ # http body (model)
187
+ post_body = opts[:body]
188
+
189
+ # return_type
190
+ return_type = opts[:return_type] || 'RegistrationRequest'
191
+
192
+ # auth_names
193
+ auth_names = opts[:auth_names] || []
194
+
195
+ new_options = opts.merge(
196
+ :header_params => header_params,
197
+ :query_params => query_params,
198
+ :form_params => form_params,
199
+ :body => post_body,
200
+ :auth_names => auth_names,
201
+ :return_type => return_type
202
+ )
203
+
204
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: CommonApi#get_self_service_browser_registration_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
+ end
208
+ return data, status_code, headers
209
+ end
210
+ end
211
+ end
@@ -0,0 +1,134 @@
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 HealthApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Check alive status
23
+ # 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.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [HealthStatus]
26
+ def is_instance_alive(opts = {})
27
+ data, _status_code, _headers = is_instance_alive_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Check alive status
32
+ # 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 &#x60;X-Forwarded-Proto&#x60; 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.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers
35
+ def is_instance_alive_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: HealthApi.is_instance_alive ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/health/alive'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:body]
55
+
56
+ # return_type
57
+ return_type = opts[:return_type] || 'HealthStatus'
58
+
59
+ # auth_names
60
+ auth_names = opts[:auth_names] || []
61
+
62
+ new_options = opts.merge(
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names,
68
+ :return_type => return_type
69
+ )
70
+
71
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: HealthApi#is_instance_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Check readiness status
79
+ # 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.
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [HealthStatus]
82
+ def is_instance_ready(opts = {})
83
+ data, _status_code, _headers = is_instance_ready_with_http_info(opts)
84
+ data
85
+ end
86
+
87
+ # Check readiness status
88
+ # 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 &#x60;X-Forwarded-Proto&#x60; 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.
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers
91
+ def is_instance_ready_with_http_info(opts = {})
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug 'Calling API: HealthApi.is_instance_ready ...'
94
+ end
95
+ # resource path
96
+ local_var_path = '/health/ready'
97
+
98
+ # query parameters
99
+ query_params = opts[:query_params] || {}
100
+
101
+ # header parameters
102
+ header_params = opts[:header_params] || {}
103
+ # HTTP header 'Accept' (if needed)
104
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
105
+
106
+ # form parameters
107
+ form_params = opts[:form_params] || {}
108
+
109
+ # http body (model)
110
+ post_body = opts[:body]
111
+
112
+ # return_type
113
+ return_type = opts[:return_type] || 'HealthStatus'
114
+
115
+ # auth_names
116
+ auth_names = opts[:auth_names] || []
117
+
118
+ new_options = opts.merge(
119
+ :header_params => header_params,
120
+ :query_params => query_params,
121
+ :form_params => form_params,
122
+ :body => post_body,
123
+ :auth_names => auth_names,
124
+ :return_type => return_type
125
+ )
126
+
127
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug "API called: HealthApi#is_instance_ready\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
+ end
131
+ return data, status_code, headers
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,558 @@
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 PublicApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Complete the browser-based profile management flows
23
+ # 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).
24
+ # @param body [CompleteSelfServiceBrowserProfileManagementFlowPayload]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :request Request is the request ID. type: string
27
+ # @return [nil]
28
+ def complete_self_service_browser_profile_management_flow(body, opts = {})
29
+ complete_self_service_browser_profile_management_flow_with_http_info(body, opts)
30
+ nil
31
+ end
32
+
33
+ # Complete the browser-based profile management flows
34
+ # 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&#39;s Traits JSON Schema, the data will be updated and the browser redirected to &#x60;url.profile_ui&#x60; for further steps. &gt; 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).
35
+ # @param body [CompleteSelfServiceBrowserProfileManagementFlowPayload]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :request Request is the request ID. type: string
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def complete_self_service_browser_profile_management_flow_with_http_info(body, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PublicApi.complete_self_service_browser_profile_management_flow ...'
42
+ end
43
+ # verify the required parameter 'body' is set
44
+ if @api_client.config.client_side_validation && body.nil?
45
+ fail ArgumentError, "Missing the required parameter 'body' when calling PublicApi.complete_self_service_browser_profile_management_flow"
46
+ end
47
+ # resource path
48
+ local_var_path = '/self-service/browser/flows/profile/update'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'request'] = opts[:'request'] if !opts[:'request'].nil?
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
66
+
67
+ # return_type
68
+ return_type = opts[:return_type]
69
+
70
+ # auth_names
71
+ auth_names = opts[:auth_names] || []
72
+
73
+ new_options = opts.merge(
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: PublicApi#complete_self_service_browser_profile_management_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Get the request context of browser-based login user flows
90
+ # 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).
91
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [LoginRequest]
94
+ def get_self_service_browser_login_request(request, opts = {})
95
+ data, _status_code, _headers = get_self_service_browser_login_request_with_http_info(request, opts)
96
+ data
97
+ end
98
+
99
+ # Get the request context of browser-based login user flows
100
+ # This endpoint returns a login request&#39;s context with, for example, error details and other information. When accessing this endpoint through ORY Kratos&#39; 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).
101
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers
104
+ def get_self_service_browser_login_request_with_http_info(request, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_browser_login_request ...'
107
+ end
108
+ # verify the required parameter 'request' is set
109
+ if @api_client.config.client_side_validation && request.nil?
110
+ fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.get_self_service_browser_login_request"
111
+ end
112
+ # resource path
113
+ local_var_path = '/self-service/browser/flows/requests/login'
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+ query_params[:'request'] = request
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:body]
129
+
130
+ # return_type
131
+ return_type = opts[:return_type] || 'LoginRequest'
132
+
133
+ # auth_names
134
+ auth_names = opts[:auth_names] || []
135
+
136
+ new_options = opts.merge(
137
+ :header_params => header_params,
138
+ :query_params => query_params,
139
+ :form_params => form_params,
140
+ :body => post_body,
141
+ :auth_names => auth_names,
142
+ :return_type => return_type
143
+ )
144
+
145
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_browser_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ end
149
+ return data, status_code, headers
150
+ end
151
+
152
+ # Get the request context of browser-based profile management flows
153
+ # 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).
154
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [ProfileManagementRequest]
157
+ def get_self_service_browser_profile_management_request(request, opts = {})
158
+ data, _status_code, _headers = get_self_service_browser_profile_management_request_with_http_info(request, opts)
159
+ data
160
+ end
161
+
162
+ # Get the request context of browser-based profile management flows
163
+ # When accessing this endpoint through ORY Kratos&#39; 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).
164
+ # @param request [String] Request is the Login Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/login?request&#x3D;abcde&#x60;).
165
+ # @param [Hash] opts the optional parameters
166
+ # @return [Array<(ProfileManagementRequest, Integer, Hash)>] ProfileManagementRequest data, response status code and response headers
167
+ def get_self_service_browser_profile_management_request_with_http_info(request, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_browser_profile_management_request ...'
170
+ end
171
+ # verify the required parameter 'request' is set
172
+ if @api_client.config.client_side_validation && request.nil?
173
+ fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.get_self_service_browser_profile_management_request"
174
+ end
175
+ # resource path
176
+ local_var_path = '/self-service/browser/flows/requests/profile'
177
+
178
+ # query parameters
179
+ query_params = opts[:query_params] || {}
180
+ query_params[:'request'] = request
181
+
182
+ # header parameters
183
+ header_params = opts[:header_params] || {}
184
+ # HTTP header 'Accept' (if needed)
185
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
186
+
187
+ # form parameters
188
+ form_params = opts[:form_params] || {}
189
+
190
+ # http body (model)
191
+ post_body = opts[:body]
192
+
193
+ # return_type
194
+ return_type = opts[:return_type] || 'ProfileManagementRequest'
195
+
196
+ # auth_names
197
+ auth_names = opts[:auth_names] || []
198
+
199
+ new_options = opts.merge(
200
+ :header_params => header_params,
201
+ :query_params => query_params,
202
+ :form_params => form_params,
203
+ :body => post_body,
204
+ :auth_names => auth_names,
205
+ :return_type => return_type
206
+ )
207
+
208
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
209
+ if @api_client.config.debugging
210
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_browser_profile_management_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
211
+ end
212
+ return data, status_code, headers
213
+ end
214
+
215
+ # Get the request context of browser-based registration user flows
216
+ # 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).
217
+ # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [RegistrationRequest]
220
+ def get_self_service_browser_registration_request(request, opts = {})
221
+ data, _status_code, _headers = get_self_service_browser_registration_request_with_http_info(request, opts)
222
+ data
223
+ end
224
+
225
+ # Get the request context of browser-based registration user flows
226
+ # This endpoint returns a registration request&#39;s context with, for example, error details and other information. When accessing this endpoint through ORY Kratos&#39; 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).
227
+ # @param request [String] Request is the Registration Request ID The value for this parameter comes from &#x60;request&#x60; URL Query parameter sent to your application (e.g. &#x60;/registration?request&#x3D;abcde&#x60;).
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [Array<(RegistrationRequest, Integer, Hash)>] RegistrationRequest data, response status code and response headers
230
+ def get_self_service_browser_registration_request_with_http_info(request, opts = {})
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug 'Calling API: PublicApi.get_self_service_browser_registration_request ...'
233
+ end
234
+ # verify the required parameter 'request' is set
235
+ if @api_client.config.client_side_validation && request.nil?
236
+ fail ArgumentError, "Missing the required parameter 'request' when calling PublicApi.get_self_service_browser_registration_request"
237
+ end
238
+ # resource path
239
+ local_var_path = '/self-service/browser/flows/requests/registration'
240
+
241
+ # query parameters
242
+ query_params = opts[:query_params] || {}
243
+ query_params[:'request'] = request
244
+
245
+ # header parameters
246
+ header_params = opts[:header_params] || {}
247
+ # HTTP header 'Accept' (if needed)
248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
249
+
250
+ # form parameters
251
+ form_params = opts[:form_params] || {}
252
+
253
+ # http body (model)
254
+ post_body = opts[:body]
255
+
256
+ # return_type
257
+ return_type = opts[:return_type] || 'RegistrationRequest'
258
+
259
+ # auth_names
260
+ auth_names = opts[:auth_names] || []
261
+
262
+ new_options = opts.merge(
263
+ :header_params => header_params,
264
+ :query_params => query_params,
265
+ :form_params => form_params,
266
+ :body => post_body,
267
+ :auth_names => auth_names,
268
+ :return_type => return_type
269
+ )
270
+
271
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug "API called: PublicApi#get_self_service_browser_registration_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
274
+ end
275
+ return data, status_code, headers
276
+ end
277
+
278
+ # Initialize browser-based login user flow
279
+ # 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).
280
+ # @param [Hash] opts the optional parameters
281
+ # @return [nil]
282
+ def initialize_self_service_browser_login_flow(opts = {})
283
+ initialize_self_service_browser_login_flow_with_http_info(opts)
284
+ nil
285
+ end
286
+
287
+ # Initialize browser-based login user flow
288
+ # This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to &#x60;urls.login_ui&#x60; with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60;. &gt; 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).
289
+ # @param [Hash] opts the optional parameters
290
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
291
+ def initialize_self_service_browser_login_flow_with_http_info(opts = {})
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_login_flow ...'
294
+ end
295
+ # resource path
296
+ local_var_path = '/self-service/browser/flows/login'
297
+
298
+ # query parameters
299
+ query_params = opts[:query_params] || {}
300
+
301
+ # header parameters
302
+ header_params = opts[:header_params] || {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
305
+
306
+ # form parameters
307
+ form_params = opts[:form_params] || {}
308
+
309
+ # http body (model)
310
+ post_body = opts[:body]
311
+
312
+ # return_type
313
+ return_type = opts[:return_type]
314
+
315
+ # auth_names
316
+ auth_names = opts[:auth_names] || []
317
+
318
+ new_options = opts.merge(
319
+ :header_params => header_params,
320
+ :query_params => query_params,
321
+ :form_params => form_params,
322
+ :body => post_body,
323
+ :auth_names => auth_names,
324
+ :return_type => return_type
325
+ )
326
+
327
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
328
+ if @api_client.config.debugging
329
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_login_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ end
331
+ return data, status_code, headers
332
+ end
333
+
334
+ # Initialize Browser-Based Logout User Flow
335
+ # 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).
336
+ # @param [Hash] opts the optional parameters
337
+ # @return [nil]
338
+ def initialize_self_service_browser_logout_flow(opts = {})
339
+ initialize_self_service_browser_logout_flow_with_http_info(opts)
340
+ nil
341
+ end
342
+
343
+ # Initialize Browser-Based Logout User Flow
344
+ # This endpoint initializes a logout flow. &gt; 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 &#x60;urls.default_return_to&#x60;. More information can be found at [ORY Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
345
+ # @param [Hash] opts the optional parameters
346
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
347
+ def initialize_self_service_browser_logout_flow_with_http_info(opts = {})
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_logout_flow ...'
350
+ end
351
+ # resource path
352
+ local_var_path = '/self-service/browser/flows/logout'
353
+
354
+ # query parameters
355
+ query_params = opts[:query_params] || {}
356
+
357
+ # header parameters
358
+ header_params = opts[:header_params] || {}
359
+ # HTTP header 'Accept' (if needed)
360
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
361
+
362
+ # form parameters
363
+ form_params = opts[:form_params] || {}
364
+
365
+ # http body (model)
366
+ post_body = opts[:body]
367
+
368
+ # return_type
369
+ return_type = opts[:return_type]
370
+
371
+ # auth_names
372
+ auth_names = opts[:auth_names] || []
373
+
374
+ new_options = opts.merge(
375
+ :header_params => header_params,
376
+ :query_params => query_params,
377
+ :form_params => form_params,
378
+ :body => post_body,
379
+ :auth_names => auth_names,
380
+ :return_type => return_type
381
+ )
382
+
383
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_logout_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
386
+ end
387
+ return data, status_code, headers
388
+ end
389
+
390
+ # Initialize browser-based registration user flow
391
+ # 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).
392
+ # @param [Hash] opts the optional parameters
393
+ # @return [nil]
394
+ def initialize_self_service_browser_registration_flow(opts = {})
395
+ initialize_self_service_browser_registration_flow_with_http_info(opts)
396
+ nil
397
+ end
398
+
399
+ # Initialize browser-based registration user flow
400
+ # This endpoint initializes a browser-based user registration flow. Once initialized, the browser will be redirected to &#x60;urls.registration_ui&#x60; with the request ID set as a query parameter. If a valid user session exists already, the browser will be redirected to &#x60;urls.default_redirect_url&#x60;. &gt; 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).
401
+ # @param [Hash] opts the optional parameters
402
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
403
+ def initialize_self_service_browser_registration_flow_with_http_info(opts = {})
404
+ if @api_client.config.debugging
405
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_browser_registration_flow ...'
406
+ end
407
+ # resource path
408
+ local_var_path = '/self-service/browser/flows/registration'
409
+
410
+ # query parameters
411
+ query_params = opts[:query_params] || {}
412
+
413
+ # header parameters
414
+ header_params = opts[:header_params] || {}
415
+ # HTTP header 'Accept' (if needed)
416
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
417
+
418
+ # form parameters
419
+ form_params = opts[:form_params] || {}
420
+
421
+ # http body (model)
422
+ post_body = opts[:body]
423
+
424
+ # return_type
425
+ return_type = opts[:return_type]
426
+
427
+ # auth_names
428
+ auth_names = opts[:auth_names] || []
429
+
430
+ new_options = opts.merge(
431
+ :header_params => header_params,
432
+ :query_params => query_params,
433
+ :form_params => form_params,
434
+ :body => post_body,
435
+ :auth_names => auth_names,
436
+ :return_type => return_type
437
+ )
438
+
439
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
440
+ if @api_client.config.debugging
441
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_browser_registration_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
442
+ end
443
+ return data, status_code, headers
444
+ end
445
+
446
+ # Initialize browser-based profile management flow
447
+ # 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).
448
+ # @param [Hash] opts the optional parameters
449
+ # @return [nil]
450
+ def initialize_self_service_profile_management_flow(opts = {})
451
+ initialize_self_service_profile_management_flow_with_http_info(opts)
452
+ nil
453
+ end
454
+
455
+ # Initialize browser-based profile management flow
456
+ # This endpoint initializes a browser-based profile management flow. Once initialized, the browser will be redirected to &#x60;urls.profile_ui&#x60; with the request ID set as a query parameter. If no valid user session exists, a login flow will be initialized. &gt; 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).
457
+ # @param [Hash] opts the optional parameters
458
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
459
+ def initialize_self_service_profile_management_flow_with_http_info(opts = {})
460
+ if @api_client.config.debugging
461
+ @api_client.config.logger.debug 'Calling API: PublicApi.initialize_self_service_profile_management_flow ...'
462
+ end
463
+ # resource path
464
+ local_var_path = '/self-service/browser/flows/profile'
465
+
466
+ # query parameters
467
+ query_params = opts[:query_params] || {}
468
+
469
+ # header parameters
470
+ header_params = opts[:header_params] || {}
471
+ # HTTP header 'Accept' (if needed)
472
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
473
+
474
+ # form parameters
475
+ form_params = opts[:form_params] || {}
476
+
477
+ # http body (model)
478
+ post_body = opts[:body]
479
+
480
+ # return_type
481
+ return_type = opts[:return_type]
482
+
483
+ # auth_names
484
+ auth_names = opts[:auth_names] || []
485
+
486
+ new_options = opts.merge(
487
+ :header_params => header_params,
488
+ :query_params => query_params,
489
+ :form_params => form_params,
490
+ :body => post_body,
491
+ :auth_names => auth_names,
492
+ :return_type => return_type
493
+ )
494
+
495
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
496
+ if @api_client.config.debugging
497
+ @api_client.config.logger.debug "API called: PublicApi#initialize_self_service_profile_management_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
498
+ end
499
+ return data, status_code, headers
500
+ end
501
+
502
+ # Check who the current HTTP session belongs to
503
+ # 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.
504
+ # @param [Hash] opts the optional parameters
505
+ # @return [Session]
506
+ def whoami(opts = {})
507
+ data, _status_code, _headers = whoami_with_http_info(opts)
508
+ data
509
+ end
510
+
511
+ # Check who the current HTTP session belongs to
512
+ # 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.
513
+ # @param [Hash] opts the optional parameters
514
+ # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
515
+ def whoami_with_http_info(opts = {})
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug 'Calling API: PublicApi.whoami ...'
518
+ end
519
+ # resource path
520
+ local_var_path = '/sessions/whoami'
521
+
522
+ # query parameters
523
+ query_params = opts[:query_params] || {}
524
+
525
+ # header parameters
526
+ header_params = opts[:header_params] || {}
527
+ # HTTP header 'Accept' (if needed)
528
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
529
+
530
+ # form parameters
531
+ form_params = opts[:form_params] || {}
532
+
533
+ # http body (model)
534
+ post_body = opts[:body]
535
+
536
+ # return_type
537
+ return_type = opts[:return_type] || 'Session'
538
+
539
+ # auth_names
540
+ auth_names = opts[:auth_names] || []
541
+
542
+ new_options = opts.merge(
543
+ :header_params => header_params,
544
+ :query_params => query_params,
545
+ :form_params => form_params,
546
+ :body => post_body,
547
+ :auth_names => auth_names,
548
+ :return_type => return_type
549
+ )
550
+
551
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
552
+ if @api_client.config.debugging
553
+ @api_client.config.logger.debug "API called: PublicApi#whoami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
554
+ end
555
+ return data, status_code, headers
556
+ end
557
+ end
558
+ end