Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientCredentials ¶
type ClientCredentials struct {
ClientID string
ClientSecret string
// contains filtered or unexported fields
}
func (*ClientCredentials) Freshness ¶
func (cc *ClientCredentials) Freshness(token string) (int64, error)
Freshness checks the expiry of a token.
func (*ClientCredentials) Issue ¶
func (cc *ClientCredentials) Issue() (int64, string, error)
Issue and store a new token.
func (*ClientCredentials) Refresh ¶
func (cc *ClientCredentials) Refresh(ctx context.Context)
Refresh the access token in the background, when it's invalid or about to expire.
func (*ClientCredentials) Revoke ¶
func (cc *ClientCredentials) Revoke(token string) error
Revoke invalidates an access token.
func (*ClientCredentials) Token ¶
func (cc *ClientCredentials) Token() string
Source Files
¶
- metrics.go
- oauth.go
Click to show internal directories.
Click to hide internal directories.