Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleAuth ¶
type GoogleAuth struct {
// contains filtered or unexported fields
}
GoogleAuth is the authorization workflow implementation for google oauth api.
func New ¶
func New(cred []byte) (*GoogleAuth, error)
New creates a new instance of google auth struct.
func (*GoogleAuth) Exchange ¶
func (ga *GoogleAuth) Exchange(code string) (*auth.Token, error)
Exchange converts the authorization code to access token.
func (*GoogleAuth) GetURL ¶
func (ga *GoogleAuth) GetURL(redirect, state string) string
GetURL build the authorization workflow url for google oauth api.
func (*GoogleAuth) Refresh ¶
func (ga *GoogleAuth) Refresh(refreshToken string) (*auth.Token, error)
Refresh renews access token using refresh token.
func (*GoogleAuth) Revoke ¶
func (ga *GoogleAuth) Revoke(token string) error
Revoke cancels the access/refresh token and resets the authorization workflow.
Click to show internal directories.
Click to hide internal directories.