public class EncryptedJwtBuilder extends AbstractJwtBuilder
Constructor and Description |
---|
EncryptedJwtBuilder(Key publicKey)
Constructs a new EncryptedJwtBuilder that will use the given public key to encrypt the JWT.
|
Modifier and Type | Method and Description |
---|---|
EncryptedJwt |
asJwt()
Builds the JWT object from its constituent parts.
|
String |
build()
Builds the JWE into a
String by calling the build method on the JWE object. |
EncryptedJwtBuilder |
claims(JwtClaimsSet claimsSet)
Sets the JwtClaimsSet for this JwtBuilder.
|
JweHeaderBuilder |
headers()
Gets the JweHeaderBuilder that this JwtBuilder will use to build the JWE's header parameters.
|
SignedEncryptedJwtBuilder |
sign(SigningHandler signingHandler,
JwsAlgorithm jwsAlgorithm)
Returns a SignedEncryptedJwtBuilder that will build a signed JWT with this builder's encrypted JWT as its
payload.
|
public EncryptedJwtBuilder(Key publicKey)
publicKey
- The public key to encrypt the JWT with.public JweHeaderBuilder headers()
headers
in class AbstractJwtBuilder
public EncryptedJwtBuilder claims(JwtClaimsSet claimsSet)
claims
in class AbstractJwtBuilder
claimsSet
- The JwtClaimsSet containing the JWT's claims.public SignedEncryptedJwtBuilder sign(SigningHandler signingHandler, JwsAlgorithm jwsAlgorithm)
signingHandler
- The SigningHandler instance used to sign the JWS.jwsAlgorithm
- The JwsAlgorithm to use when signing the JWT.public EncryptedJwt asJwt()
public String build()
String
by calling the build method on the JWE object.
EncryptedJwt.build()
Copyright 2011-2015 ForgeRock AS.