Class PasswordVerificator
java.lang.Object
pl.edu.icm.unity.engine.api.authn.AbstractVerificator
pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator
pl.edu.icm.unity.stdext.credential.pass.PasswordVerificator
- All Implemented Interfaces:
pl.edu.icm.unity.base.describedObject.DescribedObject,pl.edu.icm.unity.base.describedObject.NamedObject,pl.edu.icm.unity.engine.api.authn.CredentialExchange,pl.edu.icm.unity.engine.api.authn.CredentialVerificator,pl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator,pl.edu.icm.unity.engine.api.utils.StringConfigurable,PasswordExchange
public class PasswordVerificator
extends pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator
implements PasswordExchange
Ordinary password credential verificator. Supports all settings from
PasswordCredential.
Additionally configuration of the credential may allow for password reset feature. Then are stored email verification settings, security question settings and confirmation code length.
- Author:
- K. Benedyczak
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialVerificator
pl.edu.icm.unity.engine.api.authn.CredentialVerificator.VerificatorType -
Field Summary
FieldsFields inherited from class pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator
credentialNameFields inherited from class pl.edu.icm.unity.engine.api.authn.AbstractVerificator
identityResolver, instanceNameFields inherited from interface pl.edu.icm.unity.stdext.credential.pass.PasswordExchange
ID -
Constructor Summary
ConstructorsConstructorDescriptionPasswordVerificator(pl.edu.icm.unity.engine.api.notification.NotificationProducer notificationProducer, pl.edu.icm.unity.engine.api.authn.local.CredentialHelper credentialHelper, Optional<PasswordEncodingPoolProvider> threadPoolProvider) -
Method Summary
Modifier and TypeMethodDescriptionpl.edu.icm.unity.base.authn.CredentialPublicInformationcheckCredentialState(String currentCredential) pl.edu.icm.unity.engine.api.authn.AuthenticationResultcheckPassword(String username, String password, String formForUnknown, boolean enableAssociation, pl.edu.icm.unity.engine.api.authn.remote.AuthenticationTriggeringContext triggeringContext) Checks if the provided password is valid.static List<edu.vt.middleware.password.CharacterRule>pl.edu.icm.unity.engine.api.authn.CredentialResetstatic List<edu.vt.middleware.password.Rule>invalidate(String currentCredential) booleanisCredentialDefinitionChagneOutdatingCredentials(String newCredentialDefinition) booleanisCredentialSet(pl.edu.icm.unity.base.entity.EntityParam entity) prepareCredential(String rawCredential, String currentCredential, boolean verify) The rawCredential must be in JSON format, seePasswordTokenfor details.voidupdateCredentialAfterConfigurationChange(String currentCredential) Methods inherited from class pl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator
getCredentialName, getType, isSupportingInvalidation, setCredentialNameMethods inherited from class pl.edu.icm.unity.engine.api.authn.AbstractVerificator
getDescription, getExchangeId, getName, setIdentityResolver, setInstanceNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialExchange
getExchangeIdMethods inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialVerificator
setIdentityResolver, setInstanceNameMethods inherited from interface pl.edu.icm.unity.base.describedObject.DescribedObject
getDescriptionMethods inherited from interface pl.edu.icm.unity.base.describedObject.NamedObject
getName
-
Field Details
-
NAME
- See Also:
-
DESC
- See Also:
-
IDENTITY_TYPES
-
-
Constructor Details
-
PasswordVerificator
@Autowired public PasswordVerificator(pl.edu.icm.unity.engine.api.notification.NotificationProducer notificationProducer, pl.edu.icm.unity.engine.api.authn.local.CredentialHelper credentialHelper, Optional<PasswordEncodingPoolProvider> threadPoolProvider)
-
-
Method Details
-
getSerializedConfiguration
public String getSerializedConfiguration() throws pl.edu.icm.unity.base.exceptions.InternalException- Specified by:
getSerializedConfigurationin interfacepl.edu.icm.unity.engine.api.utils.StringConfigurable- Throws:
pl.edu.icm.unity.base.exceptions.InternalException
-
setSerializedConfiguration
public void setSerializedConfiguration(String json) throws pl.edu.icm.unity.base.exceptions.InternalException - Specified by:
setSerializedConfigurationin interfacepl.edu.icm.unity.engine.api.utils.StringConfigurable- Throws:
pl.edu.icm.unity.base.exceptions.InternalException
-
prepareCredential
public String prepareCredential(String rawCredential, String currentCredential, boolean verify) throws pl.edu.icm.unity.engine.api.authn.IllegalCredentialException, pl.edu.icm.unity.base.exceptions.InternalException The rawCredential must be in JSON format, seePasswordTokenfor details.- Specified by:
prepareCredentialin interfacepl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator- Throws:
pl.edu.icm.unity.engine.api.authn.IllegalCredentialExceptionpl.edu.icm.unity.base.exceptions.InternalException
-
invalidate
- Specified by:
invalidatein interfacepl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator
-
checkCredentialState
public pl.edu.icm.unity.base.authn.CredentialPublicInformation checkCredentialState(String currentCredential) throws pl.edu.icm.unity.base.exceptions.InternalException - Specified by:
checkCredentialStatein interfacepl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator- Throws:
pl.edu.icm.unity.base.exceptions.InternalException
-
updateCredentialAfterConfigurationChange
- Specified by:
updateCredentialAfterConfigurationChangein interfacepl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator- Overrides:
updateCredentialAfterConfigurationChangein classpl.edu.icm.unity.engine.api.authn.local.AbstractLocalVerificator
-
checkPassword
public pl.edu.icm.unity.engine.api.authn.AuthenticationResult checkPassword(String username, String password, String formForUnknown, boolean enableAssociation, pl.edu.icm.unity.engine.api.authn.remote.AuthenticationTriggeringContext triggeringContext) Checks if the provided password is valid. If it is then it is checked if it is still fulfilling all actual rules of the credential's configuration. If not then it is returned that credential state is outdated.- Specified by:
checkPasswordin interfacePasswordExchange
-
getCredentialResetBackend
public pl.edu.icm.unity.engine.api.authn.CredentialReset getCredentialResetBackend()- Specified by:
getCredentialResetBackendin interfacePasswordExchange- Returns:
- credential reset backend
-
isCredentialDefinitionChagneOutdatingCredentials
- Specified by:
isCredentialDefinitionChagneOutdatingCredentialsin interfacepl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator
-
getCharacteristicsRules
-
getSequencesRules
-
isCredentialSet
public boolean isCredentialSet(pl.edu.icm.unity.base.entity.EntityParam entity) throws pl.edu.icm.unity.base.exceptions.EngineException - Specified by:
isCredentialSetin interfacepl.edu.icm.unity.engine.api.authn.local.LocalCredentialVerificator- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-