Package org.apereo.cas.authentication
Interface Credential
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
MutableCredential,RememberMeCredential
Describes an authentication credential. Implementations SHOULD also implement
CredentialMetadata if
no sensitive data is contained in the credential; conversely, implementations MUST NOT implement
CredentialMetadata if the credential contains sensitive data (e.g. password, key material).- Since:
- 3.0.0
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGets credential metadata.getId()Gets a credential identifier that is safe to record for logging, auditing, or presentation to the user.
-
Field Details
-
CREDENTIAL_TYPE_ATTRIBUTE
Credential type, collected as metadata for authentication.- See Also:
-
UNKNOWN_ID
An ID that may be used to indicate the credential identifier is unknown.- See Also:
-
-
Method Details
-
getId
String getId()Gets a credential identifier that is safe to record for logging, auditing, or presentation to the user. In most cases this has a natural meaning for most credential types (e.g. username, certificate DN), while for others it may be awkward to construct a meaningful identifier. In any case credentials require some means of identification for a number of cases and implementers should make a best effort to satisfy that need.- Returns:
- Non-null credential identifier. Implementers should return
UNKNOWN_IDfor cases where an ID is not readily available or meaningful.
-
getCredentialMetadata
CredentialMetadata getCredentialMetadata()Gets credential metadata.- Returns:
- the credential metadata
-