Package com.adaptris.core.jwt
Class JWTDecoder
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.jwt.JWTDecoder
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Encode a header and body to a JSON Web Token", tag="jwt,decode,json,web,token", since="3.11.1") public class JWTDecoder extends ServiceImpThis service provides a way to decode a JSON Web Token.<jwt-decode> <unique-id>jwt-decode</unique-id> <jwt-string class="string-payload-data-input-parameter"/> <secret class="base64-encoded-secret"> <secret>c64975ba3cf3f9cd58459710b0a42369f34b0759c9967fb5a47eea488e8bea79</secret> </secret> <header class="multi-payload-string-output-parameter"> <payload-id>header</payload-id> </header> <claims class="multi-payload-string-output-parameter"> <payload-id>claims</payload-id> </claims> </jwt-decode>In the adapter configuration file this class is aliased as jwt-decode which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description JWTDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseService().voiddoService(AdaptrisMessage message).@NotNull DataOutputParameter<java.lang.String>getClaims()@NotNull DataOutputParameter<java.lang.String>getHeader()@NotNull DataInputParameter<java.lang.String>getJwtString()@NotNull SecretConfiguratorgetSecret()protected voidinitService().voidprepare().voidsetClaims(@NotNull DataOutputParameter<java.lang.String> claims)voidsetHeader(@NotNull DataOutputParameter<java.lang.String> header)voidsetJwtString(@NotNull DataInputParameter<java.lang.String> jwtString)voidsetSecret(@NotNull SecretConfigurator secret)-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage message) throws ServiceException
.- Throws:
ServiceException
-
initService
protected void initService()
.- Specified by:
initServicein classServiceImp
-
closeService
protected void closeService()
.- Specified by:
closeServicein classServiceImp
-
prepare
public void prepare()
.
-
getJwtString
@NotNull public @NotNull DataInputParameter<java.lang.String> getJwtString()
-
setJwtString
public void setJwtString(@NotNull @NotNull DataInputParameter<java.lang.String> jwtString)
-
getSecret
@NotNull public @NotNull SecretConfigurator getSecret()
-
setSecret
public void setSecret(@NotNull @NotNull SecretConfigurator secret)
-
getHeader
@NotNull public @NotNull DataOutputParameter<java.lang.String> getHeader()
-
setHeader
public void setHeader(@NotNull @NotNull DataOutputParameter<java.lang.String> header)
-
getClaims
@NotNull public @NotNull DataOutputParameter<java.lang.String> getClaims()
-
setClaims
public void setClaims(@NotNull @NotNull DataOutputParameter<java.lang.String> claims)
-
-