Class SADFactory.SADBuilder

  • Enclosing class:
    SADFactory

    public static class SADFactory.SADBuilder
    extends Object
    A builder for creating a SAD and a signed SAD JWT.
    Author:
    Martin Lindström (martin.lindstrom@litsec.se)
    • Method Detail

      • buildSAD

        public SAD buildSAD()
        Builds a SAD.
        Returns:
        the SAD
      • subject

        public SADFactory.SADBuilder subject​(String subject)
        Assigns the attribute value of the signer's unique identifier attribute.
        Parameters:
        subject - the user ID
        Returns:
        the SAD builder
      • audience

        public SADFactory.SADBuilder audience​(String audience)
        Assigns the entityID of the Signature Service which is the recipient of this SAD.
        Parameters:
        audience - the entityID of the recipient
        Returns:
        the SAD builder
      • jwtId

        public SADFactory.SADBuilder jwtId​(String jwtId)
        Assigns the unique identifier of this JWT.
        Parameters:
        jwtId - JWT ID
        Returns:
        the SAD builder
      • version

        public SADFactory.SADBuilder version​(SADVersion version)
        Assigns the version of the SAD claim.
        Parameters:
        version - the version
        Returns:
        the SAD builder
      • inResponseTo

        public SADFactory.SADBuilder inResponseTo​(String irt)
        Assigns the ID of the SADRequest message that requested this SAD.
        Parameters:
        irt - ID of corresponding SADRequest
        Returns:
        the SAD builder
      • loa

        public SADFactory.SADBuilder loa​(String loa)
        Assigns the URI identifier of the level of assurance (LoA) used to authenticate the signer.
        Parameters:
        loa - LoA URI
        Returns:
        the SAD builder
      • requestID

        public SADFactory.SADBuilder requestID​(String requestID)
        Assigns the ID of the Sign Request associated with this SAD.
        Parameters:
        requestID - SignRequest ID
        Returns:
        the SAD builder
      • numberOfDocuments

        public SADFactory.SADBuilder numberOfDocuments​(int docs)
        Assigns the number of documents to be signed in the associated sign request.
        Parameters:
        docs - the number of documents to be signed
        Returns:
        the SAD builder