Class MongoAuthorization
- All Implemented Interfaces:
MutinyDelegate,AuthorizationProvider
MongoClient as store
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- francoisprunier
- See Also:
-
MongoAuthorization
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vertx.mutiny.ext.auth.authorization.AuthorizationProvider
AuthorizationProvider.AuthorizationProviderImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<MongoAuthorization>static final StringThe default name of the collection to be usedstatic final StringThe default name of the property for the permissions, like it is stored in mongodb.static final StringThe default name of the property for the roles, like it is stored in mongodb.static final StringThe default name of the property for the username, like it is stored in mongodb -
Constructor Summary
ConstructorsConstructorDescriptionMongoAuthorization(io.vertx.ext.auth.mongo.MongoAuthorization delegate) Create a new instance ofMongoAuthorizationdelegating to the given (non-null) instance ofMongoAuthorization.MongoAuthorization(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionstatic MongoAuthorizationcreate(String providerId, MongoClient mongoClient, io.vertx.ext.auth.mongo.MongoAuthorizationOptions options) Creates an instance of MongoAuthorization by using the givenMongoClientand configuration object.booleanio.smallrye.mutiny.Uni<Void>getAuthorizations(User user) Updates the user with the set of authorizations.voidUpdates the user with the set of authorizations.Updates the user with the set of authorizations.io.vertx.ext.auth.mongo.MongoAuthorizationGet the delegate instance.getId()returns the id of the authorization providerinthashCode()static MongoAuthorizationnewInstance(io.vertx.ext.auth.mongo.MongoAuthorization delegate) Creates a new instance of theMongoAuthorization.toString()
-
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_ROLE_FIELD
The default name of the property for the roles, like it is stored in mongodb. Roles are expected to be saved as JsonArray- See Also:
-
DEFAULT_PERMISSION_FIELD
The default name of the property for the permissions, like it is stored in mongodb. Permissions are expected to be saved as JsonArray- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
MongoAuthorization
public MongoAuthorization(io.vertx.ext.auth.mongo.MongoAuthorization delegate) Create a new instance ofMongoAuthorizationdelegating to the given (non-null) instance ofMongoAuthorization. -
MongoAuthorization
-
-
Method Details
-
getDelegate
public io.vertx.ext.auth.mongo.MongoAuthorization 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 interfaceAuthorizationProvider- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
getAuthorizations
Updates the user with the set of authorizations.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.
- Specified by:
getAuthorizationsin interfaceAuthorizationProvider- Parameters:
user- user to lookup and update.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.ext.auth.mongo.MongoAuthorization#getAuthorizations(User)
-
getAuthorizationsAndAwait
Updates the user with the set of authorizations.Unlike the bare Vert.x variant, this method returns a
Void. 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).- Parameters:
user- user to lookup and update.- See Also:
-
io.vertx.ext.auth.mongo.MongoAuthorization#getAuthorizations(User)
-
getAuthorizationsAndForget
Updates the user with the set of authorizations.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Parameters:
user- user to lookup and update.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
io.vertx.ext.auth.mongo.MongoAuthorization#getAuthorizations(User)
-
create
public static MongoAuthorization create(String providerId, MongoClient mongoClient, io.vertx.ext.auth.mongo.MongoAuthorizationOptions options) Creates an instance of MongoAuthorization by using the givenMongoClientand configuration object.- Parameters:
providerId- the provider ID to differentiate from othersmongoClient- an instance ofMongoClientto be used for data storage and retrivaloptions- the configuration object for the current instance.- Returns:
- the created instance of
MongoAuthorization
-
getId
returns the id of the authorization provider- Specified by:
getIdin interfaceAuthorizationProvider- Returns:
-
newInstance
Creates a new instance of theMongoAuthorization. -
hashCode
public int hashCode() -
equals
-
toString
-