Package com.nimbusds.jose.mint
Interface JWSMinter<C extends SecurityContext>
-
- All Known Subinterfaces:
ConfigurableJWSMinter<C>
- All Known Implementing Classes:
DefaultJWSMinter
public interface JWSMinter<C extends SecurityContext>
Interface for mintingJSON Web Signature (JWS) objects
andsigned JSON Web Tokens
(JWTs). An optional context parameter is available to facilitate passing of additional data between the caller and the underlying JWS minter (in both directions).- Version:
- 2021-01-14
- Author:
- Josh Cummings
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JWSObject
mint(JWSHeader header, Payload payload, C context)
-
-
-
Method Detail
-
mint
JWSObject mint(JWSHeader header, Payload payload, C context) throws JOSEException
Creates a new JSON Web Signature (JWS) object using the providedJWSHeader
andPayload
. To create a signed JSON Web Token (JWT) use theJWTClaimsSet.toPayload()
method to obtain aPayload
representation of the JWT claims. Derives the signing key from theJWSHeader
as well as any application-specificcontext
. Once the key is discovered, adds any headers related to the discovered signing key, includingkid
,x5u
,x5c
, andx5t#256
. All other headers and claims remain as-is. This method expects the caller to add thetyp
,alg
, and any other needed headers.- Parameters:
header
- TheJWSHeader
to use, less any key-identifying headers, which this method will derive.payload
- ThePayload
.context
- ASecurityContext
,null
if not specified.- Returns:
- The signed JWS object.
- Throws:
JOSEException
- If the instance is improperly configured, if no appropriate JWK could be found, or if signing failed.
-
-