Documentation
¶
Index ¶
- Constants
- Variables
- func AvailableBackends() []string
- func GetConfigFromKeyring(backend string) ([]byte, error)
- func IsBackendAvailable(backend string) (isAvailable bool)
- func RemoveConfigFromKeyring(backend string) error
- func UpsertConfigToKeyring(backend string, creds []byte) error
- func ValidateBackend(backend string) error
Constants ¶
View Source
const ( KindInternetPassword = "Internet password" // MacOS Keychain item kind ItemKey = "RedHatSSO" CollectionName = "login" // Common OS default collection name MaxWindowsByteSize = 2500 // Windows Credential Manager has a 2500 byte limit )
Variables ¶
View Source
var ( ErrKeyringInvalid = fmt.Errorf("keyring is invalid, expected one of: [%v]", strings.Join(AllowedBackends, ", ")) AllowedBackends = []string{ string(keyring.WinCredBackend), string(keyring.KeychainBackend), string(keyring.SecretServiceBackend), string(keyring.PassBackend), } )
Functions ¶
func AvailableBackends ¶
func AvailableBackends() []string
AvailableBackends provides a slice of all available backend keys on the current OS.
func GetConfigFromKeyring ¶
GetConfigFromKeyring will retrieve the credentials from the first priority OS secure store.
func IsBackendAvailable ¶ added in v0.1.402
IsBackendAvailable provides validation that the desired backend is available on the current OS.
func RemoveConfigFromKeyring ¶ added in v0.1.399
RemoveConfigFromKeyring will remove the credentials from the first priority OS secure store.
func UpsertConfigToKeyring ¶
UpsertConfigToKeyring will upsert the provided credentials to the desired OS secure store.
func ValidateBackend ¶ added in v0.1.402
Validates that the requested backend is valid and available, returns an error if not.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.