Package com.mastfrog.acteur.auth
Interface AsyncAuthenticator<T>
public interface AsyncAuthenticator<T>
Asynchronous authenticator.
- Author:
- Tim Boudreau
-
Method Summary
Modifier and TypeMethodDescriptionauthenticate(com.mastfrog.acteur.util.RequestID rid, HttpEvent evt, String token) Authenticate a request, returning a completion stage which will resume the acteur chain when completed.type()The type of the user object that will be inside the authentication resultdefault StringValidate an incoming authenticated request.
-
Method Details
-
validate
Validate an incoming authenticated request. This is called synchronously before attempting asynchronous authentication, in order to reject requests that are obviously invalid.- Parameters:
evt- The eventtoken- The token (the substring of the header after 'bearer ').- Returns:
- An error string if validation fails
-
authenticate
EnhCompletionStage<AuthenticationResult<T>> authenticate(com.mastfrog.acteur.util.RequestID rid, HttpEvent evt, String token) Authenticate a request, returning a completion stage which will resume the acteur chain when completed.- Parameters:
rid- The request idevt- The eventtoken- The token from the authorization header- Returns:
- A completable future
-
type
The type of the user object that will be inside the authentication result- Returns:
- A type
-