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