Class: OpenIdAuthentication::Result
- Inherits:
-
Object
- Object
- OpenIdAuthentication::Result
- Defined in:
- lib/_open_id_authentication.rb
Overview
self.store = nil
Constant Summary collapse
- ERROR_MESSAGES =
{ :missing => "Sorry, the OpenID server couldn't be found", :invalid => "Sorry, but this does not appear to be a valid OpenID", :canceled => "OpenID verification was canceled", :failed => "OpenID verification failed", :setup_needed => "OpenID verification needs setup" }
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code) ⇒ Result
constructor
A new instance of Result.
- #message ⇒ Object
- #status ⇒ Object
- #successful? ⇒ Boolean
- #unsuccessful? ⇒ Boolean
Constructor Details
#initialize(code) ⇒ Result
Returns a new instance of Result.
53 54 55 |
# File 'lib/_open_id_authentication.rb', line 53 def initialize(code) @code = code end |
Class Method Details
.[](code) ⇒ Object
49 50 51 |
# File 'lib/_open_id_authentication.rb', line 49 def self.[](code) new(code) end |
Instance Method Details
#message ⇒ Object
71 72 73 |
# File 'lib/_open_id_authentication.rb', line 71 def ERROR_MESSAGES[@code] end |
#status ⇒ Object
57 58 59 |
# File 'lib/_open_id_authentication.rb', line 57 def status @code end |
#successful? ⇒ Boolean
63 64 65 |
# File 'lib/_open_id_authentication.rb', line 63 def successful? @code == :successful end |
#unsuccessful? ⇒ Boolean
67 68 69 |
# File 'lib/_open_id_authentication.rb', line 67 def unsuccessful? ERROR_MESSAGES.keys.include?(@code) end |