Module: Keyper::ApiKeyAuthentication
- Extended by:
- ActiveSupport::Concern
- Included in:
- ApiKeysController
- Defined in:
- app/controllers/concerns/keyper/api_key_authentication.rb
Constant Summary collapse
- API_KEY =
'Api-Key'- API_SECRET =
'Api-Secret'
Instance Method Summary collapse
-
#current_user ⇒ Object
Override the default current_user functionality.
Instance Method Details
#current_user ⇒ Object
Override the default current_user functionality
10 11 12 13 14 15 16 17 |
# File 'app/controllers/concerns/keyper/api_key_authentication.rb', line 10 def current_user return @current_user if defined?(@current_user) @current_user = if passed_api_keys? authenticate_with_api_keys elsif current_user_session && current_user_session.record current_user_session.record end end |