java.lang.Object
se.swedenconnect.opensaml.sweid.saml2.signservice.sap.SAD

public class SAD extends Object
Representation of the Signature Activation Data (SAD) as described in the "Signature Activation Protocol for Federated Signing" specification.
Author:
Martin Lindström (martin@idsec.se)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Represents the SAD Extension claim as described in section 3.2.1.2 of the "Signature Activation Protocol for Federated Signing" specification.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SAD()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    static SAD
    Creates a SAD object from its JSON representation.
    Returns the entityID of the Signature Service which is the recipient of this SAD.
    Returns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).
    Returns the time when this SAD is no longer valid as a Instant instance.
    Returns the time when this SAD was issued (epoch time/seconds since 1970-01-01).
    Returns the time when this SAD was issued as a Instant instance.
    Returns the entityID of the IdP that generated this SAD.
    Returns the unique identifier of this JWT.
    Returns the SAD extension claim.
    Returns the attribute value of the signer's unique identifier attribute.
    int
    void
    setAudience(String audience)
    Assigns the entityID of the Signature Service which is the recipient of this SAD.
    void
    Assigns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).
    void
    Assigns the time when this SAD is no longer valid.
    void
    setIssuedAt(Integer issuedAt)
    Assigns the time when this SAD was issued (epoch time/seconds since 1970-01-01).
    void
    setIssuedAt(Instant issuedAt)
    Assigns the time when this SAD was issued.
    void
    setIssuer(String issuer)
    Assigns the entityID of the IdP that generated this SAD.
    void
    Assigns the unique identifier of this JWT.
    void
    Assigns the SAD extension claim.
    void
    setSubject(String subject)
    Assigns the attribute value of the signer's unique identifier attribute.
    Serializes the SAD object into its JSON representation.
    byte[]
    Serializes the SAD object into its JSON byte representation.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SAD

      public SAD()
  • Method Details

    • fromJson

      public static SAD fromJson(String json) throws IOException
      Creates a SAD object from its JSON representation.
      Parameters:
      json - the JSON representation
      Returns:
      a SAD object
      Throws:
      IOException - for parsing errors
    • toJson

      public String toJson() throws IOException
      Serializes the SAD object into its JSON representation.
      Returns:
      the JSON representation
      Throws:
      IOException - for processing errors
    • toJsonBytes

      public byte[] toJsonBytes() throws IOException
      Serializes the SAD object into its JSON byte representation.
      Returns:
      the JSON bytes
      Throws:
      IOException - for processing errors
    • getSubject

      public String getSubject()
      Returns the attribute value of the signer's unique identifier attribute.
      Returns:
      the user ID
    • setSubject

      public void setSubject(String subject)
      Assigns the attribute value of the signer's unique identifier attribute.
      Parameters:
      subject - the user ID
    • getAudience

      public String getAudience()
      Returns the entityID of the Signature Service which is the recipient of this SAD.
      Returns:
      the entityID of the recipient
    • setAudience

      public void setAudience(String audience)
      Assigns the entityID of the Signature Service which is the recipient of this SAD.
      Parameters:
      audience - the entityID of the recipient
    • getIssuer

      public String getIssuer()
      Returns the entityID of the IdP that generated this SAD.
      Returns:
      the IdP entityID
    • setIssuer

      public void setIssuer(String issuer)
      Assigns the entityID of the IdP that generated this SAD.
      Parameters:
      issuer - the IdP entityID
    • getExpiry

      public Integer getExpiry()
      Returns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).
      Returns:
      number of seconds since 1970-01-01
    • getExpiryDateTime

      public Instant getExpiryDateTime()
      Returns the time when this SAD is no longer valid as a Instant instance.
      Returns:
      expiration time
    • setExpiry

      public void setExpiry(Integer expiry)
      Assigns the time when this SAD is no longer valid (epoch time/seconds since 1970-01-01).
      Parameters:
      expiry - number of seconds since 1970-01-01
    • setExpiry

      public void setExpiry(Instant expiry)
      Assigns the time when this SAD is no longer valid.
      Parameters:
      expiry - expiration time
    • getIssuedAt

      public Integer getIssuedAt()
      Returns the time when this SAD was issued (epoch time/seconds since 1970-01-01).
      Returns:
      number of seconds since 1970-01-01
    • getIssuedAtDateTime

      public Instant getIssuedAtDateTime()
      Returns the time when this SAD was issued as a Instant instance.
      Returns:
      timestamp
    • setIssuedAt

      public void setIssuedAt(Integer issuedAt)
      Assigns the time when this SAD was issued (epoch time/seconds since 1970-01-01).
      Parameters:
      issuedAt - number of seconds since 1970-01-01
    • setIssuedAt

      public void setIssuedAt(Instant issuedAt)
      Assigns the time when this SAD was issued.
      Parameters:
      issuedAt - issue time
    • getJwtId

      public String getJwtId()
      Returns the unique identifier of this JWT.
      Returns:
      JWT ID
    • setJwtId

      public void setJwtId(String jwtId)
      Assigns the unique identifier of this JWT.
      Parameters:
      jwtId - JWT ID
    • getSeElnSadext

      public SAD.Extension getSeElnSadext()
      Returns the SAD extension claim.
      Returns:
      SAD extension claim
    • setSeElnSadext

      public void setSeElnSadext(SAD.Extension seElnSadext)
      Assigns the SAD extension claim.
      Parameters:
      seElnSadext - SAD extension claim
    • toString

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object