Class: CurrentSession::Auth
- Inherits:
-
Object
- Object
- CurrentSession::Auth
- Defined in:
- lib/current_session/auth.rb
Overview
Base class for providing auth methods
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#user_class ⇒ Object
readonly
Returns the value of attribute user_class.
Instance Method Summary collapse
- #auth ⇒ Object
-
#initialize(request, user_class) ⇒ Auth
constructor
A new instance of Auth.
Constructor Details
#initialize(request, user_class) ⇒ Auth
Returns a new instance of Auth.
8 9 10 11 |
# File 'lib/current_session/auth.rb', line 8 def initialize(request, user_class) @request = request @user_class = user_class end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
12 13 14 |
# File 'lib/current_session/auth.rb', line 12 def request @request end |
#user_class ⇒ Object (readonly)
Returns the value of attribute user_class.
12 13 14 |
# File 'lib/current_session/auth.rb', line 12 def user_class @user_class end |
Instance Method Details
#auth ⇒ Object
14 15 16 |
# File 'lib/current_session/auth.rb', line 14 def auth request.env["omniauth.auth"] end |