Package app.kntrl.client.openapi.model
Class PasswordAuthCfg
- java.lang.Object
-
- app.kntrl.client.openapi.model.PasswordAuthCfg
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class PasswordAuthCfg extends java.lang.ObjectPassword authentication. To enable this auth set auth name to \"password\" or use \"builtin\": \"password\" param.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPasswordAuthCfg.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static java.util.HashSet<java.lang.String>openapiFieldsstatic java.util.HashSet<java.lang.String>openapiRequiredFieldsstatic java.lang.StringSERIALIZED_NAME_BURN_QUOTAstatic java.lang.StringSERIALIZED_NAME_FORBID_COMMON_PASSWORDSstatic java.lang.StringSERIALIZED_NAME_FORBID_LOGIN_AS_PASSWORDstatic java.lang.StringSERIALIZED_NAME_FORBID_REUSING_PASSWORDstatic java.lang.StringSERIALIZED_NAME_MAX_LENGTHstatic java.lang.StringSERIALIZED_NAME_MIN_LENGTHstatic java.lang.StringSERIALIZED_NAME_RATE_LIMITERstatic java.lang.StringSERIALIZED_NAME_REQUIRE_NUMBERstatic java.lang.StringSERIALIZED_NAME_REQUIRE_SYMBOLstatic java.lang.StringSERIALIZED_NAME_REQUIRE_UPPER_CASEstatic java.lang.StringSERIALIZED_NAME_REQUIRES_AUTHstatic java.lang.StringSERIALIZED_NAME_SKIP_ON_FAILstatic java.lang.StringSERIALIZED_NAME_STRENGTH
-
Constructor Summary
Constructors Constructor Description PasswordAuthCfg()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordAuthCfgaddRequiresAuthItem(java.util.List<java.lang.String> requiresAuthItem)PasswordAuthCfgburnQuota(java.lang.Double burnQuota)booleanequals(java.lang.Object o)PasswordAuthCfgforbidCommonPasswords(java.lang.Boolean forbidCommonPasswords)PasswordAuthCfgforbidLoginAsPassword(java.lang.Boolean forbidLoginAsPassword)PasswordAuthCfgforbidReusingPassword(PasswordHistoryCfg forbidReusingPassword)static PasswordAuthCfgfromJson(java.lang.String jsonString)Create an instance of PasswordAuthCfg given an JSON stringjava.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()Return the additional (undeclared) property.java.lang.ObjectgetAdditionalProperty(java.lang.String key)Return the additional (undeclared) property with the specified name.java.lang.DoublegetBurnQuota()Every auth execution will burn this amount of quota.java.lang.BooleangetForbidCommonPasswords()Password will be checked against table 1,000,000 of most overused passwords.java.lang.BooleangetForbidLoginAsPassword()Rejects passwords that match username, email, anything that used as a login according to logins config.PasswordHistoryCfggetForbidReusingPassword()Get forbidReusingPasswordjava.lang.IntegergetMaxLength()Max allowed Length of the password.java.lang.IntegergetMinLength()Minimal length of passwordjava.lang.StringgetRateLimiter()Apply rate limiter for this auth.java.lang.BooleangetRequireNumber()Require password to contain at least one digit.java.util.List<java.util.List<java.lang.String>>getRequiresAuth()If this is not null, app forbids to add this auth until listed auth enabled.java.lang.BooleangetRequireSymbol()Require password to contain at least one symbol e.g.java.lang.BooleangetRequireUpperCase()This requires password to contain both lowercase and uppercase letters.java.lang.BooleangetSkipOnFail()When this is set to true app will attempt next auth in case of error on current.java.util.Map<java.lang.String,PasswordStrengthRequirements>getStrength()Allows to calculate password strength based on mentioned criteria.inthashCode()PasswordAuthCfgmaxLength(java.lang.Integer maxLength)PasswordAuthCfgminLength(java.lang.Integer minLength)PasswordAuthCfgputAdditionalProperty(java.lang.String key, java.lang.Object value)Set the additional (undeclared) property with the specified name and value.PasswordAuthCfgputStrengthItem(java.lang.String key, PasswordStrengthRequirements strengthItem)PasswordAuthCfgrateLimiter(java.lang.String rateLimiter)PasswordAuthCfgrequireNumber(java.lang.Boolean requireNumber)PasswordAuthCfgrequiresAuth(java.util.List<java.util.List<java.lang.String>> requiresAuth)PasswordAuthCfgrequireSymbol(java.lang.Boolean requireSymbol)PasswordAuthCfgrequireUpperCase(java.lang.Boolean requireUpperCase)voidsetBurnQuota(java.lang.Double burnQuota)voidsetForbidCommonPasswords(java.lang.Boolean forbidCommonPasswords)voidsetForbidLoginAsPassword(java.lang.Boolean forbidLoginAsPassword)voidsetForbidReusingPassword(PasswordHistoryCfg forbidReusingPassword)voidsetMaxLength(java.lang.Integer maxLength)voidsetMinLength(java.lang.Integer minLength)voidsetRateLimiter(java.lang.String rateLimiter)voidsetRequireNumber(java.lang.Boolean requireNumber)voidsetRequiresAuth(java.util.List<java.util.List<java.lang.String>> requiresAuth)voidsetRequireSymbol(java.lang.Boolean requireSymbol)voidsetRequireUpperCase(java.lang.Boolean requireUpperCase)voidsetSkipOnFail(java.lang.Boolean skipOnFail)voidsetStrength(java.util.Map<java.lang.String,PasswordStrengthRequirements> strength)PasswordAuthCfgskipOnFail(java.lang.Boolean skipOnFail)PasswordAuthCfgstrength(java.util.Map<java.lang.String,PasswordStrengthRequirements> strength)java.lang.StringtoJson()Convert an instance of PasswordAuthCfg to an JSON stringjava.lang.StringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_REQUIRES_AUTH
public static final java.lang.String SERIALIZED_NAME_REQUIRES_AUTH
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SKIP_ON_FAIL
public static final java.lang.String SERIALIZED_NAME_SKIP_ON_FAIL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RATE_LIMITER
public static final java.lang.String SERIALIZED_NAME_RATE_LIMITER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_BURN_QUOTA
public static final java.lang.String SERIALIZED_NAME_BURN_QUOTA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MAX_LENGTH
public static final java.lang.String SERIALIZED_NAME_MAX_LENGTH
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MIN_LENGTH
public static final java.lang.String SERIALIZED_NAME_MIN_LENGTH
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REQUIRE_NUMBER
public static final java.lang.String SERIALIZED_NAME_REQUIRE_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REQUIRE_SYMBOL
public static final java.lang.String SERIALIZED_NAME_REQUIRE_SYMBOL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REQUIRE_UPPER_CASE
public static final java.lang.String SERIALIZED_NAME_REQUIRE_UPPER_CASE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FORBID_COMMON_PASSWORDS
public static final java.lang.String SERIALIZED_NAME_FORBID_COMMON_PASSWORDS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FORBID_LOGIN_AS_PASSWORD
public static final java.lang.String SERIALIZED_NAME_FORBID_LOGIN_AS_PASSWORD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FORBID_REUSING_PASSWORD
public static final java.lang.String SERIALIZED_NAME_FORBID_REUSING_PASSWORD
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STRENGTH
public static final java.lang.String SERIALIZED_NAME_STRENGTH
- See Also:
- Constant Field Values
-
openapiFields
public static java.util.HashSet<java.lang.String> openapiFields
-
openapiRequiredFields
public static java.util.HashSet<java.lang.String> openapiRequiredFields
-
-
Method Detail
-
requiresAuth
public PasswordAuthCfg requiresAuth(java.util.List<java.util.List<java.lang.String>> requiresAuth)
-
addRequiresAuthItem
public PasswordAuthCfg addRequiresAuthItem(java.util.List<java.lang.String> requiresAuthItem)
-
getRequiresAuth
@Nullable public java.util.List<java.util.List<java.lang.String>> getRequiresAuth()
If this is not null, app forbids to add this auth until listed auth enabled. - if this a string -> require specified auth to be enabled before this. - array of strings -> require any of listed auths to be enabled - array of arrays of strings -> works as `[ [ \"auth1\" and \"auth2\" ] or [ \"auth1\" and \"auth2\" ] ]`- Returns:
- requiresAuth
-
setRequiresAuth
public void setRequiresAuth(java.util.List<java.util.List<java.lang.String>> requiresAuth)
-
skipOnFail
public PasswordAuthCfg skipOnFail(java.lang.Boolean skipOnFail)
-
getSkipOnFail
@Nullable public java.lang.Boolean getSkipOnFail()
When this is set to true app will attempt next auth in case of error on current. It's works good with IP auth. User can provide both IP auth request and SMS auth request. And SMS will be executed only when IP auth is failed. If set to false any error on this auth will stop the whole request execution.- Returns:
- skipOnFail
-
setSkipOnFail
public void setSkipOnFail(java.lang.Boolean skipOnFail)
-
rateLimiter
public PasswordAuthCfg rateLimiter(java.lang.String rateLimiter)
-
getRateLimiter
@Nullable public java.lang.String getRateLimiter()
Apply rate limiter for this auth.- Returns:
- rateLimiter
-
setRateLimiter
public void setRateLimiter(java.lang.String rateLimiter)
-
burnQuota
public PasswordAuthCfg burnQuota(java.lang.Double burnQuota)
-
getBurnQuota
@Nullable public java.lang.Double getBurnQuota()
Every auth execution will burn this amount of quota. Takes place only when rate limiter is specified- Returns:
- burnQuota
-
setBurnQuota
public void setBurnQuota(java.lang.Double burnQuota)
-
maxLength
public PasswordAuthCfg maxLength(java.lang.Integer maxLength)
-
getMaxLength
@Nullable public java.lang.Integer getMaxLength()
Max allowed Length of the password.- Returns:
- maxLength
-
setMaxLength
public void setMaxLength(java.lang.Integer maxLength)
-
minLength
public PasswordAuthCfg minLength(java.lang.Integer minLength)
-
getMinLength
@Nullable public java.lang.Integer getMinLength()
Minimal length of password- Returns:
- minLength
-
setMinLength
public void setMinLength(java.lang.Integer minLength)
-
requireNumber
public PasswordAuthCfg requireNumber(java.lang.Boolean requireNumber)
-
getRequireNumber
@Nullable public java.lang.Boolean getRequireNumber()
Require password to contain at least one digit.- Returns:
- requireNumber
-
setRequireNumber
public void setRequireNumber(java.lang.Boolean requireNumber)
-
requireSymbol
public PasswordAuthCfg requireSymbol(java.lang.Boolean requireSymbol)
-
getRequireSymbol
@Nullable public java.lang.Boolean getRequireSymbol()
Require password to contain at least one symbol e.g. @, !, &...- Returns:
- requireSymbol
-
setRequireSymbol
public void setRequireSymbol(java.lang.Boolean requireSymbol)
-
requireUpperCase
public PasswordAuthCfg requireUpperCase(java.lang.Boolean requireUpperCase)
-
getRequireUpperCase
@Nullable public java.lang.Boolean getRequireUpperCase()
This requires password to contain both lowercase and uppercase letters.- Returns:
- requireUpperCase
-
setRequireUpperCase
public void setRequireUpperCase(java.lang.Boolean requireUpperCase)
-
forbidCommonPasswords
public PasswordAuthCfg forbidCommonPasswords(java.lang.Boolean forbidCommonPasswords)
-
getForbidCommonPasswords
@Nullable public java.lang.Boolean getForbidCommonPasswords()
Password will be checked against table 1,000,000 of most overused passwords.- Returns:
- forbidCommonPasswords
-
setForbidCommonPasswords
public void setForbidCommonPasswords(java.lang.Boolean forbidCommonPasswords)
-
forbidLoginAsPassword
public PasswordAuthCfg forbidLoginAsPassword(java.lang.Boolean forbidLoginAsPassword)
-
getForbidLoginAsPassword
@Nullable public java.lang.Boolean getForbidLoginAsPassword()
Rejects passwords that match username, email, anything that used as a login according to logins config.- Returns:
- forbidLoginAsPassword
-
setForbidLoginAsPassword
public void setForbidLoginAsPassword(java.lang.Boolean forbidLoginAsPassword)
-
forbidReusingPassword
public PasswordAuthCfg forbidReusingPassword(PasswordHistoryCfg forbidReusingPassword)
-
getForbidReusingPassword
@Nullable public PasswordHistoryCfg getForbidReusingPassword()
Get forbidReusingPassword- Returns:
- forbidReusingPassword
-
setForbidReusingPassword
public void setForbidReusingPassword(PasswordHistoryCfg forbidReusingPassword)
-
strength
public PasswordAuthCfg strength(java.util.Map<java.lang.String,PasswordStrengthRequirements> strength)
-
putStrengthItem
public PasswordAuthCfg putStrengthItem(java.lang.String key, PasswordStrengthRequirements strengthItem)
-
getStrength
@Nullable public java.util.Map<java.lang.String,PasswordStrengthRequirements> getStrength()
Allows to calculate password strength based on mentioned criteria. Requirements will be checked one by one until first failed.- Returns:
- strength
-
setStrength
public void setStrength(java.util.Map<java.lang.String,PasswordStrengthRequirements> strength)
-
putAdditionalProperty
public PasswordAuthCfg putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
Return the additional (undeclared) property.
-
getAdditionalProperty
public java.lang.Object getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws java.io.IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
java.io.IOException- if the JSON Object is invalid with respect to PasswordAuthCfg
-
fromJson
public static PasswordAuthCfg fromJson(java.lang.String jsonString) throws java.io.IOException
Create an instance of PasswordAuthCfg given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PasswordAuthCfg
- Throws:
java.io.IOException- if the JSON string is invalid with respect to PasswordAuthCfg
-
toJson
public java.lang.String toJson()
Convert an instance of PasswordAuthCfg to an JSON string- Returns:
- JSON string
-
-