Class: Ixtlan::Guard::AbstractSession
- Inherits:
-
Object
- Object
- Ixtlan::Guard::AbstractSession
- Defined in:
- lib/ixtlan/guard/abstract_session.rb
Instance Attribute Summary collapse
-
#idle_session_timeout ⇒ Object
Returns the value of attribute idle_session_timeout.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#idle_session_timeout ⇒ Object
Returns the value of attribute idle_session_timeout.
5 6 7 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 5 def idle_session_timeout @idle_session_timeout end |
#permissions ⇒ Object
Returns the value of attribute permissions.
5 6 7 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 5 def @permissions end |
#user ⇒ Object
Returns the value of attribute user.
5 6 7 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 5 def user @user end |
Class Method Details
.create(login, password) ⇒ Object
7 8 9 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 7 def self.create(login, password) self.do_create(authenticate(login, password)) end |
.create_remote(login, password) ⇒ Object
11 12 13 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 11 def self.create_remote(login, password) self.do_create(authenticate_remote(login, password)) end |
Instance Method Details
#attributes ⇒ Object
46 47 48 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 46 def attributes {'idle_session_timeout' => idle_session_timeout, 'permissions' => , 'user' => user} end |
#log=(msg) ⇒ Object
30 31 32 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 30 def log=(msg) @log = msg end |
#to_log ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 34 def to_log if @log @log else "Session(user-id: #{user.id}, idle-session-timeout: #{idle_session_timeout})" end end |
#valid? ⇒ Boolean
42 43 44 |
# File 'lib/ixtlan/guard/abstract_session.rb', line 42 def valid? @log.nil? end |