public class PropertyFileAuthenticationImpl extends Object implements PropertyFileAuthentication, PropertyFileAuthorization
| Constructor and Description |
|---|
PropertyFileAuthenticationImpl(Vertx vertx,
String path) |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(Credentials credentials,
Handler<AsyncResult<User>> resultHandler)
Authenticate a user.
|
void |
authenticate(JsonObject authInfo,
Handler<AsyncResult<User>> resultHandler)
Authenticate a user.
|
void |
getAuthorizations(User user,
Handler<AsyncResult<Void>> resultHandler)
Updates the user with the set of authorizations.
|
String |
getId()
returns the id of the authorization provider
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateauthenticate, authenticatecreatecreate, getAuthorizationspublic void authenticate(JsonObject authInfo, Handler<AsyncResult<User>> resultHandler)
AuthenticationProviderThe first argument is a JSON object containing information for authenticating the user. What this actually contains depends on the specific implementation. In the case of a simple username/password based authentication it is likely to contain a JSON object with the following structure:
{
"username": "tim",
"password": "mypassword"
}
For other types of authentication it contain different information - for example a JWT token or OAuth bearer token.
If the user is successfully authenticated a User object is passed to the handler in an AsyncResult.
The user object can then be used for authorisation.
authenticate in interface AuthenticationProviderauthInfo - The credentialsresultHandler - The result handlerpublic void authenticate(Credentials credentials, Handler<AsyncResult<User>> resultHandler)
AuthenticationProvider
The first argument is a Credentials object containing information for authenticating the user.
What this actually contains depends on the specific implementation.
If the user is successfully authenticated a User object is passed to the handler in an AsyncResult.
The user object can then be used for authorisation.
authenticate in interface AuthenticationProvidercredentials - The credentialsresultHandler - The result handlerpublic String getId()
AuthorizationProvidergetId in interface AuthorizationProviderpublic void getAuthorizations(User user, Handler<AsyncResult<Void>> resultHandler)
AuthorizationProvidergetAuthorizations in interface AuthorizationProvideruser - user to lookup and updateresultHandler - result handlerCopyright © 2021. All rights reserved.