Class PasswordManager
- java.lang.Object
-
- org.camunda.bpm.engine.impl.digest.PasswordManager
-
public class PasswordManager extends java.lang.Object
Different Camunda versions use different hashing algorithms. In addition, it is possible to add a custom hashing algorithm. ThePasswordManager
ensures that the right algorithm is used for the encryption. Default algorithms: Version: | Algorithm <= Camunda 7.6 | SHA1 >= Camunda 7.7 | SHA512
-
-
Field Summary
Fields Modifier and Type Field Description protected PasswordEncryptor
defaultPasswordEncryptor
static SecurityLogger
LOG
protected java.util.Map<java.lang.String,PasswordEncryptor>
passwordChecker
protected DatabasePrefixHandler
prefixHandler
-
Constructor Summary
Constructors Constructor Description PasswordManager(PasswordEncryptor defaultPasswordEncryptor, java.util.List<PasswordEncryptor> customPasswordChecker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAllPasswordChecker(java.util.List<PasswordEncryptor> list)
protected void
addDefaultEncryptor(PasswordEncryptor defaultPasswordEncryptor)
protected void
addPasswordCheckerAndThrowErrorIfAlreadyAvailable(PasswordEncryptor encryptor)
boolean
check(java.lang.String password, java.lang.String encrypted)
java.lang.String
encrypt(java.lang.String password)
protected PasswordEncryptor
getCorrectEncryptorForPassword(java.lang.String encryptedPassword)
-
-
-
Field Detail
-
LOG
public static final SecurityLogger LOG
-
passwordChecker
protected java.util.Map<java.lang.String,PasswordEncryptor> passwordChecker
-
defaultPasswordEncryptor
protected PasswordEncryptor defaultPasswordEncryptor
-
prefixHandler
protected DatabasePrefixHandler prefixHandler
-
-
Constructor Detail
-
PasswordManager
public PasswordManager(PasswordEncryptor defaultPasswordEncryptor, java.util.List<PasswordEncryptor> customPasswordChecker)
-
-
Method Detail
-
addAllPasswordChecker
protected void addAllPasswordChecker(java.util.List<PasswordEncryptor> list)
-
addPasswordCheckerAndThrowErrorIfAlreadyAvailable
protected void addPasswordCheckerAndThrowErrorIfAlreadyAvailable(PasswordEncryptor encryptor)
-
addDefaultEncryptor
protected void addDefaultEncryptor(PasswordEncryptor defaultPasswordEncryptor)
-
encrypt
public java.lang.String encrypt(java.lang.String password)
-
check
public boolean check(java.lang.String password, java.lang.String encrypted)
-
getCorrectEncryptorForPassword
protected PasswordEncryptor getCorrectEncryptorForPassword(java.lang.String encryptedPassword)
-
-