Sha256: 82ba7888fbb1b713f83bbf5bc1a4211a7e6966db4934e7f24b240df5b68ac3b5
Contents?: true
Size: 608 Bytes
Versions: 1
Compression:
Stored size: 608 Bytes
Contents
require 'casino/authenticator' require 'faker' class CASino::TestAuthenticator # @param [Hash] options def initialize(options) @options = options end def validate(username, password) @username = username @password = password if username != password false else generate_user @user end end private def generate_user @user = { username: @username, extra_attributes: extra_attributes } end def extra_attributes attr = {} attr[:mail] = Faker::Internet.email if @options[:mail] attr.length == 0 ? nil : attr end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
casino-test_authenticator-1.2.0 | lib/casino/test_authenticator.rb |