Class: G5AuthenticatableApi::Services::UserFetcher
- Defined in:
- lib/g5_authenticatable_api/services/user_fetcher.rb
Overview
Fetch user data from G5 Auth based on access token
Instance Attribute Summary
Attributes inherited from TokenInfo
Instance Method Summary collapse
Methods inherited from TokenInfo
#access_token, #auth_client, #initialize, #token_data
Constructor Details
This class inherits a constructor from G5AuthenticatableApi::Services::TokenInfo
Instance Method Details
#current_user ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/g5_authenticatable_api/services/user_fetcher.rb', line 9 def current_user if access_token == @warden.try(:user).try(:g5_access_token) @warden.user else auth_client.me end end |