securestorage

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCouldNotOpenKeyring error = errors.New("keyring not opened successfully")

Functions

This section is empty.

Types

type CFTokenStorage added in v0.8.0

type CFTokenStorage struct {
	Storage *SecureStorage
}

func NewCF added in v0.8.0

func NewCF() CFTokenStorage

type IAMCredentialsSecureStorage

type IAMCredentialsSecureStorage struct {
	SecureStorage SecureStorage
}

func NewSecureIAMCredentialStorage

func NewSecureIAMCredentialStorage() IAMCredentialsSecureStorage

func (*IAMCredentialsSecureStorage) GetCredentials

func (i *IAMCredentialsSecureStorage) GetCredentials(profile string) (credentials aws.Credentials, err error)

func (*IAMCredentialsSecureStorage) StoreCredentials

func (i *IAMCredentialsSecureStorage) StoreCredentials(profile string, credentials aws.Credentials) (err error)

type SSOToken

type SSOToken struct {
	AccessToken string
	Expiry      time.Time
}

type SSOTokensSecureStorage

type SSOTokensSecureStorage struct {
	SecureStorage SecureStorage
}

func NewSecureSSOTokenStorage

func NewSecureSSOTokenStorage() SSOTokensSecureStorage

func (*SSOTokensSecureStorage) ClearSSOToken

func (s *SSOTokensSecureStorage) ClearSSOToken(profileKey string)

Attempts to clear the token, any errors will be logged to debug logging

func (*SSOTokensSecureStorage) GetValidSSOToken

func (s *SSOTokensSecureStorage) GetValidSSOToken(profileKey string) *SSOToken

GetValidSSOToken returns nil if no token was found, or if it is expired

func (*SSOTokensSecureStorage) StoreSSOToken

func (s *SSOTokensSecureStorage) StoreSSOToken(profileKey string, ssoTokenValue SSOToken)

Attempts to store the token, any errors will be logged to debug logging

type SecureStorage

type SecureStorage struct {
	StorageSuffix string
}

func (*SecureStorage) Clear

func (s *SecureStorage) Clear(key string) error

func (*SecureStorage) HasKey

func (s *SecureStorage) HasKey(key string) (bool, error)

returns false if the key is not found, true if it is found, or false and an error if there was a keyring related error

func (*SecureStorage) Keyring added in v0.8.0

func (s *SecureStorage) Keyring() (keyring.Keyring, error)

Keyring returns the underlying keyring associated with the storage.

func (*SecureStorage) List

func (s *SecureStorage) List() ([]keyring.Item, error)

func (*SecureStorage) ListKeys

func (s *SecureStorage) ListKeys() ([]string, error)

func (*SecureStorage) Retrieve

func (s *SecureStorage) Retrieve(key string, target interface{}) error

returns keyring.ErrKeyNotFound if not found

func (*SecureStorage) Store

func (s *SecureStorage) Store(key string, payload interface{}) error

type SessionCredentialSecureStorage added in v0.10.0

type SessionCredentialSecureStorage struct {
	SecureStorage SecureStorage
}

func NewSecureSessionCredentialStorage added in v0.10.0

func NewSecureSessionCredentialStorage() SessionCredentialSecureStorage

func (*SessionCredentialSecureStorage) GetCredentials added in v0.10.0

func (i *SessionCredentialSecureStorage) GetCredentials(profile string) (credentials aws.Credentials, ok bool, err error)

func (*SessionCredentialSecureStorage) StoreCredentials added in v0.10.0

func (i *SessionCredentialSecureStorage) StoreCredentials(profile string, credentials aws.Credentials) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL