Package io.vertx.ext.auth.mongo
Interface MongoAuthentication
-
- All Superinterfaces:
AuthenticationProvider
public interface MongoAuthentication extends AuthenticationProvider
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_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)
static 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)
static String
DEFAULT_PASSWORD_FIELD
The default name of the property for the password, like it is stored in mongodbstatic String
DEFAULT_USERNAME_FIELD
The 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 MongoAuthentication
create(MongoClient mongoClient, MongoAuthenticationOptions options)
Creates an instance of MongoAuth by using the givenMongoClient
and configuration object.default String
hash(String id, String salt, String password)
Hashes a password to be stored.String
hash(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 givenMongoClient
and configuration object.- Parameters:
mongoClient
- an instance ofMongoClient
to 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)
-
-