Class OneTimePasswordCredential

  • All Implemented Interfaces:
    java.io.Serializable, org.apereo.cas.authentication.Credential, org.apereo.cas.authentication.CredentialMetaData

    public class OneTimePasswordCredential
    extends BasicIdentifiableCredential
    Describes a one-time-password credential that contains an optional unique identifier and required password. The primary difference between this component and UsernamePasswordCredential is that the username/ID is optional in the former and requisite in the latter.

    This class implements CredentialMetaData since the one-time-password is safe for long-term storage after authentication. Note that metadata is stored only _after_ authentication, at which time the OTP has already been consumed and by definition is no longer useful for authentication.

    Since:
    4.0.0
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from interface org.apereo.cas.authentication.Credential

        CREDENTIAL_TYPE_ATTRIBUTE, UNKNOWN_ID
    • Constructor Summary

      Constructors 
      Constructor Description
      OneTimePasswordCredential​(java.lang.String id, java.lang.String password)  
    • Method Summary

      • Methods inherited from interface org.apereo.cas.authentication.Credential

        getId
      • Methods inherited from interface org.apereo.cas.authentication.CredentialMetaData

        getId
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OneTimePasswordCredential

        public OneTimePasswordCredential​(java.lang.String id,
                                         java.lang.String password)