Class: ApiWarden::Authentication::HeaderParams

Inherits:
Params
  • Object
show all
Defined in:
lib/api_warden/authentication/header_params.rb

Instance Attribute Summary

Attributes inherited from Params

#authentication

Instance Method Summary collapse

Methods inherited from Params

#initialize, #request, #scope

Constructor Details

This class inherits a constructor from ApiWarden::Authentication::Params

Instance Method Details

#headersObject



7
8
9
# File 'lib/api_warden/authentication/header_params.rb', line 7

def headers
  request.headers
end

#retrieve_access_tokenObject



15
16
17
# File 'lib/api_warden/authentication/header_params.rb', line 15

def retrieve_access_token
  @access_token ||= headers["X-#{scope.name.camelize}-Access-Token"]
end

#retrieve_idObject



11
12
13
# File 'lib/api_warden/authentication/header_params.rb', line 11

def retrieve_id
  @id ||= headers["X-#{scope.name.camelize}-Id"]
end

#retrieve_refresh_tokenObject



19
20
21
# File 'lib/api_warden/authentication/header_params.rb', line 19

def retrieve_refresh_token
  @refresh_token ||= headers["X-#{scope.name.camelize}-Refresh-Token"]
end