module Milkbottle::Authentication

Public Instance Methods

anonymous_authenticated?() click to toggle source
# File lib/milkbottle/authentication.rb, line 7
def anonymous_authenticated?
  !!@anonymous_token
end
app_authenticated?() click to toggle source
# File lib/milkbottle/authentication.rb, line 15
def app_authenticated?
  !!@api_key
end
authenticated?() click to toggle source
# File lib/milkbottle/authentication.rb, line 3
def authenticated?
  token_authenticated? || app_authenticated?
end
ensure_external_auth!() click to toggle source
# File lib/milkbottle/authentication.rb, line 23
def ensure_external_auth!
  throw "Please set external_auth_key and/or external_auth_issuer" unless external_authentication_available?
end
external_authentication_available?() click to toggle source
# File lib/milkbottle/authentication.rb, line 19
def external_authentication_available?
  !!@external_auth_issuer && !!@external_auth_key
end
token_authenticated?() click to toggle source
# File lib/milkbottle/authentication.rb, line 11
def token_authenticated?
  !!@jwt_token
end