-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,9 +30,10 @@ | |
*/ | ||
public class CustomPasswordEncoderFactory { | ||
|
||
public static Map<String, PasswordEncoder> createDelegatingPasswordEncoder() { | ||
public static PasswordEncoder createDelegatingPasswordEncoder() { | ||
String encodingId = "bcrypt"; | ||
Map<String, PasswordEncoder> encoders = new HashMap<>(); | ||
encoders.put("bcrypt", new BCryptPasswordEncoder()); | ||
encoders.put(encodingId, new BCryptPasswordEncoder()); | ||
encoders.put("ldap", new org.springframework.security.crypto.password.LdapShaPasswordEncoder()); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("MD4", new org.springframework.security.crypto.password.Md4PasswordEncoder()); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("MD5", new org.springframework.security.crypto.password.MessageDigestPasswordEncoder("MD5")); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
|
@@ -50,7 +51,7 @@ public static Map<String, PasswordEncoder> createDelegatingPasswordEncoder() { | |
new org.springframework.security.crypto.password.MessageDigestPasswordEncoder("SHA-256")); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("sha256", new org.springframework.security.crypto.password.StandardPasswordEncoder()); | ||
Check failure Code scanning / SonarCloud Passwords should not be stored in plaintext or with a fast hashing algorithm High
Use secure "PasswordEncoder" implementation. See more on SonarCloud
|
||
encoders.put("argon2", new Argon2PasswordEncoder()); | ||
return encoders; | ||
return new DelegatingPasswordEncoder(encodingId, encoders); | ||
} | ||
|
||
} |