Sha256: 74f0f9eaa8ca2996749bd46e71b9327b6e38913ed6057a69add6632d2066fcbb
Contents?: true
Size: 592 Bytes
Versions: 10
Compression:
Stored size: 592 Bytes
Contents
require 'casino/authenticator' # The static authenticator is just a simple example. # Never ever us this authenticator in a productive environment! class CASino::StaticAuthenticator < CASino::Authenticator # @param [Hash] options def initialize(options) @users = options[:users] || {} end def validate(username, password) username = :"#{username}" if @users.include?(username) && @users[username][:password] == password { username: "#{username}", extra_attributes: @users[username].except(:password) } else false end end end
Version data entries
10 entries across 10 versions & 1 rubygems