Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type T ¶
type T struct { TokenType string `yaml:"tokenType"` TokenExpiry time.Time `yaml:"tokenExpiry"` AccessToken string `yaml:"accessToken"` RefreshToken string `yaml:"refreshToken"` }
T is the token.
type TokenExchanger ¶
type TokenExchanger struct {
// contains filtered or unexported fields
}
TokenExchanger exchanges a code for a token.
func NewTokenExchanger ¶
func NewTokenExchanger(c *configs.C) (*TokenExchanger, error)
NewTokenExchanger creates a new token exchanger.
func (*TokenExchanger) LoginURL ¶
func (e *TokenExchanger) LoginURL() (string, error)
LoginURL returns a URL to login.
func (*TokenExchanger) ObtainToken ¶
func (e *TokenExchanger) ObtainToken(ctx context.Context, code string) error
ObtainToken obtains a token from the issuer.
Click to show internal directories.
Click to hide internal directories.