Class: RestApi::Authorization
- Inherits:
-
Object
- Object
- RestApi::Authorization
- Defined in:
- app/models/rest_api.rb
Overview
An Authorization object should expose:
login - method returning an identifier for the user
and one of:
ticket - the unique ticket for the session
password - a user password
Direct Known Subclasses
Console::Auth::Basic::BasicUser, Console::Auth::RemoteUser::RemoteUser
Instance Attribute Summary collapse
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#ticket ⇒ Object
readonly
Returns the value of attribute ticket.
Instance Method Summary collapse
- #cache_key ⇒ Object
-
#initialize(login, ticket = nil, password = nil) ⇒ Authorization
constructor
A new instance of Authorization.
Constructor Details
#initialize(login, ticket = nil, password = nil) ⇒ Authorization
Returns a new instance of Authorization.
14 15 16 17 18 |
# File 'app/models/rest_api.rb', line 14 def initialize(login,ticket=nil,password=nil) @login = login @ticket = ticket @password = password end |
Instance Attribute Details
#login ⇒ Object (readonly)
Returns the value of attribute login.
13 14 15 |
# File 'app/models/rest_api.rb', line 13 def login @login end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
13 14 15 |
# File 'app/models/rest_api.rb', line 13 def password @password end |
#ticket ⇒ Object (readonly)
Returns the value of attribute ticket.
13 14 15 |
# File 'app/models/rest_api.rb', line 13 def ticket @ticket end |
Instance Method Details
#cache_key ⇒ Object
19 20 21 |
# File 'app/models/rest_api.rb', line 19 def cache_key login end |