Class: TokenAuthenticateMe::HeaderAuthentication
- Inherits:
-
Object
- Object
- TokenAuthenticateMe::HeaderAuthentication
- Defined in:
- lib/token_authenticate_me/header_authentication.rb
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
Instance Method Summary collapse
- #authenticate(options = {}) ⇒ Object
-
#initialize(controller:) ⇒ HeaderAuthentication
constructor
A new instance of HeaderAuthentication.
Constructor Details
#initialize(controller:) ⇒ HeaderAuthentication
Returns a new instance of HeaderAuthentication.
5 6 7 |
# File 'lib/token_authenticate_me/header_authentication.rb', line 5 def initialize(controller:) @controller = controller end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
3 4 5 |
# File 'lib/token_authenticate_me/header_authentication.rb', line 3 def controller @controller end |
Instance Method Details
#authenticate(options = {}) ⇒ Object
9 10 11 |
# File 'lib/token_authenticate_me/header_authentication.rb', line 9 def authenticate( = {}) controller.authenticate_with_http_token(&method(:token_handler)) end |