module FreckleIO::Authentication

Constants

AUTHENTICATION_TYPE

Public Instance Methods

authorize_request(request) click to toggle source
# File lib/freckle_io/authentication.rb, line 11
def authorize_request(request)
  auth_type = FreckleIO.configuration.auth_type

  case auth_type
  when :freckle_token
    request.headers["X-FreckleToken"] = token
  end
end
valid_auth?(type) click to toggle source
# File lib/freckle_io/authentication.rb, line 7
def valid_auth?(type)
  AUTHENTICATION_TYPE.include? type
end

Private Instance Methods

token() click to toggle source
# File lib/freckle_io/authentication.rb, line 22
def token
  FreckleIO.configuration.token
end