Class AuthenticationProvider
- java.lang.Object
-
- io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
-
- Direct Known Subclasses:
AuthProvider
,ChainAuth
,HotpAuth
,HtdigestAuth
,HtpasswdAuth
,JDBCAuthentication
,JWTAuth
,LdapAuthentication
,MongoAuthentication
,OAuth2Auth
,PropertyFileAuthentication
,SqlAuthentication
,TotpAuth
,WebAuthn
public class AuthenticationProvider extends Object
User-facing interface for authenticating users. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<AuthenticationProvider>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description AuthenticationProvider(io.vertx.ext.auth.authentication.AuthenticationProvider delegate)
AuthenticationProvider(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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.io.smallrye.mutiny.Uni<User>
authenticate(io.vertx.ext.auth.authentication.Credentials credentials)
Authenticate a user.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.User
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
equals(Object o)
io.vertx.ext.auth.authentication.AuthenticationProvider
getDelegate()
int
hashCode()
static AuthenticationProvider
newInstance(io.vertx.ext.auth.authentication.AuthenticationProvider arg)
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<AuthenticationProvider> __TYPE_ARG
-
-
Constructor Detail
-
AuthenticationProvider
public AuthenticationProvider(io.vertx.ext.auth.authentication.AuthenticationProvider delegate)
-
AuthenticationProvider
public AuthenticationProvider(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.auth.authentication.AuthenticationProvider getDelegate()
-
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 public 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.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 public 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.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
public User authenticateAndAwait(io.vertx.ext.auth.authentication.Credentials credentials)
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)
-
-