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

public class Saml2AssertionAuditData extends Saml2AuditData
Audit data for a SAML Assertion.
Author:
Martin Lindström
See Also:
  • Constructor Details

    • Saml2AssertionAuditData

      public Saml2AssertionAuditData()
  • Method Details

    • getName

      public String getName()
      Gets the name of this data element. The name should be in "kebab-case", i.e., "data-element".
      Specified by:
      getName in class Saml2AuditData
      Returns:
      the audit data name
    • of

      public static Saml2AssertionAuditData of(org.opensaml.saml.saml2.core.Assertion assertion, boolean encrypted)
      Creates a Saml2AssertionAuditData given an Assertion.
      Parameters:
      assertion - the SAML assertion
      encrypted - whether this assertion is encrypted (when placed in response)
      Returns:
      a Saml2AssertionAuditData
    • getAttributeValue

      protected static String getAttributeValue(org.opensaml.saml.saml2.core.Attribute attribute)
      Gets attribute value as a string. If multivalued, the first value is read.
      Parameters:
      attribute - the attribute
      Returns:
      value as a String
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getId

      public String getId()
      The assertion ID.
    • setId

      public void setId(String id)
      The assertion ID.
    • getInResponseTo

      public String getInResponseTo()
      Holds the ID for the corresponding AuthnRequest.
    • setInResponseTo

      public void setInResponseTo(String inResponseTo)
      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

      public Instant getIssuedAt()
      The issuance time for the assertion.
    • setIssuedAt

      public void setIssuedAt(Instant issuedAt)
      The issuance time for the assertion.
    • getIssuer

      public String getIssuer()
      The entityID of the issuing entity.
    • setIssuer

      public void setIssuer(String issuer)
      The entityID of the issuing entity.
    • getAuthnInstant

      public Instant getAuthnInstant()
      The authentication instant.
    • setAuthnInstant

      public void setAuthnInstant(Instant authnInstant)
      The authentication instant.
    • getSubjectId

      public String getSubjectId()
      The subject's (assigned) ID.
    • setSubjectId

      public void setSubjectId(String subjectId)
      The subject's (assigned) ID.
    • getSubjectLocality

      public String getSubjectLocality()
      The subject locality (IP).
    • setSubjectLocality

      public void setSubjectLocality(String subjectLocality)
      The subject locality (IP).
    • getAuthnContextClassRef

      public String getAuthnContextClassRef()
      The LoA URI (level of assurance).
    • setAuthnContextClassRef

      public void setAuthnContextClassRef(String authnContextClassRef)
      The LoA URI (level of assurance).
    • getAuthnAuthority

      public String getAuthnAuthority()
      Optional ID for authenticating authority.
    • setAuthnAuthority

      public void setAuthnAuthority(String authnAuthority)
      Optional ID for authenticating authority.
    • getAttributes

      The SAML attributes.
    • setAttributes

      public void setAttributes(List<Saml2AssertionAuditData.SamlAttribute> attributes)
      The SAML attributes.