Skip to content

Commit a5dc48f

Browse files
committed
Improve PasswordEncoder deprecated notices
Fixes: gh-5296
1 parent 9b722a9 commit a5dc48f

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

core/src/main/java/org/springframework/security/core/userdetails/User.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ public static UserBuilder builder() {
326326
* @deprecated Using this method is not considered safe for production, but is
327327
* acceptable for demos and getting started. For production purposes, ensure the
328328
* password is encoded externally. See the method Javadoc for additional details.
329+
* There are no plans to remove this support. It is deprecated to indicate
330+
* that this is considered insecure for production purposes.
329331
*/
330332
@Deprecated
331333
public static UserBuilder withDefaultPasswordEncoder() {

crypto/src/main/java/org/springframework/security/crypto/password/LdapShaPasswordEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
* @deprecated Digest based password encoding is not considered secure. Instead use an
4040
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
4141
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
42-
* password upgrades.
42+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
43+
* that this is a legacy implementation and using it is considered insecure.
4344
*/
4445
@Deprecated
4546
public class LdapShaPasswordEncoder implements PasswordEncoder {

crypto/src/main/java/org/springframework/security/crypto/password/Md4PasswordEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
* @deprecated Digest based password encoding is not considered secure. Instead use an
7474
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
7575
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
76-
* password upgrades.
76+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
77+
* that this is a legacy implementation and using it is considered insecure.
7778
*/
7879
@Deprecated
7980
public class Md4PasswordEncoder implements PasswordEncoder {

crypto/src/main/java/org/springframework/security/crypto/password/MessageDigestPasswordEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
* @deprecated Digest based password encoding is not considered secure. Instead use an
7777
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
7878
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
79-
* password upgrades.
79+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
80+
* that this is a legacy implementation and using it is considered insecure.
8081
*/
8182
@Deprecated
8283
public class MessageDigestPasswordEncoder implements PasswordEncoder {

crypto/src/main/java/org/springframework/security/crypto/password/StandardPasswordEncoder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@
4141
* @author Keith Donald
4242
* @author Luke Taylor
4343
* @deprecated Digest based password encoding is not considered secure. Instead use an
44-
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
44+
* adaptive one way function like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
4545
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
46-
* password upgrades.
46+
* password upgrades. There are no plans to remove this support. It is deprecated to indicate
47+
* that this is a legacy implementation and using it is considered insecure.
4748
*/
4849
@Deprecated
4950
public final class StandardPasswordEncoder implements PasswordEncoder {

0 commit comments

Comments
 (0)