Package io.vertx.ext.auth.mongo
Interface MongoAuthorization
-
- All Superinterfaces:
AuthorizationProvider
public interface MongoAuthorization extends AuthorizationProvider
An extension of AuthProvider which is usingMongoClient
as store- Author:
- francoisprunier
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_COLLECTION_NAME
The default name of the collection to be usedstatic String
DEFAULT_PERMISSION_FIELD
The default name of the property for the permissions, like it is stored in mongodb.static String
DEFAULT_ROLE_FIELD
The default name of the property for the roles, like it is stored in mongodb.static String
DEFAULT_USERNAME_FIELD
The default name of the property for the username, like it is stored in mongodb
-
Method Summary
Static Methods Modifier and Type Method Description static MongoAuthorization
create(String providerId, MongoClient mongoClient, MongoAuthorizationOptions options)
Creates an instance of MongoAuthorization by using the givenMongoClient
and 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 givenMongoClient
and configuration object.- Parameters:
providerId
- the provider ID to differentiate from othersmongoClient
- an instance ofMongoClient
to be used for data storage and retrivaloptions
- the configuration object for the current instance.- Returns:
- the created instance of
MongoAuthorization
-
-