Creating a ShiroSecurityToken and injecting it into a Message Exchange - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

A ShiroSecurityToken object may be created and injected into a Message Exchange using a Shiro Processor called ShiroSecurityTokenInjector. An example of injecting a ShiroSecurityToken using a ShiroSecurityTokenInjector in the client is shown below

ShiroSecurityToken shiroSecurityToken = 
   new ShiroSecurityToken("ringo", "starr");
ShiroSecurityTokenInjector shiroSecurityTokenInjector = 
   new ShiroSecurityTokenInjector(shiroSecurityToken, passPhrase);

from("direct:client")
   .process(shiroSecurityTokenInjector)
   .to("direct:secureEndpoint");