public class JWTTransferCartTokenDecoder extends Object implements TransferCartTokenDecoder
TransferCartTokenDecoder that decoded the
TransferCartToken from a JWT token string.| Constructor and Description |
|---|
JWTTransferCartTokenDecoder(JWTTransferCartTokenDecoderProperties properties,
com.broadleafcommerce.common.extension.TypeFactory typeFactory,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Primary constructor for initializing the decoder
|
JWTTransferCartTokenDecoder(com.broadleafcommerce.common.extension.TypeFactory typeFactory,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Optional constructor if looking to manually configure the decoder using the setters.
|
| Modifier and Type | Method and Description |
|---|---|
protected TransferCartToken |
convertToTransferCartToken(com.nimbusds.jwt.JWTClaimsSet claims) |
TransferCartToken |
decode(String encodedTokenString)
Decoded an encoded transfer cart token string into a
TransferCartToken. |
protected com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
protected JWTTransferCartTokenDecoderProperties |
getProperties() |
protected com.broadleafcommerce.common.extension.TypeFactory |
getTypeFactory() |
protected com.nimbusds.jose.JWSVerifier |
getVerifier() |
void |
setEncodedPublicKey(String encodedPublicKey)
Sets the value of
JWTTransferCartTokenDecoderProperties.getEncodedPublicKey(), and
initializes the verifier used to verify JWT tokens. |
void |
setIssuer(String issuer)
Setter for overwriting the current issuer on
JWTTransferCartTokenDecoderProperties. |
protected void |
validateJWT(com.nimbusds.jwt.SignedJWT signedJWT) |
public JWTTransferCartTokenDecoder(JWTTransferCartTokenDecoderProperties properties, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper mapper)
properties - the property configuration for the decoderpublic JWTTransferCartTokenDecoder(com.broadleafcommerce.common.extension.TypeFactory typeFactory,
com.fasterxml.jackson.databind.ObjectMapper mapper)
public void setEncodedPublicKey(String encodedPublicKey)
JWTTransferCartTokenDecoderProperties.getEncodedPublicKey(), and
initializes the verifier used to verify JWT tokens.encodedPublicKey - the encoded public keypublic void setIssuer(String issuer)
JWTTransferCartTokenDecoderProperties.issuer - the issuerpublic TransferCartToken decode(String encodedTokenString) throws TransferCartTokenParseException
TransferCartTokenDecoderTransferCartToken.decode in interface TransferCartTokenDecoderencodedTokenString - the encoded transfer cart token stringTransferCartTokenParseException - when there is an issue with the parsing of the
encoded tokenprotected void validateJWT(com.nimbusds.jwt.SignedJWT signedJWT)
throws ParseException,
TransferCartTokenParseException
protected TransferCartToken convertToTransferCartToken(com.nimbusds.jwt.JWTClaimsSet claims) throws TransferCartTokenParseException
TransferCartTokenParseExceptionprotected JWTTransferCartTokenDecoderProperties getProperties()
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
protected com.nimbusds.jose.JWSVerifier getVerifier()
Copyright © 2021. All rights reserved.