Interface CredentialReset


public interface CredentialReset
Implementations provide a credential reset functionality. Typically are bound to a particular credential type. Additionally implementation instances must be stateful and maintain an identity for which the reset is performed.
Author:
K. Benedyczak
  • Method Details

    • getSettings

      String getSettings()
      Returns:
      settings of credential reset
    • setSubject

      void setSubject(AuthenticationSubject subject)
      Sets the subject for which the operations are made.
    • getSecurityQuestion

      String getSecurityQuestion()
      Returns:
      the question for the subject, which must be set before. If the question is not defined, a random question is returned, from the configured ones.
    • verifyStaticData

      void verifyStaticData(String aswer) throws pl.edu.icm.unity.base.exceptions.WrongArgumentException, pl.edu.icm.unity.base.identity.IllegalIdentityValueException, TooManyAttempts
      Verifies if the static data is about the subject is correct. Currently only the security question answer.
      Parameters:
      aswer -
      Throws:
      pl.edu.icm.unity.base.exceptions.WrongArgumentException
      pl.edu.icm.unity.base.identity.IllegalIdentityValueException
      TooManyAttempts
    • verifyDynamicData

      void verifyDynamicData(String emailCode) throws pl.edu.icm.unity.base.exceptions.WrongArgumentException, TooManyAttempts
      Verifies if the dynamic data about the subject is correct. Currently only the email code.
      Parameters:
      emailCode -
      Throws:
      pl.edu.icm.unity.base.exceptions.WrongArgumentException
      TooManyAttempts
    • sendCode

      void sendCode(String messageTemplateId, boolean onlyNumberCode) throws pl.edu.icm.unity.base.exceptions.EngineException
      Sends a random confirmation code to the receiver.
      Throws:
      pl.edu.icm.unity.base.exceptions.EngineException
    • getCredentialConfiguration

      String getCredentialConfiguration()
      Returns:
      JSON with the current credential configuration of the subject
    • updateCredential

      void updateCredential(String newCredential) throws pl.edu.icm.unity.base.exceptions.EngineException
      Changes the credential to a new one.
      Parameters:
      newCredential - new credential, typically encoded in credential specific way.
      Throws:
      pl.edu.icm.unity.base.exceptions.EngineException
    • getEntityId

      Long getEntityId()
      Get credential owner entity id
      Returns: