public interface AuthenticationProvider
Modifier and Type | Method and Description |
---|---|
default io.vertx.core.Future<User> |
authenticate(Credentials credentials)
Authenticate a user.
|
default void |
authenticate(Credentials credentials,
io.vertx.core.Handler<io.vertx.core.AsyncResult<User>> resultHandler)
Authenticate a user.
|
default io.vertx.core.Future<User> |
authenticate(io.vertx.core.json.JsonObject credentials)
Authenticate a user.
|
void |
authenticate(io.vertx.core.json.JsonObject credentials,
io.vertx.core.Handler<io.vertx.core.AsyncResult<User>> resultHandler)
Authenticate a user.
|
void authenticate(io.vertx.core.json.JsonObject credentials, io.vertx.core.Handler<io.vertx.core.AsyncResult<User>> resultHandler)
The 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.
credentials
- The credentialsresultHandler
- The result handlerdefault io.vertx.core.Future<User> authenticate(io.vertx.core.json.JsonObject credentials)
The 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.
credentials
- The credentialsauthenticate(JsonObject, Handler)
default void authenticate(Credentials credentials, io.vertx.core.Handler<io.vertx.core.AsyncResult<User>> resultHandler)
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.
credentials
- The credentialsresultHandler
- The result handlerdefault io.vertx.core.Future<User> authenticate(Credentials credentials)
The first argument is a Credentials object containing information for authenticating the user. What this actually contains depends on the specific implementation.
credentials
- The credentialsauthenticate(Credentials, Handler)
Copyright © 2021 Eclipse. All rights reserved.