Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("auth token not found")
)
Functions ¶
func WithKeyring ¶
WithKeyring specifies a custom keyring to use.
Types ¶
type InMemoryTokenStore ¶
type InMemoryTokenStore struct {
// contains filtered or unexported fields
}
func NewInMemoryTokenStore ¶
func NewInMemoryTokenStore() *InMemoryTokenStore
func (*InMemoryTokenStore) Clear ¶
func (ts *InMemoryTokenStore) Clear() error
type NotifyRefreshTokenSource ¶
type NotifyRefreshTokenSource struct { New oauth2.TokenSource T *oauth2.Token SaveToken TokenNotifyFunc // called when token refreshed so new refresh token can be persisted // contains filtered or unexported fields }
NotifyRefreshTokenSource is essentially `oauth2.ResuseTokenSource` with `TokenNotifyFunc` added.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
type TokenNotifyFunc ¶
TokenNotifyFunc is a function that accepts an oauth2 Token upon refresh, and returns an error if it should not be used.
Click to show internal directories.
Click to hide internal directories.