Class: GlobusClient::Authenticator
- Inherits:
-
Object
- Object
- GlobusClient::Authenticator
- Defined in:
- lib/globus_client/authenticator.rb
Overview
The namespace for the "login" command
Class Method Summary collapse
Instance Method Summary collapse
-
#token ⇒ Object
Request an access_token.
Class Method Details
.token ⇒ Object
6 7 8 |
# File 'lib/globus_client/authenticator.rb', line 6 def self.token new.token end |
Instance Method Details
#token ⇒ Object
Request an access_token
11 12 13 14 15 16 17 |
# File 'lib/globus_client/authenticator.rb', line 11 def token response = connection.post('/v2/oauth2/token', form_data) UnexpectedResponse.call(response) unless response.success? JSON.parse(response.body)['access_token'] end |