Package io.vertx.ext.auth.mongo
Interface MongoAuthorization
-
- All Superinterfaces:
AuthorizationProvider
public interface MongoAuthorization extends AuthorizationProvider
An extension of AuthProvider which is usingMongoClientas store- Author:
- francoisprunier
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_COLLECTION_NAMEThe default name of the collection to be usedstatic StringDEFAULT_PERMISSION_FIELDThe default name of the property for the permissions, like it is stored in mongodb.static StringDEFAULT_ROLE_FIELDThe default name of the property for the roles, like it is stored in mongodb.static StringDEFAULT_USERNAME_FIELDThe default name of the property for the username, like it is stored in mongodb
-
Method Summary
Static Methods Modifier and Type Method Description static MongoAuthorizationcreate(String providerId, MongoClient mongoClient, MongoAuthorizationOptions options)Creates an instance of MongoAuthorization by using the givenMongoClientand configuration object.-
Methods inherited from interface io.vertx.ext.auth.authorization.AuthorizationProvider
getAuthorizations, getId
-
-
-
-
Field Detail
-
DEFAULT_COLLECTION_NAME
static final String DEFAULT_COLLECTION_NAME
The default name of the collection to be used- See Also:
- Constant Field Values
-
DEFAULT_USERNAME_FIELD
static final String DEFAULT_USERNAME_FIELD
The default name of the property for the username, like it is stored in mongodb- See Also:
- Constant Field Values
-
DEFAULT_ROLE_FIELD
static final String 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:
- Constant Field Values
-
DEFAULT_PERMISSION_FIELD
static final String 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:
- Constant Field Values
-
-
Method Detail
-
create
static MongoAuthorization create(String providerId, MongoClient mongoClient, 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
-
-