Package org.forgerock.json.jose.builders
Class JweHeaderBuilder<B extends EncryptedJwtBuilder>
java.lang.Object
org.forgerock.json.jose.builders.JwtHeaderBuilder<T,B>
org.forgerock.json.jose.builders.JwtSecureHeaderBuilder<B,JweHeaderBuilder<B>>
org.forgerock.json.jose.builders.JweHeaderBuilder<B>
- Type Parameters:
B
- the concrete JWT builder type that headers are being built for.
public class JweHeaderBuilder<B extends EncryptedJwtBuilder>
extends JwtSecureHeaderBuilder<B,JweHeaderBuilder<B>>
An implementation of a JWE Header builder that provides a fluent builder pattern to create JWE headers.
See JweHeader
for information on the JweHeader object that this builder creates.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorDescriptionJweHeaderBuilder
(B jwtBuilder) Constructs a new JweHeaderBuilder, parented by the given JwtBuilder. -
Method Summary
Modifier and TypeMethodDescriptionSets the Agreement PartyUInfo header parameter for this JWE.Sets the Agreement PartyVInfo header parameter for this JWE.protected JwtHeader
build()
Creates a JweHeader instance from the header parameters set in this builder.enc
(EncryptionMethod enc) Sets the Encryption Method header parameter for this JWE.Deprecated.Sets the Ephemeral Public Key header parameter for this JWE.zip
(CompressionAlgorithm zip) Sets the Compression Algorithm header parameter for this JWE.Methods inherited from class org.forgerock.json.jose.builders.JwtSecureHeaderBuilder
crit, cty, jku, jwk, kid, x5c, x5t, x5u
Methods inherited from class org.forgerock.json.jose.builders.JwtHeaderBuilder
alg, done, getHeaders, header, headerIfNotNull
-
Constructor Details
-
JweHeaderBuilder
Constructs a new JweHeaderBuilder, parented by the given JwtBuilder.- Parameters:
jwtBuilder
- The JwtBuilder instance that this JweHeaderBuilder is a child of.
-
-
Method Details
-
enc
Sets the Encryption Method header parameter for this JWE.- Parameters:
enc
- The Encryption Method.- Returns:
- This JweHeaderBuilder.
- See Also:
-
epk
Sets the Ephemeral Public Key header parameter for this JWE.- Parameters:
epk
- The Ephemeral Public Key.- Returns:
- This JweHeaderBuilder.
- See Also:
-
epk
Deprecated.Useepk(JWK)
instead.Sets the Ephemeral Public Key header parameter for this JWE.- Parameters:
epk
- The Ephemeral Public Key.- Returns:
- This JweHeaderBuilder.
- See Also:
-
zip
Description copied from class:JwtSecureHeaderBuilder
Sets the Compression Algorithm header parameter for this JWE.- Overrides:
zip
in classJwtSecureHeaderBuilder<B extends EncryptedJwtBuilder,
JweHeaderBuilder<B extends EncryptedJwtBuilder>> - Parameters:
zip
- The Compression Algorithm.- Returns:
- This JweHeaderBuilder.
- See Also:
-
apu
Sets the Agreement PartyUInfo header parameter for this JWE.- Parameters:
apu
- The Agreement PartyUInfo.- Returns:
- This JweHeaderBuilder.
- See Also:
-
apv
Sets the Agreement PartyVInfo header parameter for this JWE.- Parameters:
apv
- The Agreement PartyVInfo.- Returns:
- This JweHeaderBuilder.
- See Also:
-
build
Creates a JweHeader instance from the header parameters set in this builder.- Specified by:
build
in classJwtHeaderBuilder<B extends EncryptedJwtBuilder,
JweHeaderBuilder<B extends EncryptedJwtBuilder>> - Returns:
- A JweHeader instance.
-
epk(JWK)
instead.