Documentation ¶
Index ¶
Constants ¶
View Source
const ( ACCESS_TOKEN = iota REFRESH_TOKEN )
View Source
const (
DefaultLength = 32
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallbackPage ¶
type Options ¶
type Options struct { AuthorizationEndpoint string Scopes []string // Extensions to the standard OAuth Parameters for the authorizaion endpoint AuthorizationExtParams map[string]string TokenEndpoint string RevokeEndpoint string ClientId string ClientSecret string RedirectUri *url.URL PortRange PortRange // Command used to open browser for auth // An interrupt signal (SIGINT) is sent to the command when the callback has received a code // // If nil, system default browser will be used OpenBrowser func(url *url.URL) *exec.Cmd }
type TokenResponse ¶
type TokenResponse struct { IdToken string `json:"id_token"` AccessToken string `json:"access_token"` ExpiresIn int64 `json:"expires_in"` RefreshToken string `json:"refresh_token"` RefreshExpiresIn int64 `json:"refresh_expires_in"` }
func AuthorizationCodeFlow ¶
func AuthorizationCodeFlow(opts Options) (tokenResponse *TokenResponse, err error)
Click to show internal directories.
Click to hide internal directories.