Package com.nimbusds.jose.proc
Interface JOSEProcessor<C extends SecurityContext>
-
- All Known Subinterfaces:
ConfigurableJOSEProcessor<C>
- All Known Implementing Classes:
DefaultJOSEProcessor
public interface JOSEProcessor<C extends SecurityContext>
Interface for parsing and processingunsecured(plain),JWSandJWEobjects. An optional context parameter is available to facilitate passing of additional data between the caller and the underlying JOSE processor (in both directions).- Version:
- 2015-08-20
- Author:
- Vladimir Dzhuvinov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Payloadprocess(JOSEObject joseObject, C context)Processes the specified JOSE object (unsecured, JWS or JWE).Payloadprocess(JWEObject jweObject, C context)Processes the specified JWE object by decrypting it.Payloadprocess(JWSObject jwsObject, C context)Processes the specified JWS object by verifying its signature.Payloadprocess(PlainObject plainObject, C context)Processes the specified unsecured (plain) JOSE object, typically by checking its context.Payloadprocess(String compactEncodedJOSE, C context)Parses and processes the specified JOSE object (unsecured, JWS or JWE).
-
-
-
Method Detail
-
process
Payload process(String compactEncodedJOSE, C context) throws ParseException, BadJOSEException, JOSEException
Parses and processes the specified JOSE object (unsecured, JWS or JWE).- Parameters:
compactEncodedJOSE- The JOSE object, compact-encoded to a URL-safe string. Must not benull.context- Optional context,nullif not required.- Returns:
- The payload on success.
- Throws:
ParseException- If the string couldn't be parsed to a valid JOSE object.BadJOSEException- If the JOSE object is rejected.JOSEException- If an internal processing exception is encountered.
-
process
Payload process(JOSEObject joseObject, C context) throws BadJOSEException, JOSEException
Processes the specified JOSE object (unsecured, JWS or JWE).- Parameters:
joseObject- The JOSE object. Must not benull.context- Optional context,nullif not required.- Returns:
- The payload on success.
- Throws:
BadJOSEException- If the JOSE object is rejected.JOSEException- If an internal processing exception is encountered.
-
process
Payload process(PlainObject plainObject, C context) throws BadJOSEException, JOSEException
Processes the specified unsecured (plain) JOSE object, typically by checking its context.- Parameters:
plainObject- The unsecured (plain) JOSE object. Notnull.context- Optional context,nullif not required.- Returns:
- The payload on success.
- Throws:
BadJOSEException- If the unsecured (plain) JOSE object is rejected.JOSEException- If an internal processing exception is encountered.
-
process
Payload process(JWSObject jwsObject, C context) throws BadJOSEException, JOSEException
Processes the specified JWS object by verifying its signature. The key candidate(s) are selected by examining the JWS header and / or the message context.- Parameters:
jwsObject- The JWS object. Notnull.context- Optional context,nullif not required.- Returns:
- The payload on success.
- Throws:
BadJOSEException- If the JWS object is rejected, typically due to a bad signature.JOSEException- If an internal processing exception is encountered.
-
process
Payload process(JWEObject jweObject, C context) throws BadJOSEException, JOSEException
Processes the specified JWE object by decrypting it. The key candidate(s) are selected by examining the JWS header and / or the message context.- Parameters:
jweObject- The JWE object. Notnull.context- Optional context of the JWE object,nullif not required.- Returns:
- The payload on success.
- Throws:
BadJOSEException- If the JWE object is rejected, typically due to failed decryption.JOSEException- If an internal processing exception is encountered.
-
-