Class SADFactory.SADBuilder
- java.lang.Object
-
- se.litsec.swedisheid.opensaml.saml2.signservice.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SADFactory.SADBuilderaudience(String audience)Assigns the entityID of the Signature Service which is the recipient of this SAD.StringbuildJwt()Builds a SAD, creates a JWT, signs it and returns its serialization.SADbuildSAD()Builds a SAD.SADFactory.SADBuilderinResponseTo(String irt)Assigns the ID of theSADRequestmessage that requested this SAD.SADFactory.SADBuilderjwtId(String jwtId)Assigns the unique identifier of this JWT.SADFactory.SADBuilderloa(String loa)Assigns the URI identifier of the level of assurance (LoA) used to authenticate the signer.SADFactory.SADBuildernumberOfDocuments(int docs)Assigns the number of documents to be signed in the associated sign request.SADFactory.SADBuilderrequestID(String requestID)Assigns the ID of the Sign Request associated with this SAD.SADFactory.SADBuildersubject(String subject)Assigns the attribute value of the signer's unique identifier attribute.SADFactory.SADBuilderversion(SADVersion version)Assigns the version of the SAD claim.
-
-
-
Method Detail
-
buildSAD
public SAD buildSAD()
Builds a SAD.- Returns:
- the SAD
-
buildJwt
public String buildJwt() throws IOException, SignatureException
Builds a SAD, creates a JWT, signs it and returns its serialization.- Returns:
- serialized JWT
- Throws:
IOException- for JSON processing errorsSignatureException- for signature errors
-
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 theSADRequestmessage that requested this SAD.- Parameters:
irt- ID of correspondingSADRequest- 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
-
-