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 |
isCredentialDefinitionChagneOutdatingCredentials(String newCredentialDefinition)
Should check if change of credential definition (config) from the currently set to the given as argument
may render credential instances invalid or not.
|
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.
|
Optional<String> |
updateCredentialAfterConfigurationChange(String currentCredential)
Returns optionally changed argument credential, which can be transformed after the change of
configuration.
|
getType, setIdentityResolver, setInstanceName
getExchangeId
getSerializedConfiguration, setSerializedConfiguration
String getCredentialName()
void setCredentialName(String 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
Optional<String> updateCredentialAfterConfigurationChange(String currentCredential)
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
pl.edu.icm.unity.exceptions.EngineException
boolean isCredentialDefinitionChagneOutdatingCredentials(String newCredentialDefinition)
Copyright © 2019 Unity. All rights reserved.