Class Saml2AssertionAuditData
java.lang.Object
se.swedenconnect.spring.saml.idp.audit.data.Saml2AuditData
se.swedenconnect.spring.saml.idp.audit.data.Saml2AssertionAuditData
- All Implemented Interfaces:
Serializable
Audit data for a SAML
Assertion
.- Author:
- Martin Lindström
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Representation of a SAML attribute. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe SAML attributes.protected static String
getAttributeValue
(org.opensaml.saml.saml2.core.Attribute attribute) Gets attribute value as a string.Optional ID for authenticating authority.The LoA URI (level of assurance).The authentication instant.getId()
The assertion ID.Holds the ID for the corresponding AuthnRequest.The issuance time for the assertion.The entityID of the issuing entity.getName()
Gets the name of this data element.The subject's (assigned) ID.The subject locality (IP).boolean
Whether the assertion is encrypted.boolean
isSigned()
Whether the assertion is signed.static Saml2AssertionAuditData
of
(org.opensaml.saml.saml2.core.Assertion assertion, boolean encrypted) Creates aSaml2AssertionAuditData
given anAssertion
.void
setAttributes
(List<Saml2AssertionAuditData.SamlAttribute> attributes) The SAML attributes.void
setAuthnAuthority
(String authnAuthority) Optional ID for authenticating authority.void
setAuthnContextClassRef
(String authnContextClassRef) The LoA URI (level of assurance).void
setAuthnInstant
(Instant authnInstant) The authentication instant.void
setEncrypted
(boolean encrypted) Whether the assertion is encrypted.void
The assertion ID.void
setInResponseTo
(String inResponseTo) Holds the ID for the corresponding AuthnRequest.void
setIssuedAt
(Instant issuedAt) The issuance time for the assertion.void
The entityID of the issuing entity.void
setSigned
(boolean signed) Whether the assertion is signed.void
setSubjectId
(String subjectId) The subject's (assigned) ID.void
setSubjectLocality
(String subjectLocality) The subject locality (IP).toString()
-
Constructor Details
-
Saml2AssertionAuditData
public Saml2AssertionAuditData()
-
-
Method Details
-
getName
Gets the name of this data element. The name should be in "kebab-case", i.e., "data-element".- Specified by:
getName
in classSaml2AuditData
- Returns:
- the audit data name
-
of
public static Saml2AssertionAuditData of(org.opensaml.saml.saml2.core.Assertion assertion, boolean encrypted) Creates aSaml2AssertionAuditData
given anAssertion
.- Parameters:
assertion
- the SAML assertionencrypted
- whether this assertion is encrypted (when placed in response)- Returns:
- a
Saml2AssertionAuditData
-
getAttributeValue
Gets attribute value as a string. If multivalued, the first value is read.- Parameters:
attribute
- the attribute- Returns:
- value as a String
-
toString
-
getId
The assertion ID. -
setId
The assertion ID. -
getInResponseTo
Holds the ID for the corresponding AuthnRequest. -
setInResponseTo
Holds the ID for the corresponding AuthnRequest. -
isSigned
public boolean isSigned()Whether the assertion is signed. -
setSigned
public void setSigned(boolean signed) Whether the assertion is signed. -
isEncrypted
public boolean isEncrypted()Whether the assertion is encrypted. -
setEncrypted
public void setEncrypted(boolean encrypted) Whether the assertion is encrypted. -
getIssuedAt
The issuance time for the assertion. -
setIssuedAt
The issuance time for the assertion. -
getIssuer
The entityID of the issuing entity. -
setIssuer
The entityID of the issuing entity. -
getAuthnInstant
The authentication instant. -
setAuthnInstant
The authentication instant. -
getSubjectId
The subject's (assigned) ID. -
setSubjectId
The subject's (assigned) ID. -
getSubjectLocality
The subject locality (IP). -
setSubjectLocality
The subject locality (IP). -
getAuthnContextClassRef
The LoA URI (level of assurance). -
setAuthnContextClassRef
The LoA URI (level of assurance). -
getAuthnAuthority
Optional ID for authenticating authority. -
setAuthnAuthority
Optional ID for authenticating authority. -
getAttributes
The SAML attributes. -
setAttributes
The SAML attributes.
-