Class: Ixtlan::UserManagement::SessionCuba
- Inherits:
-
CubaAPI
- Object
- CubaAPI
- Ixtlan::UserManagement::SessionCuba
- Defined in:
- lib/ixtlan/user_management/session_cuba.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.authenticator ⇒ Object
26 27 28 |
# File 'lib/ixtlan/user_management/session_cuba.rb', line 26 def self.authenticator self[ :authenticator ] ||= Authenticator.new( self[ :rest ] ) end |
Instance Method Details
#log(msg) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/ixtlan/user_management/session_cuba.rb', line 30 def log( msg ) if self.respond_to? :audit audit( msg, { :username => login } ) else warn( "[#{login}] #{msg}" ) end end |
#login ⇒ Object
45 46 47 |
# File 'lib/ixtlan/user_management/session_cuba.rb', line 45 def login login_and_password[ 0 ] end |
#login_and_password ⇒ Object
38 39 40 41 42 43 |
# File 'lib/ixtlan/user_management/session_cuba.rb', line 38 def login_and_password source = parse_request_body rescue nil source = req if source.nil? || source.empty? auth = source[ 'authentication' ] || source [ auth[ 'login' ] || auth[ 'email' ], auth[ 'password' ] ] end |