Deprecate NoOpPasswordEncoder

Issue: gh-2776
This commit is contained in:
Rob Winch 2017-10-22 09:54:24 -05:00
parent 52560b560d
commit a0e9eb3a64
1 changed files with 8 additions and 0 deletions

View File

@ -16,11 +16,19 @@
package org.springframework.security.crypto.password;
/**
* This {@link PasswordEncoder} is provided for legacy and testing purposes only and is
* not considered secure.
*
* A password encoder that does nothing. Useful for testing where working with plain text
* passwords may be preferred.
*
* @author Keith Donald
* @deprecated Digest based password encoding is not considered secure. Instead use an
* adaptive one way funciton like BCryptPasswordEncoder, Pbkdf2PasswordEncoder, or
* SCryptPasswordEncoder. Even better use {@link DelegatingPasswordEncoder} which supports
* password upgrades.
*/
@Deprecated
public final class NoOpPasswordEncoder implements PasswordEncoder {
public String encode(CharSequence rawPassword) {