Interface MongoAuthorization
- All Superinterfaces:
AuthorizationProvider
An extension of AuthProvider which is using
MongoClient as store- Author:
- francoisprunier
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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 -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic MongoAuthorizationcreate(String providerId, MongoClient mongoClient, MongoAuthorizationOptions options) Creates an instance of MongoAuthorization by using the givenMongoClientand configuration object.Methods inherited from interface AuthorizationProvider
getAuthorizations, getId
-
Field Details
-
DEFAULT_COLLECTION_NAME
-
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:
-
-
Method Details
-
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
-