Class BasicPasswordEncoder
-
- All Implemented Interfaces:
-
org.springframework.security.crypto.password.PasswordEncoder
public class BasicPasswordEncoder implements PasswordEncoderA compromise between BasicAuthentication and DigestAuthentication to avoid sending plaintext password. Use the password to md5sum the current timestamp, then send the timestamp and md5sum instead of a password. Requires the timestamp to be within 3 minutes of the server. timestamp - form 1970 in ms password - user password md5_hash = md5($timestamp + "#" + $password) token = $timestamp + "#" + $md5_hash Authorization:"Basic base64_url_safe($username + ":" + $token)"- Since:
2021-02-27
trydofor
-
-
Constructor Summary
Constructors Constructor Description BasicPasswordEncoder(long deviation)
-
Method Summary
Modifier and Type Method Description Stringencode(CharSequence rawPassword)booleanmatches(CharSequence rawPassword, String encodedPassword)-
-
Method Detail
-
encode
String encode(CharSequence rawPassword)
-
matches
boolean matches(CharSequence rawPassword, String encodedPassword)
-
-
-
-