public class SignedJwtBuilderImpl extends AbstractJwtBuilder implements SignedJwtBuilder
Constructor and Description |
---|
SignedJwtBuilderImpl(SigningHandler signingHandler)
Constructs a new SignedJwtBuilderImpl that will use the given private key to sign the JWT.
|
Modifier and Type | Method and Description |
---|---|
SignedJwt |
asJwt()
Builds the JWT object from its constituent parts.
|
String |
build()
Builds the JWS into a
String by calling the build method on the JWS object. |
SignedJwtBuilderImpl |
claims(JwtClaimsSet claimsSet)
Sets the JwtClaimsSet for this JwtBuilder.
|
SignedThenEncryptedJwtBuilder |
encrypt(Key encryptionKey)
Wraps the signed JWT in an outer encrypted JWE envelope.
|
JwsHeaderBuilder |
headers()
Gets the JwsHeaderBuilder that this JwtBuilder will use to build the JWS' header parameters.
|
public SignedJwtBuilderImpl(SigningHandler signingHandler)
signingHandler
- The SigningHandler instance used to sign the JWS.public JwsHeaderBuilder headers()
headers
in class AbstractJwtBuilder
public SignedJwtBuilderImpl claims(JwtClaimsSet claimsSet)
claims
in class AbstractJwtBuilder
claimsSet
- The JwtClaimsSet containing the JWT's claims.public SignedThenEncryptedJwtBuilder encrypt(Key encryptionKey)
encryptionKey
- the key to use for encryption. This should either be a symmetric secret key or a public key.public SignedJwt asJwt()
JwtBuilder
asJwt
in interface JwtBuilder
public String build()
String
by calling the build method on the JWS object.
build
in interface JwtBuilder
SignedJwt.build()
Copyright © 2010-2018, ForgeRock All Rights Reserved.