Class PasswordUtils
java.lang.Object
ch.tocco.nice2.userbase.impl.auth.PasswordUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isPasswordEqual
(PasswordEncoder passwordEncoder, PrincipalDetails principalDetails, UsernamePasswordCredentials creds) static boolean
isPasswordEqual
(PasswordEncoder encoder, UsernamePasswordCredentials credentials, @Nullable Object password) Checks the equality of the plain text password fromcredentials
and the hashed passwordpassword
using the specifiedPasswordEncoder
.
-
Method Details
-
isPasswordEqual
public static boolean isPasswordEqual(PasswordEncoder passwordEncoder, PrincipalDetails principalDetails, UsernamePasswordCredentials creds) -
isPasswordEqual
public static boolean isPasswordEqual(PasswordEncoder encoder, UsernamePasswordCredentials credentials, @Nullable @Nullable Object password) Checks the equality of the plain text password fromcredentials
and the hashed passwordpassword
using the specifiedPasswordEncoder
. If the targetpassword
isnull
,false
is returned.
-