goth v0.4.0 Goth.Client

Goth.Client is the module through which all interaction with Google’s APIs flows. For the most part, you probably don’t want to use this module directly, but instead use the other modules that cache and wrap the underlying API calls.

Summary

Functions

Note: Most often, you’ll want to use Goth.Token.for_scope/1 instead of this method. As the docs for Goth.Token.for_scope/1 note, it will return a cached token if one already exists, thus saving you the cost of a round-trip to the server to generate a new token

Retrieves the project ID from Google’s metadata service

Functions

check_metadata_scope(url_base, requested)
claims(scope)
claims(scope, iat)
get_access_token(scope)

Note: Most often, you’ll want to use Goth.Token.for_scope/1 instead of this method. As the docs for Goth.Token.for_scope/1 note, it will return a cached token if one already exists, thus saving you the cost of a round-trip to the server to generate a new token.

Goth.Client.get_access_token/1, on the other hand will always hit the server to retrieve a new token.

get_access_token(atom, scope)
json(scope)
json(scope, iat)
jwt(scope)
jwt(scope, iat)
retrieve_metadata_project()

Retrieves the project ID from Google’s metadata service