@@ -34,10 +34,12 @@ type ClientParams struct {
|
||||
type PostAuthHookFn func(ctx context.Context, identity *Identity, r *Request) error
|
||||
|
||||
type Service interface {
|
||||
// RegisterPostAuthHook registers a hook that is called after a successful authentication.
|
||||
RegisterPostAuthHook(hook PostAuthHookFn)
|
||||
// Authenticate authenticates a request using the specified client.
|
||||
Authenticate(ctx context.Context, client string, r *Request) (*Identity, bool, error)
|
||||
// Login authenticates a request and creates a session on successful authentication.
|
||||
Login(ctx context.Context, client string, r *Request) (*Identity, error)
|
||||
// RegisterPostAuthHook registers a hook that is called after a successful authentication.
|
||||
RegisterPostAuthHook(hook PostAuthHookFn)
|
||||
}
|
||||
|
||||
type Client interface {
|
||||
|
||||
Reference in New Issue
Block a user