-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
status: ideal-for-contributionAn issue that we actively are looking for someone to help us withAn issue that we actively are looking for someone to help us withtype: bugA general bugA general bug
Milestone
Description
Describe the bug
In Cryptography - Password Encoding
page, a Java interface of PasswordEncoder
comes with a different signature from an actual implementation in 5.7.x
branch.
To Reproduce
- Browse to Cryptography - Password Encoding page.
- Browse to declaration of actual
PasswordEncoder
interface in the link above. - Visually compare
PasswordEncoder
interface between both source. - For
encode
method, it acceptsString
instead ofCharSequence
, for example.
Expected behavior
PasswordEncoder
should have correct signatures ofencode
andmatches
methods.PasswordEncoder
should contain default methodupgradeEncoding
.
Sample
// current declaration in the document (https://docs.spring.io/spring-security/reference/features/integrations/cryptography.html#spring-security-crypto-passwordencoders)
public interface PasswordEncoder {
String encode(String rawPassword);
boolean matches(String rawPassword, String encodedPassword);
}
// expected behavior/declaration
public interface PasswordEncoder {
String encode(CharSequence rawPassword);
boolean matches(CharSequence rawPassword, String encodedPassword);
default boolean upgradeEncoding(String encodedPassword) {
return false;
}
}
Metadata
Metadata
Assignees
Labels
status: ideal-for-contributionAn issue that we actively are looking for someone to help us withAn issue that we actively are looking for someone to help us withtype: bugA general bugA general bug