final WSInboundSecurityContext wsInboundSecurityContext = (WSInboundSecurityContext) inputProcessorChain.getSecurityContext();
final List<QName> elementPath = getElementPath(eventQueue);
final TokenContext tokenContext = new TokenContext(wssSecurityProperties, wsInboundSecurityContext, xmlSecEvents, elementPath);
UsernameTokenValidator usernameTokenValidator =
wssSecurityProperties.getValidator(WSSConstants.TAG_wsse_UsernameToken);
if (usernameTokenValidator == null) {
usernameTokenValidator = new UsernameTokenValidatorImpl();
}
//jdk 1.6 compiler bug? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954
//type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with
// upper bounds org.apache.wss4j.stax.securityToken.UsernameSecurityToken,
// org.apache.wss4j.stax.securityToken.UsernameSecurityToken,
// org.apache.xml.security.stax.ext.securityToken.InboundSecurityToken
//works fine on jdk 1.7
final UsernameSecurityToken usernameSecurityToken =
usernameTokenValidator.</*fake @see above*/UsernameSecurityTokenImpl>
validate(usernameTokenType, tokenContext);
SecurityTokenProvider<InboundSecurityToken> securityTokenProvider =
new SecurityTokenProvider<InboundSecurityToken>() {