Package io.vertx.mutiny.ext.auth.mongo
Class MongoAuth
- java.lang.Object
-
- io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
-
- io.vertx.mutiny.ext.auth.AuthProvider
-
- io.vertx.mutiny.ext.auth.mongo.MongoAuth
-
public class MongoAuth extends AuthProvider
An extension of AuthProvider which is using as store NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<MongoAuth>__TYPE_ARGstatic 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.core.json.JsonObject)static StringDEFAULT_CREDENTIAL_USERNAME_FIELDThe default name of the property for the username, like it is transported in credentials by methodAuthenticationProvider.authenticate(io.vertx.core.json.JsonObject)static StringDEFAULT_PASSWORD_FIELDThe default name of the property for the password, like it is stored in mongodbstatic StringDEFAULT_PERMISSION_FIELDThe default name of the property for the permissions, like it is stored in mongodb.static StringDEFAULT_ROLE_FIELDThe default name of the property for the roles, like it is stored in mongodb.static StringDEFAULT_SALT_FIELDThe default name of the property for the salt fieldstatic StringDEFAULT_USERNAME_FIELDThe default name of the property for the username, like it is stored in mongodbstatic StringPROPERTY_COLLECTION_NAMEThe property name to be used to set the name of the collection inside the configstatic StringPROPERTY_CREDENTIAL_PASSWORD_FIELDThe property name to be used to set the name of the field, where the password for the credentials is stored insidestatic StringPROPERTY_CREDENTIAL_USERNAME_FIELDThe property name to be used to set the name of the field, where the username for the credentials is stored insidestatic StringPROPERTY_PASSWORD_FIELDThe property name to be used to set the name of the field, where the password is stored insidestatic StringPROPERTY_PERMISSION_FIELDThe property name to be used to set the name of the field, where the permissions are stored insidestatic StringPROPERTY_ROLE_FIELDThe property name to be used to set the name of the field, where the roles are stored insidestatic StringPROPERTY_SALT_FIELDThe property name to be used to set the name of the field, where the SALT is stored insidestatic StringPROPERTY_SALT_STYLEThe property name to be used to set the name of the field, where the salt style is stored insidestatic StringPROPERTY_USERNAME_FIELDThe property name to be used to set the name of the field, where the username is stored insidestatic StringROLE_PREFIXThe prefix which is used by the method when checking for role access
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MongoAuthcreate(MongoClient mongoClient, io.vertx.core.json.JsonObject config)Deprecated.booleanequals(Object o)StringgetCollectionName()Deprecated.io.vertx.ext.auth.mongo.MongoAuthgetDelegate()HashStrategygetHashStrategy()Deprecated.StringgetPasswordCredentialField()Deprecated.StringgetPasswordField()Deprecated.StringgetPermissionField()Deprecated.StringgetRoleField()Deprecated.StringgetSaltField()Deprecated.StringgetUsernameCredentialField()Deprecated.StringgetUsernameField()Deprecated.inthashCode()io.smallrye.mutiny.Uni<String>insertUser(String username, String password, List<String> roles, List<String> permissions)Deprecated.StringinsertUserAndAwait(String username, String password, List<String> roles, List<String> permissions)Deprecated.voidinsertUserAndForget(String username, String password, List<String> roles, List<String> permissions)Deprecated.static MongoAuthnewInstance(io.vertx.ext.auth.mongo.MongoAuth arg)MongoAuthsetCollectionName(String collectionName)Deprecated.MongoAuthsetHashAlgorithm(io.vertx.ext.auth.mongo.HashAlgorithm hashAlgorithm)Deprecated.MongoAuthsetHashStrategy(HashStrategy hashStrategy)Deprecated.MongoAuthsetPasswordCredentialField(String fieldName)Deprecated.MongoAuthsetPasswordField(String fieldName)Deprecated.MongoAuthsetPermissionField(String fieldName)Deprecated.MongoAuthsetRoleField(String fieldName)Deprecated.MongoAuthsetSaltField(String fieldName)Deprecated.MongoAuthsetUsernameCredentialField(String fieldName)Deprecated.MongoAuthsetUsernameField(String fieldName)Deprecated.StringtoString()-
Methods inherited from class io.vertx.mutiny.ext.auth.AuthProvider
newInstance
-
Methods inherited from class io.vertx.mutiny.ext.auth.authentication.AuthenticationProvider
authenticate, authenticate, authenticateAndAwait, authenticateAndAwait, authenticateAndForget, authenticateAndForget, newInstance
-
-
-
-
Field Detail
-
PROPERTY_COLLECTION_NAME
public static final String PROPERTY_COLLECTION_NAME
The property name to be used to set the name of the collection inside the config- See Also:
- Constant Field Values
-
PROPERTY_USERNAME_FIELD
public static final String PROPERTY_USERNAME_FIELD
The property name to be used to set the name of the field, where the username is stored inside- See Also:
- Constant Field Values
-
PROPERTY_ROLE_FIELD
public static final String PROPERTY_ROLE_FIELD
The property name to be used to set the name of the field, where the roles are stored inside- See Also:
- Constant Field Values
-
PROPERTY_PERMISSION_FIELD
public static final String PROPERTY_PERMISSION_FIELD
The property name to be used to set the name of the field, where the permissions are stored inside- See Also:
- Constant Field Values
-
PROPERTY_PASSWORD_FIELD
public static final String PROPERTY_PASSWORD_FIELD
The property name to be used to set the name of the field, where the password is stored inside- See Also:
- Constant Field Values
-
PROPERTY_CREDENTIAL_USERNAME_FIELD
public static final 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- See Also:
- Constant Field Values
-
PROPERTY_CREDENTIAL_PASSWORD_FIELD
public static final 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- See Also:
- Constant Field Values
-
PROPERTY_SALT_FIELD
public static final String PROPERTY_SALT_FIELD
The property name to be used to set the name of the field, where the SALT is stored inside- See Also:
- Constant Field Values
-
PROPERTY_SALT_STYLE
public static final String PROPERTY_SALT_STYLE
The property name to be used to set the name of the field, where the salt style is stored inside- See Also:
- Constant Field Values
-
DEFAULT_COLLECTION_NAME
public static final String DEFAULT_COLLECTION_NAME
The default name of the collection to be used- See Also:
- Constant Field Values
-
DEFAULT_USERNAME_FIELD
public 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
public 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_ROLE_FIELD
public 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
public 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
-
DEFAULT_CREDENTIAL_USERNAME_FIELD
public 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.core.json.JsonObject)- See Also:
- Constant Field Values
-
DEFAULT_CREDENTIAL_PASSWORD_FIELD
public 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.core.json.JsonObject)- See Also:
- Constant Field Values
-
DEFAULT_SALT_FIELD
public static final String DEFAULT_SALT_FIELD
The default name of the property for the salt field- See Also:
- Constant Field Values
-
ROLE_PREFIX
public static final String ROLE_PREFIX
The prefix which is used by the method when checking for role access- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MongoAuth
public MongoAuth(io.vertx.ext.auth.mongo.MongoAuth delegate)
-
MongoAuth
public MongoAuth(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.auth.mongo.MongoAuth getDelegate()
- Overrides:
getDelegatein classAuthProvider
-
toString
public String toString()
- Overrides:
toStringin classAuthProvider
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAuthProvider
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAuthProvider
-
create
@Deprecated public static MongoAuth create(MongoClient mongoClient, io.vertx.core.json.JsonObject config)
Deprecated.- Parameters:
mongoClient- an instance of to be used for data storage and retrivalconfig- the configuration object for the current instance. By this- Returns:
- the created instance of
MongoAuths
-
setCollectionName
@Deprecated public MongoAuth setCollectionName(String collectionName)
Deprecated.- Parameters:
collectionName- the name of the collection to be used for storing and reading user data- Returns:
- the current instance itself for fluent calls
-
setUsernameField
@Deprecated public MongoAuth setUsernameField(String fieldName)
Deprecated.- Parameters:
fieldName- the name of the field to be used- Returns:
- the current instance itself for fluent calls
-
setPasswordField
@Deprecated public MongoAuth setPasswordField(String fieldName)
Deprecated.- Parameters:
fieldName- the name of the field to be used- Returns:
- the current instance itself for fluent calls
-
setRoleField
@Deprecated public MongoAuth setRoleField(String fieldName)
Deprecated.- Parameters:
fieldName- the name of the field to be used- Returns:
- the current instance itself for fluent calls
-
setPermissionField
@Deprecated public MongoAuth setPermissionField(String fieldName)
Deprecated.- Parameters:
fieldName- the name of the field to be used- Returns:
- the current instance itself for fluent calls
-
setUsernameCredentialField
@Deprecated public MongoAuth setUsernameCredentialField(String fieldName)
Deprecated.- Parameters:
fieldName- the name of the field to be used- Returns:
- the current instance itself for fluent calls
-
setPasswordCredentialField
@Deprecated public MongoAuth setPasswordCredentialField(String fieldName)
Deprecated.- Parameters:
fieldName- the name of the field to be used- Returns:
- the current instance itself for fluent calls
-
setSaltField
@Deprecated public MongoAuth setSaltField(String fieldName)
Deprecated.- Parameters:
fieldName- the name of the field to be used- Returns:
- the current instance itself for fluent calls
-
getCollectionName
@Deprecated public String getCollectionName()
Deprecated.- Returns:
- the collectionName
-
getUsernameField
@Deprecated public String getUsernameField()
Deprecated.- Returns:
- the usernameField
-
getPasswordField
@Deprecated public String getPasswordField()
Deprecated.- Returns:
- the passwordField
-
getRoleField
@Deprecated public String getRoleField()
Deprecated.- Returns:
- the roleField
-
getPermissionField
@Deprecated public String getPermissionField()
Deprecated.- Returns:
- the permissionField
-
getUsernameCredentialField
@Deprecated public String getUsernameCredentialField()
Deprecated.- Returns:
- the usernameCredentialField
-
getPasswordCredentialField
@Deprecated public String getPasswordCredentialField()
Deprecated.- Returns:
- the passwordCredentialField
-
getSaltField
@Deprecated public String getSaltField()
Deprecated.- Returns:
- the saltField
-
setHashStrategy
@Deprecated public MongoAuth setHashStrategy(HashStrategy hashStrategy)
Deprecated.- Parameters:
hashStrategy- theHashStrategyto be set- Returns:
- the current instance itself for fluent calls
-
getHashStrategy
@Deprecated public HashStrategy getHashStrategy()
Deprecated.- Returns:
- the defined instance of
HashStrategy
-
setHashAlgorithm
@Deprecated public MongoAuth setHashAlgorithm(io.vertx.ext.auth.mongo.HashAlgorithm hashAlgorithm)
Deprecated.- Parameters:
hashAlgorithm- theHashAlgorithmto be set- Returns:
- the current instance itself for fluent calls
-
insertUser
@Deprecated public io.smallrye.mutiny.Uni<String> insertUser(String username, String password, List<String> roles, List<String> permissions)
Deprecated.Insert a new user into mongo in the convenient wayUnlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
username- the username to be setpassword- the passsword in clear text, will be adapted following the definitions of the definedHashStrategyroles- a list of roles to be setpermissions- a list of permissions to be set- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
insertUserAndAwait
@Deprecated public String insertUserAndAwait(String username, String password, List<String> roles, List<String> permissions)
Deprecated.Blocking variant ofio.vertx.mutiny.ext.auth.mongo.MongoAuth#insertUser(String,String,List.,List ) This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
username- the username to be setpassword- the passsword in clear text, will be adapted following the definitions of the definedHashStrategyroles- a list of roles to be setpermissions- a list of permissions to be set- Returns:
- the String instance produced by the operation.
-
insertUserAndForget
@Deprecated public void insertUserAndForget(String username, String password, List<String> roles, List<String> permissions)
Deprecated.Variant ofio.vertx.mutiny.ext.auth.mongo.MongoAuth#insertUser(String,String,Listthat ignores the result of the operation.,List ) This method subscribes on the result of
io.vertx.mutiny.ext.auth.mongo.MongoAuth#insertUser(String,String,List, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from,List ) io.vertx.mutiny.ext.auth.mongo.MongoAuth#insertUser(String,String,Listbut you don't need to compose it with other operations.,List ) - Parameters:
username- the username to be setpassword- the passsword in clear text, will be adapted following the definitions of the definedHashStrategyroles- a list of roles to be setpermissions- a list of permissions to be set
-
newInstance
public static MongoAuth newInstance(io.vertx.ext.auth.mongo.MongoAuth arg)
-
-