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:
-
Field Summary
Fields inherited from interface org.apereo.cas.authentication.CredentialMetadata
PROPERTY_GEO_LOCATION, PROPERTY_USER_AGENT -
Constructor Summary
ConstructorsConstructorDescriptionBasicCredentialMetadata(org.apereo.cas.authentication.Credential credential) BasicCredentialMetadata(org.apereo.cas.authentication.Credential credential, Map<String, ? extends Serializable> properties) -
Method Summary
Modifier and TypeMethodDescriptionorg.apereo.cas.authentication.CredentialMetadataaddTrait(org.apereo.cas.authentication.CredentialTrait credentialTrait) booleancontainsProperty(String key) booleanClass<? extends org.apereo.cas.authentication.Credential> Type of original credential.getId()Credential type unique identifier.<T extends org.apereo.cas.authentication.CredentialTrait>
Optional<T> List<org.apereo.cas.authentication.CredentialTrait> inthashCode()org.apereo.cas.authentication.CredentialMetadataputProperties(Map<String, ? extends Serializable> properties) org.apereo.cas.authentication.CredentialMetadataputProperty(String key, Serializable value) org.apereo.cas.authentication.CredentialMetadataremoveTrait(Class<? extends org.apereo.cas.authentication.CredentialTrait> clazz)
-
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:
putPropertiesin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
putProperty
@CanIgnoreReturnValue public org.apereo.cas.authentication.CredentialMetadata putProperty(String key, Serializable value) - Specified by:
putPropertyin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
addTrait
@CanIgnoreReturnValue public org.apereo.cas.authentication.CredentialMetadata addTrait(org.apereo.cas.authentication.CredentialTrait credentialTrait) - Specified by:
addTraitin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
removeTrait
@CanIgnoreReturnValue public org.apereo.cas.authentication.CredentialMetadata removeTrait(Class<? extends org.apereo.cas.authentication.CredentialTrait> clazz) - Specified by:
removeTraitin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
getTrait
public <T extends org.apereo.cas.authentication.CredentialTrait> Optional<T> getTrait(Class<T> clazz) - Specified by:
getTraitin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
containsProperty
- Specified by:
containsPropertyin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
getId
Credential type unique identifier.- Specified by:
getIdin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
getCredentialClass
Type of original credential.- Specified by:
getCredentialClassin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
getTraits
-
getProperties
- Specified by:
getPropertiesin interfaceorg.apereo.cas.authentication.CredentialMetadata
-
equals
-
hashCode
public int hashCode()
-