Class: Ixtlan::UserManagement::SessionCuba

Inherits:
CubaAPI
  • Object
show all
Defined in:
lib/ixtlan/user_management/session_cuba.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.authenticatorObject



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 =>  } )
  else
    warn( "[#{}] #{msg}" )
  end
end

#loginObject



45
46
47
# File 'lib/ixtlan/user_management/session_cuba.rb', line 45

def 
  [ 0 ]
end

#login_and_passwordObject



38
39
40
41
42
43
# File 'lib/ixtlan/user_management/session_cuba.rb', line 38

def 
  source = parse_request_body rescue nil
  source = req if source.nil? || source.empty?
  auth = source[ 'authentication' ] || source
  [ auth[ 'login' ] || auth[ 'email' ], auth[ 'password' ] ]
end