Documentation ¶
Index ¶
- type Authenticator
- type Backend
- func (b *Backend) Authenticate(opts map[string]interface{}) (map[string]interface{}, error)
- func (b *Backend) ConfigureAuthenticator() error
- func (b *Backend) ConfigureLogger(logger *zap.Logger) error
- func (b *Backend) ConfigureTokenProvider(upstream *jwt.TokenProviderConfig) error
- func (b *Backend) GetMethod() string
- func (b *Backend) GetName() string
- func (b *Backend) GetRealm() string
- func (b *Backend) Validate() error
- func (b *Backend) ValidateConfig() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
Authenticator represents database connector.
func NewAuthenticator ¶
func NewAuthenticator() *Authenticator
NewAuthenticator returns an instance of Authenticator.
func (*Authenticator) ConfigureRealm ¶
func (sa *Authenticator) ConfigureRealm(realm string) error
ConfigureRealm configures a domain name (realm) associated with the instance of authenticator.
type Backend ¶
type Backend struct { Name string `json:"name,omitempty"` Method string `json:"method,omitempty"` Realm string `json:"realm,omitempty"` TokenProvider *jwt.TokenProviderConfig `json:"-"` Authenticator *Authenticator `json:"-"` // contains filtered or unexported fields }
Backend represents authentication provider with OAuth 2.0 backend.
func NewDatabaseBackend ¶
func NewDatabaseBackend() *Backend
NewDatabaseBackend return an instance of authentication provider with OAuth 2.0 backend.
func (*Backend) Authenticate ¶
Authenticate performs authentication.
func (*Backend) ConfigureAuthenticator ¶
ConfigureAuthenticator configures backend for .
func (*Backend) ConfigureLogger ¶
ConfigureLogger configures backend with the same logger as its user.
func (*Backend) ConfigureTokenProvider ¶
func (b *Backend) ConfigureTokenProvider(upstream *jwt.TokenProviderConfig) error
ConfigureTokenProvider configures TokenProvider.
func (*Backend) GetMethod ¶
GetMethod returns the authentication method associated with this backend.
func (*Backend) ValidateConfig ¶
ValidateConfig checks whether Backend has mandatory configuration.