clients/kratos/ruby/lib/ory-kratos-client/api/v0alpha1_api.rb
# Complete Settings Flow
# Use this endpoint to complete a settings flow by sending an identity&#39;s updated password. This endpoint behaves differently for API and browser flows.  API-initiated flows expect &#x60;application/json&#x60; to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached. Implies that the user needs to re-authenticate.  Browser flows without HTTP Header &#x60;Accept&#x60; or with &#x60;Accept: text/*&#x60; respond with a HTTP 302 redirect to the post/after settings URL or the &#x60;return_to&#x60; value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when &#x60;selfservice.flows.settings.privileged_session_max_age&#x60; was reached.  Browser flows with HTTP Header &#x60;Accept: application/json&#x60; respond with HTTP 200 and a application/json body with the signed in identity and a &#x60;Set-Cookie&#x60; header on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 403 when the page is accessed without a session cookie. HTTP 400 on form validation errors.  More information can be found at [Ory Kratos User Settings &amp; Profile Management Documentation](../self-service/flows/user-settings).
# @param flow [String] The Settings Flow ID  The value for this parameter comes from &#x60;flow&#x60; URL Query parameter sent to your application (e.g. &#x60;/settings?flow&#x3D;abcde&#x60;).
# @param [Hash] opts the optional parameters
# @option opts [String] :x_session_token The Session Token of the Identity performing the settings flow.
# @option opts [SubmitSelfServiceSettingsFlowBody] :submit_self_service_settings_flow_body 
# @return [Array<(SuccessfulSelfServiceSettingsWithoutBrowser, Integer, Hash)>] SuccessfulSelfServiceSettingsWithoutBrowser data, response status code and response headers
Complete Settings Flow
Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows.  API-initiated flows expect `application/json` to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached. Implies that the user needs to re-authenticate.
Complete Settings Flow Use this endpoint to complete a settings flow by sending an identity ' s updated password . This endpoint behaves differently for API and browser flows . API - initiated flows expect ` application / json ` to be sent in the body and respond with HTTP 200 and an application / json body with the session token on success ; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set ; HTTP 400 on form validation errors . HTTP 401 when the endpoint is called without a valid session token . HTTP 403 when ` selfservice . flows . settings . privileged_session_max_age ` was reached . Implies that the user needs to re - authenticate .
def submit_self_service_settings_flow_with_http_info(flow, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: V0alpha1Api.submit_self_service_settings_flow ...'
      end
      if @api_client.config.client_side_validation && flow.nil?
        fail ArgumentError, "Missing the required parameter 'flow' when calling V0alpha1Api.submit_self_service_settings_flow"
      end
      local_var_path = '/self-service/settings'
      query_params = opts[:query_params] || {}
      query_params[:'flow'] = flow
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
      header_params[:'X-Session-Token'] = opts[:'x_session_token'] if !opts[:'x_session_token'].nil?
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'submit_self_service_settings_flow_body'])
      return_type = opts[:debug_return_type] || 'SuccessfulSelfServiceSettingsWithoutBrowser'
      auth_names = opts[:debug_auth_names] || []
      new_options = opts.merge(
        :operation => :"V0alpha1Api.submit_self_service_settings_flow",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V0alpha1Api#submit_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def submit_self_service_settings_flow_with_http_info ( flow , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: V0alpha1Api.submit_self_service_settings_flow ...' end if @api_client . config . client_side_validation && flow . nil? fail ArgumentError , "Missing the required parameter 'flow' when calling V0alpha1Api.submit_self_service_settings_flow" end local_var_path = '/self-service/settings' query_params = opts [ :query_params ] || { } query_params [ :' flow ' ] = flow header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' , 'application/x-www-form-urlencoded' ] ) header_params [ :' X-Session-Token ' ] = opts [ :' x_session_token ' ] if ! opts [ :' x_session_token ' ] . nil? form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( opts [ :' submit_self_service_settings_flow_body ' ] ) return_type = opts [ :debug_return_type ] || 'SuccessfulSelfServiceSettingsWithoutBrowser' auth_names = opts [ :debug_auth_names ] || [ ] new_options = opts . merge ( :operation => :" V0alpha1Api.submit_self_service_settings_flow " , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: V0alpha1Api#submit_self_service_settings_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Complete Settings Flow
Use this endpoint to complete a settings flow by sending an identity&#39;s updated password.
Complete Settings Flow Use this endpoint to complete a settings flow by sending an identity&#39 ; s updated password .
# verify the required parameter 'flow' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
SuccessfulSelfServiceSettingsWithoutBrowser data, response status code and response headers
SuccessfulSelfServiceSettingsWithoutBrowser data response status code and response headers
Array<(SuccessfulSelfServiceSettingsWithoutBrowser, Integer, Hash)>
flow
The Settings Flow ID The value for this parameter comes from `flow` URL Query parameter sent to your application .
The Settings Flow ID The value for this parameter comes from ` flow ` URL Query parameter sent to your application .
opts
None
<not_specific>
opts the optional parameters
opts the optional parameters