Package org.apereo.cas.authentication
Interface CredentialMetadata
- All Superinterfaces:
Serializable
Describes a credential provided for authentication. Implementations should expect instances of this type to be
stored for periods of time equal to the length of the SSO session or longer, which necessitates consideration of
serialization and security. All implementations MUST be serializable and secure with respect to long-term storage.
- Since:
- 4.0.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddTrait(CredentialTrait credentialTrait) Add trait.booleancontainsProperty(String key) Contains property?.Class<? extends Credential> Gets the type of the original credential.getId()Gets a unique identifier for the kind of credential this represents.Gets properties.<T extends CredentialTrait>
Optional<T> Gets trait.putProperties(Map<String, ? extends Serializable> properties) Put properties.putProperty(String key, Serializable value) Put property credential metadata.removeTrait(Class<? extends CredentialTrait> trait) Remove trait.
-
Field Details
-
PROPERTY_USER_AGENT
User agent property linked to this credential.- See Also:
-
PROPERTY_GEO_LOCATION
Geo location property linked to this credential.- See Also:
-
-
Method Details
-
getId
String getId()Gets a unique identifier for the kind of credential this represents.- Returns:
- Unique identifier for the given type of credential.
-
getCredentialClass
Class<? extends Credential> getCredentialClass()Gets the type of the original credential.- Returns:
- Non -null credential class.
-
addTrait
Add trait.- Parameters:
credentialTrait- the credential trait
-
removeTrait
Remove trait.- Parameters:
trait- the trait
-
getTrait
Gets trait.- Type Parameters:
T- the type parameter- Parameters:
trait- the trait- Returns:
- the trait
-
getProperties
Map<String,Serializable> getProperties()Gets properties.- Returns:
- the properties
-
putProperties
Put properties.- Parameters:
properties- the properties
-
putProperty
Put property credential metadata.- Parameters:
key- the keyvalue- the value- Returns:
- the credential metadata
-
containsProperty
Contains property?.- Parameters:
key- the key- Returns:
- true or false
-