Documentation
¶
Index ¶
- func GetCode(r *http.Request) (code string, err error)
- func LoginURL(endpoint Endpoint, config Config) string
- func LogoutURL(endpoint Endpoint, postLogoutRedirectURI string) string
- func RedeemCode(endpoint Endpoint, config Config) func(code string) (tokens Token, err error)
- type Config
- type Endpoint
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoginURL ¶
LoginURL needs endpoint Endpoint.Authorization, and configs Config.ClientID, Config.Scopes and Config.RedirectURI
Types ¶
type Token ¶
type Token struct { AccessToken string `json:"access_token"` ExpiresAt int64 `json:"expires_at"` RefreshToken string `json:"refresh_token"` }
func Login ¶
func Login(ctx context.Context, endpoint Endpoint, listenAddr string, config Config) (token Token, err error)
Login opens an interactive authorization code flow. Arguments for LoginURL and RedeemCode are needed.
Click to show internal directories.
Click to hide internal directories.