Class: UcbRailsUser::UserSessionManager::Base
- Inherits:
-
Object
- Object
- UcbRailsUser::UserSessionManager::Base
show all
- Defined in:
- app/models/ucb_rails_user/user_session_manager/base.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#uid ⇒ Object
Returns the value of attribute uid.
2
3
4
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 2
def uid
@uid
end
|
Class Method Details
.current_user ⇒ Object
50
51
52
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 50
def current_user
Thread.current[:current_user]
end
|
.current_user=(user) ⇒ Object
46
47
48
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 46
def current_user=(user)
Thread.current[:current_user] = user
end
|
Instance Method Details
#current_user(uid) ⇒ Object
8
9
10
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 8
def current_user(uid)
raise NotImplementedError
end
|
#log_request(user) ⇒ Object
12
13
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 12
def log_request(user)
end
|
#login(uid) ⇒ Object
4
5
6
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 4
def login(uid)
raise NotImplementedError
end
|
#logout(user) ⇒ Object
15
16
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 15
def logout(user)
end
|
#people_ou_entry(uid_in = nil) ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/models/ucb_rails_user/user_session_manager/base.rb', line 18
def people_ou_entry(uid_in=nil)
self.uid = uid_in if uid_in.present?
@people_ou_entry ||= begin
if @people_ou_entry = UcbRailsUser::LdapPerson::Finder.find_by_uid(uid)
@people_ou_entry
else
UcbRailsUser.logger.debug "#{self.class} people_ou_entry not found for uid: #{uid.inspect}"
nil
end
end
end
|