Sha256: aa1216c869f11746e286f3b129af25a46aab3af1cf660a1099e199d27cc2a39d
Contents?: true
Size: 631 Bytes
Versions: 2
Compression:
Stored size: 631 Bytes
Contents
module Castronaut class AuthenticationResult attr_reader :username, :identifier, :error_message, :extra_info def initialize(username, error_message=nil, options={}) @username = username identifier = options[:identifier] @identifier = identifier.nil? ? username : identifier @extra_info = options[:extra_info] @error_message = error_message Castronaut.logger.info("#{self.class} - #{@error_message} for #{@username}") if @error_message && @username end def valid? error_message.nil? end def invalid? !valid? end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
3mix-castronaut-0.5.0.2 | lib/castronaut/authentication_result.rb |
masover-castronaut-0.5.0.1 | lib/castronaut/authentication_result.rb |