public class MongoAuth extends AuthProvider
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MongoAuth> |
__TYPE_ARG |
static String |
DEFAULT_COLLECTION_NAME
The default name of the collection to be used
|
static String |
DEFAULT_CREDENTIAL_PASSWORD_FIELD
The default name of the property for the password, like it is transported in credentials by method
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>) |
static String |
DEFAULT_CREDENTIAL_USERNAME_FIELD
The default name of the property for the username, like it is transported in credentials by method
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>) |
static String |
DEFAULT_PASSWORD_FIELD
The default name of the property for the password, like it is stored in mongodb
|
static 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_SALT_FIELD
The default name of the property for the salt field
|
static String |
DEFAULT_USERNAME_FIELD
The default name of the property for the username, like it is stored in mongodb
|
static String |
PROPERTY_COLLECTION_NAME
The property name to be used to set the name of the collection inside the config
|
static String |
PROPERTY_CREDENTIAL_PASSWORD_FIELD
The property name to be used to set the name of the field, where the password for the credentials is stored inside
|
static String |
PROPERTY_CREDENTIAL_USERNAME_FIELD
The property name to be used to set the name of the field, where the username for the credentials is stored inside
|
static String |
PROPERTY_PASSWORD_FIELD
The property name to be used to set the name of the field, where the password is stored inside
|
static String |
PROPERTY_PERMISSION_FIELD
The property name to be used to set the name of the field, where the permissions are stored inside
|
static String |
PROPERTY_ROLE_FIELD
The property name to be used to set the name of the field, where the roles are stored inside
|
static String |
PROPERTY_SALT_FIELD
The property name to be used to set the name of the field, where the SALT is stored inside
|
static String |
PROPERTY_SALT_STYLE
The property name to be used to set the name of the field, where the salt style is stored inside
|
static String |
PROPERTY_USERNAME_FIELD
The property name to be used to set the name of the field, where the username is stored inside
|
static String |
ROLE_PREFIX
The prefix which is used by the method when checking for role access
|
Constructor and Description |
---|
MongoAuth(MongoAuth delegate) |
MongoAuth(Object delegate) |
newInstance
authenticate, authenticate, authenticate, authenticate, newInstance, rxAuthenticate, rxAuthenticate
public static final io.vertx.lang.rx.TypeArg<MongoAuth> __TYPE_ARG
public static final String PROPERTY_COLLECTION_NAME
public static final String PROPERTY_USERNAME_FIELD
public static final String PROPERTY_ROLE_FIELD
public static final String PROPERTY_PERMISSION_FIELD
public static final String PROPERTY_PASSWORD_FIELD
public static final String PROPERTY_CREDENTIAL_USERNAME_FIELD
public static final String PROPERTY_CREDENTIAL_PASSWORD_FIELD
public static final String PROPERTY_SALT_FIELD
public static final String PROPERTY_SALT_STYLE
public static final String DEFAULT_COLLECTION_NAME
public static final String DEFAULT_USERNAME_FIELD
public static final String DEFAULT_PASSWORD_FIELD
public static final String DEFAULT_ROLE_FIELD
public static final String DEFAULT_PERMISSION_FIELD
public static final String DEFAULT_CREDENTIAL_USERNAME_FIELD
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>)
public static final String DEFAULT_CREDENTIAL_PASSWORD_FIELD
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>)
public static final String DEFAULT_SALT_FIELD
public static final String ROLE_PREFIX
public MongoAuth(MongoAuth delegate)
public MongoAuth(Object delegate)
public String toString()
toString
in class AuthProvider
public boolean equals(Object o)
equals
in class AuthProvider
public int hashCode()
hashCode
in class AuthProvider
public MongoAuth getDelegate()
getDelegate
in class AuthProvider
@Deprecated public static MongoAuth create(MongoClient mongoClient, JsonObject config)
JsonObject js = new JsonObject(); js.put(MongoAuth.PROPERTY_COLLECTION_NAME, createCollectionName(MongoAuth.DEFAULT_COLLECTION_NAME));
mongoClient
- an instance of to be used for data storage and retrivalconfig
- the configuration object for the current instance. By thisMongoAuth
s@Deprecated public MongoAuth setCollectionName(String collectionName)
MongoAuth
collectionName
- the name of the collection to be used for storing and reading user data@Deprecated public MongoAuth setUsernameField(String fieldName)
MongoAuth
fieldName
- the name of the field to be used@Deprecated public MongoAuth setPasswordField(String fieldName)
MongoAuth
fieldName
- the name of the field to be used@Deprecated public MongoAuth setRoleField(String fieldName)
MongoAuth
. Roles are expected to
be saved as JsonArrayfieldName
- the name of the field to be used@Deprecated public MongoAuth setPermissionField(String fieldName)
MongoAuth
.
Permissions are expected to be saved as JsonArrayfieldName
- the name of the field to be used@Deprecated public MongoAuth setUsernameCredentialField(String fieldName)
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>)
. Defaults to MongoAuth
fieldName
- the name of the field to be used@Deprecated public MongoAuth setPasswordCredentialField(String fieldName)
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>)
. Defaults to MongoAuth
fieldName
- the name of the field to be used@Deprecated public MongoAuth setSaltField(String fieldName)
HashStrategy.setSaltStyle(io.vertx.ext.auth.mongo.HashSaltStyle)
is
set tofieldName
- the name of the field to be used@Deprecated public String getCollectionName()
MongoAuth
@Deprecated public String getUsernameField()
MongoAuth
@Deprecated public String getPasswordField()
MongoAuth
@Deprecated public String getRoleField()
MongoAuth
. Roles are expected to
be saved as JsonArray@Deprecated public String getPermissionField()
MongoAuth
.
Permissions are expected to be saved as JsonArray@Deprecated public String getUsernameCredentialField()
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>)
. Defaults to MongoAuth
@Deprecated public String getPasswordCredentialField()
AuthenticationProvider.authenticate(io.vertx.core.json.JsonObject, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.ext.auth.User>>)
. Defaults to MongoAuth
@Deprecated public String getSaltField()
HashStrategy.setSaltStyle(io.vertx.ext.auth.mongo.HashSaltStyle)
is
set to@Deprecated public MongoAuth setHashStrategy(HashStrategy hashStrategy)
hashStrategy
- the HashStrategy
to be set@Deprecated public HashStrategy getHashStrategy()
HashStrategy
@Deprecated public MongoAuth setHashAlgorithm(HashAlgorithm hashAlgorithm)
hashAlgorithm
- the HashAlgorithm
to be set@Deprecated public void insertUser(String username, String password, List<String> roles, List<String> permissions, Handler<AsyncResult<String>> resultHandler)
username
- the username to be setpassword
- the passsword in clear text, will be adapted following the definitions of the defined HashStrategy
roles
- a list of roles to be setpermissions
- a list of permissions to be setresultHandler
- the ResultHandler will be provided with the id of the generated record@Deprecated public void insertUser(String username, String password, List<String> roles, List<String> permissions)
username
- the username to be setpassword
- the passsword in clear text, will be adapted following the definitions of the defined HashStrategy
roles
- a list of roles to be setpermissions
- a list of permissions to be set@Deprecated public Single<String> rxInsertUser(String username, String password, List<String> roles, List<String> permissions)
username
- the username to be setpassword
- the passsword in clear text, will be adapted following the definitions of the defined HashStrategy
roles
- a list of roles to be setpermissions
- a list of permissions to be setCopyright © 2024 Eclipse. All rights reserved.