class SamplifyAPIClient::AuthApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/samplify_api_client/api/auth_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

auth_code(payload, opts = {}) click to toggle source

code auth @param payload @param [Hash] opts the optional parameters @return [TokenMedia]

# File lib/samplify_api_client/api/auth_api.rb, line 26
def auth_code(payload, opts = {})
  data, _status_code, _headers = auth_code_with_http_info(payload, opts)
  data
end
auth_code_with_http_info(payload, opts = {}) click to toggle source

code auth @param payload @param [Hash] opts the optional parameters @return [Array<(TokenMedia, Fixnum, Hash)>] TokenMedia data, response status code and response headers

# File lib/samplify_api_client/api/auth_api.rb, line 35
def auth_code_with_http_info(payload, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_code ...'
  end
  # verify the required parameter 'payload' is set
  if @api_client.config.client_side_validation && payload.nil?
    fail ArgumentError, "Missing the required parameter 'payload' when calling AuthApi.auth_code"
  end
  # resource path
  local_var_path = '/auth/v1/token/code'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.auth.error+json', 'application/vnd.token+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(payload)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TokenMedia')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthApi#auth_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
auth_logout(payload, opts = {}) click to toggle source

logout auth @param payload @param [Hash] opts the optional parameters @return [nil]

# File lib/samplify_api_client/api/auth_api.rb, line 78
def auth_logout(payload, opts = {})
  auth_logout_with_http_info(payload, opts)
  nil
end
auth_logout_with_http_info(payload, opts = {}) click to toggle source

logout auth @param payload @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/samplify_api_client/api/auth_api.rb, line 87
def auth_logout_with_http_info(payload, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_logout ...'
  end
  # verify the required parameter 'payload' is set
  if @api_client.config.client_side_validation && payload.nil?
    fail ArgumentError, "Missing the required parameter 'payload' when calling AuthApi.auth_logout"
  end
  # resource path
  local_var_path = '/auth/v1/logout'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.auth.error+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(payload)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, 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: AuthApi#auth_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
auth_password(payload, opts = {}) click to toggle source

password auth @param payload @param [Hash] opts the optional parameters @return [TokenMedia]

# File lib/samplify_api_client/api/auth_api.rb, line 129
def auth_password(payload, opts = {})
  data, _status_code, _headers = auth_password_with_http_info(payload, opts)
  data
end
auth_password_with_http_info(payload, opts = {}) click to toggle source

password auth @param payload @param [Hash] opts the optional parameters @return [Array<(TokenMedia, Fixnum, Hash)>] TokenMedia data, response status code and response headers

# File lib/samplify_api_client/api/auth_api.rb, line 138
def auth_password_with_http_info(payload, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_password ...'
  end
  # verify the required parameter 'payload' is set
  if @api_client.config.client_side_validation && payload.nil?
    fail ArgumentError, "Missing the required parameter 'payload' when calling AuthApi.auth_password"
  end
  # resource path
  local_var_path = '/auth/v1/token/password'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.auth.error+json', 'application/vnd.token+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(payload)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TokenMedia')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthApi#auth_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
auth_refresh(payload, opts = {}) click to toggle source

refresh auth @param payload @param [Hash] opts the optional parameters @return [TokenMedia]

# File lib/samplify_api_client/api/auth_api.rb, line 181
def auth_refresh(payload, opts = {})
  data, _status_code, _headers = auth_refresh_with_http_info(payload, opts)
  data
end
auth_refresh_with_http_info(payload, opts = {}) click to toggle source

refresh auth @param payload @param [Hash] opts the optional parameters @return [Array<(TokenMedia, Fixnum, Hash)>] TokenMedia data, response status code and response headers

# File lib/samplify_api_client/api/auth_api.rb, line 190
def auth_refresh_with_http_info(payload, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AuthApi.auth_refresh ...'
  end
  # verify the required parameter 'payload' is set
  if @api_client.config.client_side_validation && payload.nil?
    fail ArgumentError, "Missing the required parameter 'payload' when calling AuthApi.auth_refresh"
  end
  # resource path
  local_var_path = '/auth/v1/token/refresh'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.auth.error+json', 'application/vnd.token+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/xml', 'application/gob', 'application/x-gob'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(payload)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TokenMedia')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuthApi#auth_refresh\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end