oauthgoogle

package
v0.0.0-...-9e48597 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL