Package io.vertx.ext.auth.mongo
Interface MongoAuthentication
-
- All Superinterfaces:
AuthenticationProvider
public interface MongoAuthentication extends AuthenticationProvider
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_CREDENTIAL_PASSWORD_FIELDThe default name of the property for the password, like it is transported in credentials by methodAuthenticationProvider.authenticate(io.vertx.ext.auth.authentication.Credentials)static StringDEFAULT_CREDENTIAL_USERNAME_FIELDThe default name of the property for the username, like it is transported in credentials by methodAuthenticationProvider.authenticate(io.vertx.ext.auth.authentication.Credentials)static StringDEFAULT_PASSWORD_FIELDThe default name of the property for the password, like it is stored in mongodbstatic StringDEFAULT_USERNAME_FIELDThe default name of the property for the username, like it is stored in mongodb
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static MongoAuthenticationcreate(MongoClient mongoClient, MongoAuthenticationOptions options)Creates an instance of MongoAuth by using the givenMongoClientand configuration object.default Stringhash(String id, String salt, String password)Hashes a password to be stored.Stringhash(String id, Map<String,String> params, String salt, String password)Hashes a password to be stored.-
Methods inherited from interface io.vertx.ext.auth.authentication.AuthenticationProvider
authenticate
-
-
-
-
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_PASSWORD_FIELD
static final String DEFAULT_PASSWORD_FIELD
The default name of the property for the password, like it is stored in mongodb- See Also:
- Constant Field Values
-
DEFAULT_CREDENTIAL_USERNAME_FIELD
static final String DEFAULT_CREDENTIAL_USERNAME_FIELD
The default name of the property for the username, like it is transported in credentials by methodAuthenticationProvider.authenticate(io.vertx.ext.auth.authentication.Credentials)- See Also:
- Constant Field Values
-
DEFAULT_CREDENTIAL_PASSWORD_FIELD
static final String DEFAULT_CREDENTIAL_PASSWORD_FIELD
The default name of the property for the password, like it is transported in credentials by methodAuthenticationProvider.authenticate(io.vertx.ext.auth.authentication.Credentials)- See Also:
- Constant Field Values
-
-
Method Detail
-
create
static MongoAuthentication create(MongoClient mongoClient, 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
String hash(String id, Map<String,String> params, String salt, String password)
Hashes a password to be stored. See:HashingStrategy.hash(String, Map, String, String)
-
hash
default String hash(String id, String salt, String password)
Hashes a password to be stored. See:HashingStrategy.hash(String, Map, String, String)
-
-