module Nokotime::Authentication

Constants

AUTHENTICATION_TYPE

Public Instance Methods

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

Private Instance Methods

auth_type() click to toggle source
# File lib/nokotime/authentication.rb, line 24
def auth_type
  Nokotime.configuration.auth_type
end
token() click to toggle source
# File lib/nokotime/authentication.rb, line 20
def token
  Nokotime.configuration.token
end