Documentation
¶
Index ¶
- Variables
- func IsKeyringAvailable() bool
- type KeyringStorageProvider
- func (k *KeyringStorageProvider) PurgeCredentials() error
- func (k *KeyringStorageProvider) ReadAuthnToken() ([]byte, error)
- func (k *KeyringStorageProvider) ReadCredentials() (string, string, error)
- func (k *KeyringStorageProvider) StoreAuthnToken(token []byte) error
- func (k *KeyringStorageProvider) StoreCredentials(login string, password string) error
- type NetrcStorageProvider
- func (s *NetrcStorageProvider) PurgeCredentials() error
- func (s *NetrcStorageProvider) ReadAuthnToken() ([]byte, error)
- func (s *NetrcStorageProvider) ReadCredentials() (string, string, error)
- func (s *NetrcStorageProvider) StoreAuthnToken(token []byte) error
- func (s *NetrcStorageProvider) StoreCredentials(login string, password string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReadingCredentials = errors.New("unable to read credentials from keyring")
View Source
var ErrWritingCredentials = errors.New("unable to write credentials to keyring")
Functions ¶
func IsKeyringAvailable ¶
func IsKeyringAvailable() bool
IsKeyringAvailable returns true if the keyring is available on the system
Types ¶
type KeyringStorageProvider ¶
type KeyringStorageProvider struct {
// contains filtered or unexported fields
}
func NewKeyringStorageProvider ¶
func NewKeyringStorageProvider(machineName string) *KeyringStorageProvider
func (*KeyringStorageProvider) PurgeCredentials ¶
func (k *KeyringStorageProvider) PurgeCredentials() error
func (*KeyringStorageProvider) ReadAuthnToken ¶
func (k *KeyringStorageProvider) ReadAuthnToken() ([]byte, error)
func (*KeyringStorageProvider) ReadCredentials ¶
func (k *KeyringStorageProvider) ReadCredentials() (string, string, error)
func (*KeyringStorageProvider) StoreAuthnToken ¶
func (k *KeyringStorageProvider) StoreAuthnToken(token []byte) error
func (*KeyringStorageProvider) StoreCredentials ¶
func (k *KeyringStorageProvider) StoreCredentials(login string, password string) error
type NetrcStorageProvider ¶
type NetrcStorageProvider struct {
// contains filtered or unexported fields
}
func NewNetrcStorageProvider ¶
func NewNetrcStorageProvider(netRCPath, machineName string) *NetrcStorageProvider
func (*NetrcStorageProvider) PurgeCredentials ¶
func (s *NetrcStorageProvider) PurgeCredentials() error
PurgeCredentials purges credentials from the specified .netrc file
func (*NetrcStorageProvider) ReadAuthnToken ¶
func (s *NetrcStorageProvider) ReadAuthnToken() ([]byte, error)
ReadAuthnToken fetches the cached conjur access token. We only do this for OIDC since we don't have access to the Conjur API key and this is the only credential we can save.
func (*NetrcStorageProvider) ReadCredentials ¶
func (s *NetrcStorageProvider) ReadCredentials() (string, string, error)
func (*NetrcStorageProvider) StoreAuthnToken ¶
func (s *NetrcStorageProvider) StoreAuthnToken(token []byte) error
StoreAuthnToken stores the conjur access token. We only do this for OIDC since we don't have access to the Conjur API key and this is the only credential we can save.
func (*NetrcStorageProvider) StoreCredentials ¶
func (s *NetrcStorageProvider) StoreCredentials(login string, password string) error
StoreCredentials stores credentials to the specified .netrc file
Click to show internal directories.
Click to hide internal directories.