class GoogleAuth::Credential

Defined in:

google-auth/credential.cr

Constant Summary

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

Instance Method Summary

Constructor Detail

def self.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) #

[View source]

Instance Method Detail

def audience : String #

[View source]
def audience=(audience : String) #

[View source]
def client_email : String #

[View source]
def get_token : Token #

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


[View source]
def issuer : String #

[View source]
def issuer=(issuer : String) #

[View source]
def key_id : String #

[View source]
def key_id=(key_id : String) #

[View source]
def signing_key : String #

[View source]
def signing_key=(signing_key : String) #

[View source]
def token_path : String #

[View source]
def token_path=(token_path : String) #

[View source]
def user_agent : String #

[View source]
def user_agent=(user_agent : String) #

[View source]