Documentation ¶
Index ¶
- type Backend
- func (b *Backend) Authenticate(opts map[string]interface{}) (map[string]interface{}, error)
- func (b *Backend) Configure(opts map[string]interface{}) error
- func (b *Backend) Do(opts map[string]interface{}) error
- func (b *Backend) GetMethod() string
- func (b *Backend) GetMfaTokens(opts map[string]interface{}) ([]*identity.MfaToken, error)
- func (b *Backend) GetName() string
- func (b *Backend) GetPublicKeys(opts map[string]interface{}) ([]*identity.PublicKey, error)
- func (b *Backend) GetRealm() string
- func (b Backend) MarshalJSON() ([]byte, error)
- func (b *Backend) UnmarshalJSON(data []byte) error
- func (b *Backend) Validate() error
- type BackendDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is an authentication backend.
func NewBackendFromBytes ¶
NewBackendFromBytes returns backend instance based on authentication method and JSON configuration data.
func NewLdapBackendFromBytes ¶
NewLdapBackendFromBytes returns LDAP backend.
func NewLocalBackendFromBytes ¶
NewLocalBackendFromBytes returns local backend.
func (*Backend) Authenticate ¶
Authenticate performs authentication with an authentication provider.
func (*Backend) GetMethod ¶
GetMethod returns the authentication method associated with an authentication provider.
func (*Backend) GetMfaTokens ¶
GetMfaTokens return a list of MFA tokens associated with a user.
func (*Backend) GetPublicKeys ¶
GetPublicKeys return a list of public keys associated with a user.
func (Backend) MarshalJSON ¶
MarshalJSON packs configuration info JSON byte array
func (*Backend) UnmarshalJSON ¶
UnmarshalJSON unpacks configuration into appropriate structures.
type BackendDriver ¶
type BackendDriver interface { GetRealm() string GetName() string GetMethod() string Authenticate(map[string]interface{}) (map[string]interface{}, error) ConfigureLogger(*zap.Logger) error ConfigureTokenProvider(*jwtconfig.CommonTokenConfig) error ConfigureAuthenticator() error Validate() error Do(map[string]interface{}) error GetPublicKeys(map[string]interface{}) ([]*identity.PublicKey, error) GetMfaTokens(map[string]interface{}) ([]*identity.MfaToken, error) }
BackendDriver is an interface to an authentication provider.