Update this simple example for 8.0.0 release
Check my question on Stackoverflow https://stackoverflow.com/questions/59040133/keycloak-example-the-method-getvalue-is-undefined-for-the-type-usercredentia?answertab=oldest#tab-top
This commit is contained in:
parent
3a962b4d7a
commit
cf7a35b1dd
1 changed files with 2 additions and 3 deletions
|
@ -111,12 +111,11 @@ Next let's look at the method implementations for `CredentialInputValidator`.
|
|||
|
||||
@Override
|
||||
public boolean isValid(RealmModel realm, UserModel user, CredentialInput input) {
|
||||
if (!supportsCredentialType(input.getType()) || !(input instanceof UserCredentialModel)) return false;
|
||||
if (!supportsCredentialType(input.getType())) return false;
|
||||
|
||||
UserCredentialModel cred = (UserCredentialModel)input;
|
||||
String password = properties.getProperty(user.getUsername());
|
||||
if (password == null) return false;
|
||||
return password.equals(cred.getValue());
|
||||
return password.equals(input.getChallengeResponse());
|
||||
}
|
||||
----
|
||||
|
||||
|
|
Loading…
Reference in a new issue