Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Registry = objreg.NewObjectFactoryRegistry()
Registry is the default authenticator/authorizer factory registry.
Functions ¶
func DeleteCredentials ¶
DeleteCredentials deletes credentials to a file or the system keyring. The path can be a file path, a "file:/path" URI or a "keyring:service/user" URI.
func WriteCredentials ¶
func WriteCredentials(path string, cmap CredentialMap) (err error)
WriteCredentials writes credentials to a file or the system keyring. The path can be a file path, a "file:/path" URI or a "keyring:service/user" URI.
Types ¶
type Auth ¶
type Auth interface {
Session(credentials CredentialMap) (Session, error)
}
Auth is the primary interface implemented by an authenticator/authorizer.
type CredentialMap ¶
type CredentialMap map[string]interface{}
CredentialMap maps names to credentials.
func ReadCredentials ¶
func ReadCredentials(path string) (cmap CredentialMap, err error)
ReadCredentials reads credentials from a file or the system keyring. The path can be a file path, a "file:/path" URI or a "keyring:service/user" URI.
func (CredentialMap) Get ¶
func (self CredentialMap) Get(name string) string
Get gets a credential by name. It will convert the credential to a string using fmt.Sprint if required.
func (*CredentialMap) Set ¶
func (self *CredentialMap) Set(s string) (err error)
Set implements flag.Value.Set.
func (*CredentialMap) String ¶
func (self *CredentialMap) String() string
String implements flag.Value.String.
type Session ¶
type Session interface {
Credentials() CredentialMap
}
Session represents an authentication/authorization session.
type SessionDestroyer ¶
type SessionDestroyer interface {
Destroy()
}
SessionDestroyer destroys a session.
type SessionRefresher ¶
SessionRefresher refreshes a session.