Module: GogoKit::Client::OAuth
Overview
OAuth authentication methods for GogoKit::Client
Instance Method Summary collapse
-
#get_access_token(grant_type, options = {}) ⇒ GogoKit::OAuthToken
Get an OAuth access token.
-
#get_client_access_token(options = {}) ⇒ GogoKit::OAuthToken
Get an OAuth access token for an application.
Methods included from Utils
Instance Method Details
#get_access_token(grant_type, options = {}) ⇒ GogoKit::OAuthToken
Get an OAuth access token
17 18 19 20 21 22 23 24 |
# File 'lib/gogokit/client/oauth.rb', line 17 def get_access_token(grant_type, = {}) object_from_response(GogoKit::OAuthToken, GogoKit::OAuthTokenRepresenter, :post, oauth_token_endpoint, body: token_request_body(grant_type, ), headers: token_request_headers) end |
#get_client_access_token(options = {}) ⇒ GogoKit::OAuthToken
Get an OAuth access token for an application.
viagogo.github.io/developer.viagogo.net/#client-credentials-grant
32 33 34 |
# File 'lib/gogokit/client/oauth.rb', line 32 def get_client_access_token( = {}) get_access_token('client_credentials', ) end |