Documentation ¶
Overview ¶
Package token provides keychain storage for token.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithTokenStorage ¶
func WithTokenStorage(options ...StorageOption) n26api.Option
WithTokenStorage sets keychain as a token storage for n26 client.
Types ¶
type KeychainStorage ¶ added in v0.2.1
type KeychainStorage interface { auth.TokenStorage // Delete deletes the token in keychain. Delete(ctx context.Context, key string) error }
KeychainStorage manages credentials in keychain.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage provides token from keychain.
func NewStorage ¶
func NewStorage(options ...StorageOption) *Storage
NewStorage returns keychain as a token storage.
type StorageOption ¶
type StorageOption func(s *Storage)
StorageOption configures Storage.
func WithKeyring ¶ added in v0.3.0
func WithKeyring(storage n26keychain.Storage) StorageOption
WithKeyring sets keychain storage for Storage.
Click to show internal directories.
Click to hide internal directories.