class UltracartClient::SsoApi
Attributes
Public Class Methods
# File lib/ultracart_api/api/sso_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
# File lib/ultracart_api/api/sso_api.rb, line 23 def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false) api_config = Configuration.new api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key api_config.api_version = '2017-03-01' api_config.verify_ssl = verify_ssl api_client = ApiClient.new(api_config) api_client.config.debugging = debugging UltracartClient::SsoApi.new(api_client) end
Public Instance Methods
Get single sign on session user This is the equivalent of logging out of the single sign on session @param [Hash] opts the optional parameters @return [User]
# File lib/ultracart_api/api/sso_api.rb, line 39 def get_sso_session_user(opts = {}) data, _status_code, _headers = get_sso_session_user_with_http_info(opts) data end
Get single sign on session user This is the equivalent of logging out of the single sign on session @param [Hash] opts the optional parameters @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/ultracart_api/api/sso_api.rb, line 48 def get_sso_session_user_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SsoApi.get_sso_session_user ...' end # resource path local_var_path = '/sso/session/user' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SsoApi#get_sso_session_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Revoke single sign on session This is the equivalent of logging out of the single sign on session @param [Hash] opts the optional parameters @return [nil]
# File lib/ultracart_api/api/sso_api.rb, line 143 def sso_session_revoke(opts = {}) sso_session_revoke_with_http_info(opts) nil end
Revoke single sign on session This is the equivalent of logging out of the single sign on session @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/ultracart_api/api/sso_api.rb, line 152 def sso_session_revoke_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SsoApi.sso_session_revoke ...' end # resource path local_var_path = '/sso/session/revoke' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SsoApi#sso_session_revoke\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Exchange a single sign on code for a simple key token Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with @param token_request Token request @param [Hash] opts the optional parameters @return [SingleSignOnTokenResponse]
# File lib/ultracart_api/api/sso_api.rb, line 192 def sso_token(token_request, opts = {}) data, _status_code, _headers = sso_token_with_http_info(token_request, opts) data end
Exchange a single sign on code for a simple key token Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with @param token_request Token request @param [Hash] opts the optional parameters @return [Array<(SingleSignOnTokenResponse
, Fixnum, Hash)>] SingleSignOnTokenResponse
data, response status code and response headers
# File lib/ultracart_api/api/sso_api.rb, line 202 def sso_token_with_http_info(token_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SsoApi.sso_token ...' end # verify the required parameter 'token_request' is set if @api_client.config.client_side_validation && token_request.nil? fail ArgumentError, "Missing the required parameter 'token_request' when calling SsoApi.sso_token" end # resource path local_var_path = '/sso/token' # query parameters query_params = {} # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(token_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SingleSignOnTokenResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SsoApi#sso_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end