Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
)Functions ¶
Types ¶
type AuthRequest ¶
type AuthResponse ¶
type Authenticator ¶
type Authenticator interface { // indicates whether authentication is enabled Enabled() bool Authenticate(req *AuthRequest) (*AuthResponse, error) GenerateToken(u User) (*AuthResponse, error) }
type DefaultAuthenticator ¶
type DefaultAuthenticator struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts *Opts) *DefaultAuthenticator
func (*DefaultAuthenticator) Authenticate ¶
func (a *DefaultAuthenticator) Authenticate(req *AuthRequest) (*AuthResponse, error)
func (*DefaultAuthenticator) Enabled ¶
func (a *DefaultAuthenticator) Enabled() bool
func (*DefaultAuthenticator) GenerateToken ¶
func (a *DefaultAuthenticator) GenerateToken(u User) (*AuthResponse, error)
Click to show internal directories.
Click to hide internal directories.