Documentation ¶
Index ¶
Constants ¶
View Source
const (
GOOGLE_OAUTH2_API = "https://oauth2.googleapis.com/token"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExchangeTokenResponse ¶
type ExchangeTokenResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` Expiry int `json:"expires_in"` Scope string `json:"scope"` TokenType string `json:"token_type"` }
func ExchangeOAuthToken ¶
func ExchangeOAuthToken(code string) (*ExchangeTokenResponse, error)
func NewExchangeTokenResponse ¶
func NewExchangeTokenResponse() *ExchangeTokenResponse
func (*ExchangeTokenResponse) ExportAccessToken ¶
func (resp *ExchangeTokenResponse) ExportAccessToken() string
type RefreshTokenResponse ¶
type RefreshTokenResponse struct { AccessToken string `json:"access_token"` Expiry int `json:"expires_in"` Scope string `json:"scope"` TokenType string `json:"token_type"` }
func NewRefreshTokenResponse ¶
func NewRefreshTokenResponse() *RefreshTokenResponse
func RefreshOAuthToken ¶
func RefreshOAuthToken(refreshToken string) (*RefreshTokenResponse, error)
func (*RefreshTokenResponse) ExportAccessToken ¶
func (resp *RefreshTokenResponse) ExportAccessToken() string
Click to show internal directories.
Click to hide internal directories.