class RoadForest::Authorization::AuthenticationChain::Basic
Public Instance Methods
authenticated_entity(credentials, store)
click to toggle source
# File lib/roadforest/authorization/authentication-chain.rb, line 26 def authenticated_entity(credentials, store) username, password = Base64.decode64(credentials).split(':',2) entity = store.by_username(username) entity.authenticate_by_password(password) entity end
challenge(options)
click to toggle source
# File lib/roadforest/authorization/authentication-chain.rb, line 22 def challenge(options) "Basic realm=\"#{options.fetch(:realm, "Roadforest App")}\"" end