Class: Ruberto::Authenticator
- Inherits:
-
Object
- Object
- Ruberto::Authenticator
- Defined in:
- lib/ruberto/authenticator.rb
Constant Summary collapse
- OAUTH_URL =
"https://auth.uber.com/oauth/v2/token"- GRANT_TYPE =
"client_credentials"- SCOPE =
"eats.deliveries"
Class Method Summary collapse
Class Method Details
.access_token ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/ruberto/authenticator.rb', line 12 def access_token @access_token = cached_token&.fetch(:token) || fetch_new_token @access_token = refresh_access_token if token_expired? @access_token end |