Class: RrxApi::Auth::Base
- Inherits:
-
Object
- Object
- RrxApi::Auth::Base
- Defined in:
- lib/rrx_api/auth/base.rb
Overview
Abstract authentication provider base class. Subclass and override #id_from_token (and optionally #user_info) to implement a provider.
Direct Known Subclasses
Instance Method Summary collapse
-
#id_from_token(_token) ⇒ String
Verify a bearer token and return the provider user ID.
-
#user_info(_uid) ⇒ Object?
Fetch user info for a given provider UID (optional).
Instance Method Details
#id_from_token(_token) ⇒ String
Verify a bearer token and return the provider user ID.
17 18 19 |
# File 'lib/rrx_api/auth/base.rb', line 17 def id_from_token(_token) raise NotImplementedError, "#{self.class}#id_from_token is not implemented" end |
#user_info(_uid) ⇒ Object?
Fetch user info for a given provider UID (optional).
24 25 26 |
# File 'lib/rrx_api/auth/base.rb', line 24 def user_info(_uid) nil end |