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<? extends EncryptedJwtBuilder> |
headers()
Gets the JweHeaderBuilder that this JwtBuilder will use to build the JWE's header parameters.
|
SignedEncryptedJwtBuilder |
sign(SigningHandler signingHandler,
JwsAlgorithm jwsAlgorithm)
Deprecated.
|
EncryptedThenSignedJwtBuilder |
signedWith(SigningHandler signingHandler,
JwsAlgorithm jwsAlgorithm)
Returns an
EncryptedThenSignedJwtBuilder 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<? extends EncryptedJwtBuilder> headers()
headers
in class AbstractJwtBuilder
public EncryptedJwtBuilder claims(JwtClaimsSet claimsSet)
claims
in class AbstractJwtBuilder
claimsSet
- The JwtClaimsSet containing the JWT's claims.@Deprecated public SignedEncryptedJwtBuilder sign(SigningHandler signingHandler, JwsAlgorithm jwsAlgorithm)
EncryptedJwtBuilder.signedWith(SigningHandler, JwsAlgorithm)
instead.signingHandler
- The SigningHandler instance used to sign the JWS.jwsAlgorithm
- The JwsAlgorithm to use when signing the JWT.public EncryptedThenSignedJwtBuilder signedWith(SigningHandler signingHandler, JwsAlgorithm jwsAlgorithm)
EncryptedThenSignedJwtBuilder
that will build a signed JWT with this builder's encrypted JWT
as its payload.signingHandler
- The SigningHandler instance used to sign the JWS.jwsAlgorithm
- The JwsAlgorithm to use when signing the JWT.public EncryptedJwt asJwt()
JwtBuilder
public String build()
String
by calling the build method on the JWE object.
EncryptedJwt.build()
Copyright © 2010-2018, ForgeRock All Rights Reserved.