ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [ws-wss4j] CauchyPeano commented on issue #2: WSS-659 SecurityContextToken validator fixing QName
Date Wed, 08 Jan 2020 16:16:13 GMT
CauchyPeano commented on issue #2: WSS-659 SecurityContextToken validator fixing QName
   Hey @coheigea ,
   I am trying to write test now, and have difficulty to understanding how to write Validator.
Here is what I am trying to do:
               AbstractInboundSecurityToken abstractInboundSecurityToken = new AbstractInboundSecurityToken(null,
IDGenerator.generateID(null), SecurityTokenConstants.KeyIdentifier_KeyValue, true) {
                   public SecurityTokenConstants.TokenType getTokenType() {
                       return WSSecurityTokenConstants.SECURITY_CONTEXT_TOKEN;
                   protected Key getKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage
algorithmUsage, String correlationID) throws XMLSecurityException {
                       return new SecretKeySpec("test".getBytes(), "sha-256"); //I guess this
part is wrong
               SecurityContextTokenValidator validator = new SecurityContextTokenValidator()
                   public InboundSecurityToken validate(AbstractSecurityContextTokenType securityContextTokenType,
String identifier, TokenContext tokenContext) {
                       return abstractInboundSecurityToken;
               securityProperties.addValidator(WSSConstants.TAG_WSC0502_SCT, validator);
               securityProperties.addValidator(WSSConstants.TAG_WSC0512_SCT, validator);
   In this example I am getting exception at this line: `org/apache/santuario/xmlsec/2.1.4/xmlsec-2.1.4-sources.jar!/org/apache/xml/security/stax/impl/processor/input/`
   What will be the correct way to configure it for tests? 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message