Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAuthenticationData = errors.New("authentication data is not available")
ErrNoAuthenticationData indicates that stored authentication data is not available
View Source
var ErrUnsupportedAuthData = errors.New("authentication data is not usable")
ErrUnsupportedAuthData ndicates that stored authentication data is unusable
Functions ¶
This section is empty.
Types ¶
type KeyringStore ¶
type KeyringStore struct {
// contains filtered or unexported fields
}
func NewKeyringStore ¶
func NewKeyringStore(kr keyring.Keyring) (*KeyringStore, error)
NewKeyringStore creates a store based on a keyring.
func (*KeyringStore) LoadGrant ¶
func (f *KeyringStore) LoadGrant(audience string) (*oauth2.AuthorizationGrant, error)
func (*KeyringStore) Logout ¶
func (f *KeyringStore) Logout() error
func (*KeyringStore) SaveGrant ¶
func (f *KeyringStore) SaveGrant(audience string, grant oauth2.AuthorizationGrant) error
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func (*MemoryStore) LoadGrant ¶
func (f *MemoryStore) LoadGrant(audience string) (*oauth2.AuthorizationGrant, error)
func (*MemoryStore) Logout ¶
func (f *MemoryStore) Logout() error
func (*MemoryStore) SaveGrant ¶
func (f *MemoryStore) SaveGrant(audience string, grant oauth2.AuthorizationGrant) error
type Store ¶
type Store interface { // SaveGrant stores an authorization grant for a given audience SaveGrant(audience string, grant oauth2.AuthorizationGrant) error // LoadGrant loads an authorization grant for a given audience LoadGrant(audience string) (*oauth2.AuthorizationGrant, error) // WhoAmI returns the current user name (or an error if nobody is logged in) WhoAmI(audience string) (string, error) // Logout deletes all stored credentials Logout() error }
Store is responsible for persisting authorization grants
func NewMemoryStore ¶
func NewMemoryStore() Store
Click to show internal directories.
Click to hide internal directories.