Class MongoAuthentication
- All Implemented Interfaces:
MutinyDelegate
MongoClient as store
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- francoisprunier
- See Also:
-
MongoAuthentication
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<MongoAuthentication>static final StringThe default name of the collection to be usedstatic final StringThe default name of the property for the password, like it is transported in credentials by methodauthenticate(io.vertx.ext.auth.authentication.Credentials)static final StringThe default name of the property for the username, like it is transported in credentials by methodauthenticate(io.vertx.ext.auth.authentication.Credentials)static final StringThe default name of the property for the password, like it is stored in mongodbstatic final StringThe default name of the property for the username, like it is stored in mongodb -
Constructor Summary
ConstructorsConstructorDescriptionMongoAuthentication(io.vertx.ext.auth.mongo.MongoAuthentication delegate) Create a new instance ofMongoAuthenticationdelegating to the given (non-null) instance ofMongoAuthentication.MongoAuthentication(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<User>authenticate(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.authenticateAndAwait(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.authenticateAndForget(io.vertx.ext.auth.authentication.Credentials credentials) Authenticate a user.static MongoAuthenticationcreate(MongoClient mongoClient, io.vertx.ext.auth.mongo.MongoAuthenticationOptions options) Creates an instance of MongoAuth by using the givenMongoClientand configuration object.booleanio.vertx.ext.auth.mongo.MongoAuthenticationGet the delegate instance.Hashes a password to be stored.Hashes a password to be stored.inthashCode()static MongoAuthenticationnewInstance(io.vertx.ext.auth.mongo.MongoAuthentication delegate) Creates a new instance of theMongoAuthentication.toString()Methods inherited from class io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
newInstance
-
Field Details
-
DEFAULT_COLLECTION_NAME
The default name of the collection to be used- See Also:
-
DEFAULT_USERNAME_FIELD
The default name of the property for the username, like it is stored in mongodb- See Also:
-
DEFAULT_PASSWORD_FIELD
The default name of the property for the password, like it is stored in mongodb- See Also:
-
DEFAULT_CREDENTIAL_USERNAME_FIELD
The default name of the property for the username, like it is transported in credentials by methodauthenticate(io.vertx.ext.auth.authentication.Credentials)- See Also:
-
DEFAULT_CREDENTIAL_PASSWORD_FIELD
The default name of the property for the password, like it is transported in credentials by methodauthenticate(io.vertx.ext.auth.authentication.Credentials)- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
MongoAuthentication
public MongoAuthentication(io.vertx.ext.auth.mongo.MongoAuthentication delegate) Create a new instance ofMongoAuthenticationdelegating to the given (non-null) instance ofMongoAuthentication. -
MongoAuthentication
-
-
Method Details
-
getDelegate
public io.vertx.ext.auth.mongo.MongoAuthentication getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Overrides:
getDelegatein classAuthenticationProvider- Returns:
- the delegate instance
-
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.
Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
authenticatein classAuthenticationProvider- Parameters:
credentials- The credentials- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
AuthenticationProvider.authenticate(Credentials)
-
authenticateAndAwait
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.
Unlike the bare Vert.x variant, this method returns a
User. This method awaits indefinitely 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 aRuntimeException).- Overrides:
authenticateAndAwaitin classAuthenticationProvider- Parameters:
credentials- The credentials- Returns:
- The operation result
- See Also:
-
AuthenticationProvider.authenticate(Credentials)
-
authenticateAndForget
public MongoAuthentication authenticateAndForget(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.
Unlike the bare Vert.x variant, this method ignores the
Userresult or any failure.- Overrides:
authenticateAndForgetin classAuthenticationProvider- Parameters:
credentials- The credentials- Returns:
- The current instance to chain operations if needed.
- See Also:
-
AuthenticationProvider.authenticate(Credentials)
-
create
public static MongoAuthentication create(MongoClient mongoClient, io.vertx.ext.auth.mongo.MongoAuthenticationOptions options) Creates an instance of MongoAuth by using the givenMongoClientand configuration object.- Parameters:
mongoClient- an instance ofMongoClientto be used for data storage and retrivaloptions- the configuration object for the current instance.- Returns:
- the created instance of
MongoAuthentication
-
hash
Hashes a password to be stored. See:HashingStrategy.hash(String, Map, String, String) -
hash
Hashes a password to be stored. See:HashingStrategy.hash(String, Map, String, String) -
newInstance
Creates a new instance of theMongoAuthentication. -
hashCode
public int hashCode()- Overrides:
hashCodein classAuthenticationProvider
-
equals
- Overrides:
equalsin classAuthenticationProvider
-
toString
- Overrides:
toStringin classAuthenticationProvider
-