gmail v0.1.15 Gmail.OAuth2

OAuth2 access token handling.

Summary

Functions

access_token_expired?(map)

Specs

access_token_expired?(map) :: boolean

Checks if an access token has expired.

Examples

iex> Gmail.OAuth2.access_token_expired?(%{expires_at: 1})
true

iex> Gmail.OAuth2.access_token_expired?(%{expires_at: (DateTime.to_unix(DateTime.utc_now) + 10)})
false
refresh_access_token(refresh_token)

Specs

refresh_access_token(String.t) :: {String.t, number}