Replaced deprecated CredentialModel.PASSWORD (#1014)
According to the JavaDoc in the code, CredentialModel.PASSWORD is deprecated, instead, PasswordCredentialModel.TYPE should be used.
This commit is contained in:
parent
c47ba98b52
commit
4d43128465
1 changed files with 3 additions and 3 deletions
|
@ -101,12 +101,12 @@ Next let's look at the method implementations for `CredentialInputValidator`.
|
|||
@Override
|
||||
public boolean isConfiguredFor(RealmModel realm, UserModel user, String credentialType) {
|
||||
String password = properties.getProperty(user.getUsername());
|
||||
return credentialType.equals(CredentialModel.PASSWORD) && password != null;
|
||||
return credentialType.equals(PasswordCredentialModel.TYPE) && password != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsCredentialType(String credentialType) {
|
||||
return credentialType.equals(CredentialModel.PASSWORD);
|
||||
return credentialType.equals(PasswordCredentialModel.TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -133,7 +133,7 @@ As noted before, the only reason we implement the `CredentialInputUpdater` inter
|
|||
----
|
||||
@Override
|
||||
public boolean updateCredential(RealmModel realm, UserModel user, CredentialInput input) {
|
||||
if (input.getType().equals(CredentialModel.PASSWORD)) throw new ReadOnlyException("user is read only for this update");
|
||||
if (input.getType().equals(PasswordCredentialModel.TYPE)) throw new ReadOnlyException("user is read only for this update");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue