class

GoogleAuth::Credential

Inherits Reference / Object

Constants

AUDIENCE = "https://oauth2.googleapis.com/token"
DEFAULT_USER_AGENT = "Google on Crystal"
EXPIRY = 60.seconds
GRANT_TYPE = "urn:ietf:params:oauth:grant-type:jwt-bearer"
SIGNING_ALGORITHM = JWT::Algorithm::RS256
SKEW_SECONDS = 3600.seconds
TOKEN_PATH = "https://oauth2.googleapis.com/token"
TOKENS_CACHE = {} of String => Token

Constructors

new(issuer : String, signing_key : String, key_id : String, scopes : String | Array(String), sub : String = "", token_path : String = TOKEN_PATH, audience : String = AUDIENCE, user_agent : String = DEFAULT_USER_AGENT)
Source

Instance methods

audience
Source
audience=(audience : String)
Source
client_email
Source
get_token

https://developers.google.com/identity/protocols/OAuth2ServiceAccount

Source
issuer
Source
issuer=(issuer : String)
Source
key_id
Source
key_id=(key_id : String)
Source
signing_key
Source
signing_key=(signing_key : String)
Source
token_path
Source
token_path=(token_path : String)
Source
user_agent
Source
user_agent=(user_agent : String)
Source