Class AuthenticationProvider
- All Implemented Interfaces:
MutinyDelegate
- Direct Known Subclasses:
AuthProvider
,ChainAuth
,HotpAuth
,HtdigestAuth
,HtpasswdAuth
,JDBCAuthentication
,JWTAuth
,LdapAuthentication
,MongoAuthentication
,OAuth2Auth
,PropertyFileAuthentication
,SqlAuthentication
,TotpAuth
,WebAuthn
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationProvider
(io.vertx.ext.auth.authentication.AuthenticationProvider delegate) AuthenticationProvider
(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<User>
authenticate
(io.vertx.core.json.JsonObject credentials) Deprecated.io.smallrye.mutiny.Uni<User>
authenticate
(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.authenticateAndAwait
(io.vertx.core.json.JsonObject credentials) Deprecated.For type safety this method should be avoided and#authenticate(Credentials, Handler)
should be used instead.authenticateAndAwait
(io.vertx.ext.auth.authentication.Credentials credentials) Blocking variant ofauthenticate(Credentials)
.void
authenticateAndForget
(io.vertx.core.json.JsonObject credentials) Deprecated.For type safety this method should be avoided and#authenticate(Credentials, Handler)
should be used instead.void
authenticateAndForget
(io.vertx.ext.auth.authentication.Credentials credentials) Variant ofauthenticate(Credentials)
that ignores the result of the operation.boolean
io.vertx.ext.auth.authentication.AuthenticationProvider
int
hashCode()
static AuthenticationProvider
newInstance
(io.vertx.ext.auth.authentication.AuthenticationProvider arg) toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
AuthenticationProvider
public AuthenticationProvider(io.vertx.ext.auth.authentication.AuthenticationProvider delegate) -
AuthenticationProvider
-
-
Method Details
-
getDelegate
public io.vertx.ext.auth.authentication.AuthenticationProvider getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
authenticate
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<User> authenticate(io.vertx.core.json.JsonObject credentials) Deprecated.For type safety this method should be avoided and#authenticate(Credentials, Handler)
should be used instead.Authenticate a user.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 object is passed to the handler in an . The user object can then be used for authorisation.
Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
credentials
- The credentials- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
authenticateAndAwait
Deprecated.For type safety this method should be avoided and#authenticate(Credentials, Handler)
should be used instead.Blocking variant ofauthenticate(JsonObject)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
credentials
- The credentials- Returns:
- the User instance produced by the operation.
-
authenticateAndForget
Deprecated.For type safety this method should be avoided and#authenticate(Credentials, Handler)
should be used instead.Variant ofauthenticate(JsonObject)
that ignores the result of the operation.This method subscribes on the result of
authenticate(JsonObject)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromauthenticate(JsonObject)
but you don't need to compose it with other operations.- Parameters:
credentials
- The credentials
-
authenticate
@CheckReturnValue public io.smallrye.mutiny.Uni<User> authenticate(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.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 object is passed to the handler in an . The user object can then be used for authorisation.
Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
credentials
- The credentials- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
authenticateAndAwait
Blocking variant ofauthenticate(Credentials)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
credentials
- The credentials- Returns:
- the User instance produced by the operation.
-
authenticateAndForget
public void authenticateAndForget(io.vertx.ext.auth.authentication.Credentials credentials) Variant ofauthenticate(Credentials)
that ignores the result of the operation.This method subscribes on the result of
authenticate(Credentials)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromauthenticate(Credentials)
but you don't need to compose it with other operations.- Parameters:
credentials
- The credentials
-
newInstance
public static AuthenticationProvider newInstance(io.vertx.ext.auth.authentication.AuthenticationProvider arg)
-
#authenticate(Credentials, Handler)
should be used instead.