public interface LocalCredentialVerificator extends CredentialVerificator
Those two aspects are merged into one implementation on purpose: both local credential verification and storage of credential data in database is tightly bound together. E.g. password hashed and salted in the DB must be verified using the same hashing and salting.
The information about the supported CredentialType
is created automatically from the name and description
of this object implementation.
Modifier and Type | Method and Description |
---|---|
pl.edu.icm.unity.types.authn.CredentialPublicInformation |
checkCredentialState(String currentCredential) |
String |
getCredentialName() |
String |
invalidate(String currentCredential)
This method is called only for credentials supporting invalidation.
|
boolean |
isSupportingInvalidation() |
String |
prepareCredential(String rawCredential,
String currentCredential)
As
prepareCredential(String, String, String) but called whenever verification
of the existing password is not required. |
String |
prepareCredential(String rawCredential,
String previousCredential,
String currentCredential)
Prepares the credential for DB insertion.
|
void |
setCredentialName(String credential)
Sets credential definition name for this verificator.
|
setIdentityResolver, setInstanceName
getExchangeId
getSerializedConfiguration, setSerializedConfiguration
String getCredentialName()
void setCredentialName(String credential)
credential
- String prepareCredential(String rawCredential, String previousCredential, String currentCredential) throws pl.edu.icm.unity.exceptions.IllegalCredentialException, pl.edu.icm.unity.exceptions.InternalException
rawCredential
- the new credential valuepreviousCredential
- the existing credential value. It is only used to recheck
the credential before the sensitive credential check operation. In some cases it can be
not needed, then is ignored.currentCredential
- the existing credential, encoded in the database specific way. May be empty or
null, when there is no existing credential recorded in DB.pl.edu.icm.unity.exceptions.IllegalCredentialException
- if the new credential is not validpl.edu.icm.unity.exceptions.InternalException
String prepareCredential(String rawCredential, String currentCredential) throws pl.edu.icm.unity.exceptions.IllegalCredentialException, pl.edu.icm.unity.exceptions.InternalException
prepareCredential(String, String, String)
but called whenever verification
of the existing password is not required.rawCredential
- currentCredential
- pl.edu.icm.unity.exceptions.IllegalCredentialException
pl.edu.icm.unity.exceptions.InternalException
pl.edu.icm.unity.types.authn.CredentialPublicInformation checkCredentialState(String currentCredential) throws pl.edu.icm.unity.exceptions.InternalException
currentCredential
- current credential as recorded in databasepl.edu.icm.unity.exceptions.InternalException
boolean isSupportingInvalidation()
LocalCredentialState.outdated
state.Copyright © 2017 Unity. All rights reserved.