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) GetName() string
- 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) 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 }
BackendDriver is an interface to an authentication provider.
Click to show internal directories.
Click to hide internal directories.