303.6. 创建 ShiroSecurityToken 并将其注入消息交换
ShiroSecurityToken 对象可以使用名为 ShiroSecurityTokenInjector 的 Shiro Processor 创建并注入到 Message Exchange 中。例如,在客户端中使用 ShiroSecurityTokenInjector 注入 ShiroSecurityTokenInjector 的示例如下所示
ShiroSecurityToken shiroSecurityToken = new ShiroSecurityToken("ringo", "starr"); ShiroSecurityTokenInjector shiroSecurityTokenInjector = new ShiroSecurityTokenInjector(shiroSecurityToken, passPhrase); from("direct:client"). process(shiroSecurityTokenInjector). to("direct:secureEndpoint");