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.
CredentialVerificator.VerificatorType
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 |
isCredentialSet(pl.edu.icm.unity.types.basic.EntityParam entity)
Check if credential is set
|
boolean |
isSupportingInvalidation() |
String |
prepareCredential(String rawCredential,
String currentCredential,
boolean verifyNew)
Prepares the credential for DB insertion.
|
void |
setCredentialName(String credential)
Sets credential definition name for this verificator.
|
getType, setIdentityResolver, setInstanceName
getExchangeId
getSerializedConfiguration, setSerializedConfiguration
String getCredentialName()
void setCredentialName(String credential)
credential
- String prepareCredential(String rawCredential, String currentCredential, boolean verifyNew) throws pl.edu.icm.unity.exceptions.IllegalCredentialException, pl.edu.icm.unity.exceptions.InternalException
rawCredential
- the new credential valuecurrentCredential
- the existing credential, encoded in the database specific way. May be empty or
null, when there is no existing credential recorded in DB.verifyNew
- we can set new credential without its verificationpl.edu.icm.unity.exceptions.IllegalCredentialException
- if the new credential is not validpl.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.String invalidate(String currentCredential)
currentCredential
- the current credential value as stored in DB.boolean isCredentialSet(pl.edu.icm.unity.types.basic.EntityParam entity) throws pl.edu.icm.unity.exceptions.EngineException
entity
- credentialId
- pl.edu.icm.unity.exceptions.EngineException
Copyright © 2018 Unity. All rights reserved.