Documentation ¶
Index ¶
- func MakeLoginEndpoint(l *zap.Logger, m *Manager, e encode.Encoder) http.HandlerFunc
- func MakeRecaptchaLoginEndpoint(l *zap.Logger, m *Manager, e encode.Encoder) http.HandlerFunc
- func MakeRefreshTokenEndpoint(l *zap.Logger, m *Manager, e encode.Encoder, pubKey rsa.PublicKey) http.HandlerFunc
- type Credentials
- type Manager
- type Repository
- type ServerCredentials
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeLoginEndpoint ¶
MakeLoginEndpoint creates a new http endpoint for a normal login
func MakeRecaptchaLoginEndpoint ¶
MakeRecaptchaLoginEndpoint creates a new http endpoint for a recaptcha login
Types ¶
type Credentials ¶
Credentials to login and to fetch access and refresh token
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager for authenticating a user
func NewManager ¶
func NewManager(prvKey *rsa.PrivateKey, r Repository, u user.Manager, v *recaptcha.Verifier, saKey key.Manager) *Manager
NewManager for user authentication
func (*Manager) RecaptchaLogin ¶
RecaptchaLogin logs a user in with a check for recaptcha A recaptcha login is only available for default user logins
type Repository ¶
type Repository interface { LoginAttemptsCountSince(ctx context.Context, id string, t time.Time) (uint64, error) AddLoginAttempt(ctx context.Context, id string, t time.Time) error }
Repository for the authentication service
type ServerCredentials ¶
ServerCredentials for logins on the server
Click to show internal directories.
Click to hide internal directories.