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 processing
unsecured
(plain), JWS
and
JWE
objects. 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
Modifier and TypeMethodDescriptionprocess
(JOSEObject joseObject, C context) Processes the specified JOSE object (unsecured, JWS or JWE).Processes the specified JWE object by decrypting it.Processes the specified JWS object by verifying its signature.process
(PlainObject plainObject, C context) Processes the specified unsecured (plain) JOSE object, typically by checking its context.Parses and processes the specified JOSE object (unsecured, JWS or JWE).
-
Method Details
-
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,null
if 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
Processes the specified JOSE object (unsecured, JWS or JWE).- Parameters:
joseObject
- The JOSE object. Must not benull
.context
- Optional context,null
if not required.- Returns:
- The payload on success.
- Throws:
BadJOSEException
- If the JOSE object is rejected.JOSEException
- If an internal processing exception is encountered.
-
process
Processes the specified unsecured (plain) JOSE object, typically by checking its context.- Parameters:
plainObject
- The unsecured (plain) JOSE object. Notnull
.context
- Optional context,null
if 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
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,null
if 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
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,null
if 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.
-