Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorChangePasswordNotSupported = errors.New("This provider does not support password change.")
View Source
var ErrorInvalidOldPassword = errors.New("Invalid old password.")
Functions ¶
This section is empty.
Types ¶
type GetNamespaceError ¶
type GetNamespaceError struct {
// contains filtered or unexported fields
}
func (*GetNamespaceError) Error ¶
func (e *GetNamespaceError) Error() string
type Provider ¶
type Provider interface { // GetUserStatus // If checkPassword == true && password == "", then UserStatus will be Wrong if this Provider is CredentialAuthority. Unchecked if not. // For non ldap provider, if this provider is CredentialAuthority, but password is not defined for a user, then password will be unchecked. // For LDAP provider defined as CredentialAuthority, password is assumed to be always defined. GetUserStatus(login string, password string, checkPassword bool) (tokenapi.UserEntry, error) GetName() string GetType() string ChangePassword(user string, oldPassword string, newPassword string) error // IsCritical // If critical, a failure will induce 'Invalid login'. Otherwhise, other providers will be used IsCritical() bool }
type ProviderChain ¶
type ProviderChain interface { Login(login, password string) (user tokenapi.UserDesc, loginOk bool, err error) // authenticator is the name of the provider who authenticate the user DescribeUser(login string) (found bool, result tokenapi.UserDesc) String() string // GetNamespace // Relevant only for providers of type 'crd' // By convention, if providerName == '_' and there is only one of type 'crd', its namespace is provided. If there is several this is an error GetNamespace(providerName string) (namespace string, err error) GetProvider(providerName string) (Provider, error) }
Click to show internal directories.
Click to hide internal directories.