Interface PkiCredential.Metadata
- Enclosing interface:
PkiCredential
public static interface PkiCredential.Metadata
Metadata associated with a
PkiCredential.
Implementations may add any type of metadata to a credential. However, some XXX
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty that may be set to theInstantfrom when the credential should be regarded as active.static final StringProperty that may be set to theInstantat which the credential no longer should be regarded as active.static final StringProperty name for theInstantwhen the credential expires.static final StringProperty name for theInstantwhen the credential was issued.static final StringProperty name for the key identifier metadata property.static final StringUsage value indicating that a credential is used for encryption.static final StringUsage value indicating thet a credential is used for metadata signing, for example SAML metadata, or OIDC entity statements.static final StringProperty name for the usage property.static final StringUsage value indicating that a credential is used for signing. -
Method Summary
Modifier and TypeMethodDescriptiondefault InstantGets theInstantfor the "active-from" property.default InstantGets theInstantfor the "active-to" property.default InstantThe instant for when the key pair/credential "expires".default InstantThe instant for when the key pair/credential was issued.default StringgetKeyId()Gets the stored key identifier ("key-id" property).Gets a live map of the additional metadata properties.default StringgetUsage()Gets the value for the "usage" property.default voidsetActiveFrom(Instant activeFrom) Assigns theInstantfrom when the credential should be regarded as active.default voidsetActiveTo(Instant activeTo) Assigns theInstantfor when the credential should no longer be active.default voidAssigns the key identifier ("key-id" property).default voidAssigns the credential usage represented by the "usage" property.
-
Field Details
-
KEY_ID_PROPERTY
Property name for the key identifier metadata property. This property holds aString.- See Also:
-
ISSUED_AT_PROPERTY
Property name for theInstantwhen the credential was issued.- See Also:
-
EXPIRES_AT_PROPERTY
Property name for theInstantwhen the credential expires. Note that this may be different from the instant holding theACTIVE_TO_PROPERTYproperty.- See Also:
-
ACTIVE_TO_PROPERTY
Property that may be set to theInstantat which the credential no longer should be regarded as active.- See Also:
-
ACTIVE_FROM_PROPERTY
Property that may be set to theInstantfrom when the credential should be regarded as active.- See Also:
-
USAGE_PROPERTY
Property name for the usage property. This property holds aString, that may be "signing", "encryption", "metadata-signing" or any other application specific usage.- See Also:
-
USAGE_SIGNING
Usage value indicating that a credential is used for signing.- See Also:
-
USAGE_ENCRYPTION
Usage value indicating that a credential is used for encryption.- See Also:
-
USAGE_METADATA_SIGNING
Usage value indicating thet a credential is used for metadata signing, for example SAML metadata, or OIDC entity statements.- See Also:
-
-
Method Details
-
setKeyId
Assigns the key identifier ("key-id" property).- Parameters:
keyId- the key identifier, ornullto reset the value
-
getKeyId
Gets the stored key identifier ("key-id" property).- Returns:
- the credential key identifier, or
null, if not assigned
-
setUsage
Assigns the credential usage represented by the "usage" property.- Parameters:
usage- the usage string, ornullto reset the "usage" property.
-
getUsage
Gets the value for the "usage" property.- Returns:
- a credential usage string or
null
-
setActiveFrom
Assigns theInstantfrom when the credential should be regarded as active. Stored using the "active-from" property.- Parameters:
activeFrom- the active-from instant, ornullfor resetting the property
-
getActiveFrom
Gets theInstantfor the "active-from" property.- Returns:
- an
Instantornull
-
setActiveTo
Assigns theInstantfor when the credential should no longer be active. Stored using the "active-to" property.- Parameters:
activeTo- the active-to instant, ornullfor resetting the property
-
getActiveTo
Gets theInstantfor the "active-to" property.- Returns:
- an
Instantornull
-
getIssuedAt
The instant for when the key pair/credential was issued.If not explicitly assigned, implementations may use the
notBeforeproperty from the credential entity certificate.- Returns:
- an instant for when the credential was issued/created, or
nullif this information is not available
-
getExpiresAt
The instant for when the key pair/credential "expires".If not explicitly assigned, implementations may use the
notAfterproperty from the credential entity certificate.- Returns:
- an instant for when the credential expires, or
nullif this information is not available
-
getProperties
Gets a live map of the additional metadata properties.- Returns:
- a (possibly empty) map of additional metadata properties
-