Module: OpenamAuth::Authenticate
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/openam_auth/authenticate.rb
Instance Attribute Summary collapse
-
#openam_instance ⇒ Object
Returns the value of attribute openam_instance.
Instance Method Summary collapse
Instance Attribute Details
#openam_instance ⇒ Object
Returns the value of attribute openam_instance.
3 4 5 |
# File 'lib/openam_auth/authenticate.rb', line 3 def openam_instance @openam_instance end |
Instance Method Details
#authenticate_user! ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/openam_auth/authenticate.rb', line 6 def authenticate_user! user ||= User.update_openam_user(token, user_hash) if openam.valid_token?(token) session[:user_id] = user.id if user !!session[:user_id] || redirect_to(openam.login_url) end |