Google API Authorisation Manager

# GoogleCloud.session — Module.

OAuth 2.0 Google Sessions

source

# GoogleCloud.session.GoogleSession — Type.

GoogleSession(...)

OAuth 2.0 session for Google using provided credentials.

Caches authorisation tokens up to expiry.

sess = GoogleSession(GoogleCredentials(expanduser("~/auth.json")), ["devstorage.full_control"])

source

# GoogleCloud.session.authorize — Method.

authorize(session; cache=true)

Get OAuth 2.0 authorisation token from Google.

If cache set to true, get a new token only if the existing token has expired.

source

# GoogleCloud.session.JWTClaimSet — Type.

JWTClaimSet

JSON Web Token claim-set.

source

# GoogleCloud.session.JWTHeader — Type.

JWTHeader

JSON Web Token header.

source

# GoogleCloud.session.JWS — Function.

JWS(credentials, claimset)

Construct the Base64-encoded JSON Web Signature based on the JWT header, claimset and signed using the private key provided in the Google JSON service-account key.

source

# GoogleCloud.session.SHA256withRSA — Method.

SHA256withRSA(message, key)

Sign message using private key with RSASSA-PKCS1-V1_5-SIGN algorithm.

source

# GoogleCloud.session.unixseconds — Method.

unixseconds(x)

Convert date-time into unix seconds.

source