Class SADFactory.SADBuilder
java.lang.Object
se.swedenconnect.opensaml.sweid.saml2.signservice.SADFactory.SADBuilder
- Enclosing class:
SADFactory
A builder for creating a SAD and a signed SAD JWT.
- Author:
- Martin Lindström (martin@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionAssigns the entityID of the Signature Service which is the recipient of this SAD.buildJwt()
Builds a SAD, creates a JWT, signs it and returns its serialization.buildSAD()
Builds a SAD.inResponseTo
(String irt) Assigns the ID of theSADRequest
message that requested this SAD.Assigns the unique identifier of this JWT.Assigns the URI identifier of the level of assurance (LoA) used to authenticate the signer.numberOfDocuments
(int docs) Assigns the number of documents to be signed in the associated sign request.Assigns the ID of the Sign Request associated with this SAD.Assigns the attribute value of the signer's unique identifier attribute.version
(SADVersion version) Assigns the version of the SAD claim.
-
Method Details
-
buildSAD
Builds a SAD.- Returns:
- the SAD
-
buildJwt
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
Assigns the attribute value of the signer's unique identifier attribute.- Parameters:
subject
- the user ID- Returns:
- the SAD builder
-
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
Assigns the unique identifier of this JWT.- Parameters:
jwtId
- JWT ID- Returns:
- the SAD builder
-
version
Assigns the version of the SAD claim.- Parameters:
version
- the version- Returns:
- the SAD builder
-
inResponseTo
Assigns the ID of theSADRequest
message that requested this SAD.- Parameters:
irt
- ID of corresponding SADRequest- Returns:
- the SAD builder
-
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
Assigns the ID of the Sign Request associated with this SAD.- Parameters:
requestID
- SignRequest ID- Returns:
- the SAD builder
-
numberOfDocuments
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
-