Class BasicCredentialMetadata

java.lang.Object
org.apereo.cas.authentication.metadata.BasicCredentialMetadata
All Implemented Interfaces:
Serializable, org.apereo.cas.authentication.CredentialMetadata

public class BasicCredentialMetadata extends Object implements org.apereo.cas.authentication.CredentialMetadata
Basic credential metadata implementation that stores the original credential ID and the original credential type. This can be used as a simple converter for any Credential that doesn't implement CredentialMetadata.
Since:
4.0.0
See Also:
  • Constructor Details

    • BasicCredentialMetadata

      public BasicCredentialMetadata(org.apereo.cas.authentication.Credential credential, Map<String,? extends Serializable> properties)
    • BasicCredentialMetadata

      public BasicCredentialMetadata(org.apereo.cas.authentication.Credential credential)
    • BasicCredentialMetadata

      public BasicCredentialMetadata()
  • Method Details

    • putProperties

      @CanIgnoreReturnValue public org.apereo.cas.authentication.CredentialMetadata putProperties(Map<String,? extends Serializable> properties)
      Specified by:
      putProperties in interface org.apereo.cas.authentication.CredentialMetadata
    • putProperty

      @CanIgnoreReturnValue public org.apereo.cas.authentication.CredentialMetadata putProperty(String key, Serializable value)
      Specified by:
      putProperty in interface org.apereo.cas.authentication.CredentialMetadata
    • addTrait

      @CanIgnoreReturnValue public org.apereo.cas.authentication.CredentialMetadata addTrait(org.apereo.cas.authentication.CredentialTrait credentialTrait)
      Specified by:
      addTrait in interface org.apereo.cas.authentication.CredentialMetadata
    • removeTrait

      @CanIgnoreReturnValue public org.apereo.cas.authentication.CredentialMetadata removeTrait(Class<? extends org.apereo.cas.authentication.CredentialTrait> clazz)
      Specified by:
      removeTrait in interface org.apereo.cas.authentication.CredentialMetadata
    • getTrait

      public <T extends org.apereo.cas.authentication.CredentialTrait> Optional<T> getTrait(Class<T> clazz)
      Specified by:
      getTrait in interface org.apereo.cas.authentication.CredentialMetadata
    • containsProperty

      public boolean containsProperty(String key)
      Specified by:
      containsProperty in interface org.apereo.cas.authentication.CredentialMetadata
    • getId

      public String getId()
      Credential type unique identifier.
      Specified by:
      getId in interface org.apereo.cas.authentication.CredentialMetadata
    • getCredentialClass

      public Class<? extends org.apereo.cas.authentication.Credential> getCredentialClass()
      Type of original credential.
      Specified by:
      getCredentialClass in interface org.apereo.cas.authentication.CredentialMetadata
    • getTraits

      public List<org.apereo.cas.authentication.CredentialTrait> getTraits()
    • getProperties

      public Map<String,Serializable> getProperties()
      Specified by:
      getProperties in interface org.apereo.cas.authentication.CredentialMetadata
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object