Module: G5AuthenticatableApi::Helpers::Grape
- Defined in:
- lib/g5_authenticatable_api/helpers/grape.rb
Instance Method Summary collapse
- #access_token ⇒ Object
- #authenticate_user! ⇒ Object
- #current_user ⇒ Object
- #token_data ⇒ Object
- #warden ⇒ Object
Instance Method Details
#access_token ⇒ Object
19 20 21 |
# File 'lib/g5_authenticatable_api/helpers/grape.rb', line 19 def access_token @access_token ||= token_info.access_token end |
#authenticate_user! ⇒ Object
7 8 9 |
# File 'lib/g5_authenticatable_api/helpers/grape.rb', line 7 def authenticate_user! raise_auth_error if !token_validator.valid? end |
#current_user ⇒ Object
15 16 17 |
# File 'lib/g5_authenticatable_api/helpers/grape.rb', line 15 def current_user @current_user ||= user_fetcher.current_user end |
#token_data ⇒ Object
11 12 13 |
# File 'lib/g5_authenticatable_api/helpers/grape.rb', line 11 def token_data @token_data ||= token_info.token_data end |
#warden ⇒ Object
23 24 25 |
# File 'lib/g5_authenticatable_api/helpers/grape.rb', line 23 def warden env['warden'] end |