Documentation ¶
Overview ¶
Package oauthhelper provide an OAuth2 authentication and token management helper
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTokenBase64 ¶ added in v0.2.0
GetTokenBase64 returns the Base64 representation of JSON token
func LoadTokenFromFile ¶
LoadTokenFromFile loads an OAuth2 token from a JSON file
Types ¶
type Auth ¶
type Auth struct { // Token holds the token that should be used for authentication (optional) // if the token is nil the callback func Authenticate will be called and after Authorization this token will be set // Store (and restore prior use) this token to avoid further authorization calls Token *oauth2.Token // ClientID from https://console.developers.google.com/project/<your-project-id>/apiui/credential ClientID string ClientSecret string Authenticate AuthenticateFunc }
Auth defines the authentication parameters
type AuthenticateFunc ¶
AuthenticateFunc defines the signature of the authentication function used
Click to show internal directories.
Click to hide internal directories.