Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("auth token not found")
)
Functions ¶
func StoreNewToken ¶
func WithKeyring ¶
WithKeyring specifies a custom keyring to use.
Types ¶
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 { Context string // 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.