Package org.apereo.cas.authentication
Interface Credential
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
RememberMeCredential
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Credential extends java.io.Serializable
Describes an authentication credential. Implementations SHOULD also implementCredentialMetaData
if no sensitive data is contained in the credential; conversely, implementations MUST NOT implementCredentialMetaData
if the credential contains sensitive data (e.g. password, key material).- Since:
- 3.0.0
- See Also:
CredentialMetaData
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CREDENTIAL_TYPE_ATTRIBUTE
Credential type, collected as metadata for authentication.static java.lang.String
UNKNOWN_ID
An ID that may be used to indicate the credential identifier is unknown.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getId()
Gets a credential identifier that is safe to record for logging, auditing, or presentation to the user.
-
-
-
Field Detail
-
CREDENTIAL_TYPE_ATTRIBUTE
static final java.lang.String CREDENTIAL_TYPE_ATTRIBUTE
Credential type, collected as metadata for authentication.- See Also:
- Constant Field Values
-
UNKNOWN_ID
static final java.lang.String UNKNOWN_ID
An ID that may be used to indicate the credential identifier is unknown.- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
java.lang.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_ID
for cases where an ID is not readily available or meaningful.
-
-