String keyIdentifierValue = secRef.getKeyIdentifierValue(); String type = secRef.getKeyIdentifierValueType(); WSSecurityEngineResult result = request.getWsDocInfo().getResult(keyIdentifierValue);
String uri = retrievalMethodElement.getAttributeNS(null, "URI"); uri = XMLUtils.getIDFromReference(uri); WSSecurityEngineResult result = data.getWsDocInfo().getResult(uri); if (result != null) { byte[] symmKey = (byte[])result.get(WSSecurityEngineResult.TAG_SECRET);
Element foundElement = data.getWsDocInfo().getTokenElement(id); if (elem.equals(foundElement)) { WSSecurityEngineResult result = data.getWsDocInfo().getResult(id); return java.util.Collections.singletonList(result); } else if (foundElement != null) {
Element foundElement = data.getWsDocInfo().getTokenElement(id); if (elem.equals(foundElement)) { WSSecurityEngineResult result = data.getWsDocInfo().getResult(id); return java.util.Collections.singletonList(result); } else if (foundElement != null) {
WSSecurityEngineResult result = data.getWsDocInfo().getResult(id); if (result != null && WSConstants.ENCR == (Integer)result.get(WSSecurityEngineResult.TAG_ACTION)
Element foundElement = data.getWsDocInfo().getTokenElement(id); if (elem.equals(foundElement)) { WSSecurityEngineResult result = data.getWsDocInfo().getResult(id); return java.util.Collections.singletonList(result); } else if (foundElement != null) {
/** * Parse a SecurityTokenReference element and extract credentials. * * @param parameters The parameters to parse * @return the STRParserResult Object containing the parsing results * @throws WSSecurityException */ public STRParserResult parseSecurityTokenReference(STRParserParameters parameters) throws WSSecurityException { if (parameters == null || parameters.getData() == null || parameters.getData().getWsDocInfo() == null || parameters.getStrElement() == null) { throw new WSSecurityException( WSSecurityException.ErrorCode.FAILURE, "invalidSTRParserParameter" ); } SecurityTokenReference secRef = new SecurityTokenReference(parameters.getStrElement(), parameters.getData().getBSPEnforcer()); String uri = null; if (secRef.getReference() != null) { uri = secRef.getReference().getURI(); uri = XMLUtils.getIDFromReference(uri); } else if (secRef.containsKeyIdentifier()) { uri = secRef.getKeyIdentifierValue(); } WSSecurityEngineResult result = parameters.getData().getWsDocInfo().getResult(uri); if (result != null) { return processPreviousResult(result, secRef, parameters); } return processSTR(secRef, uri, parameters); }
/** * Parse a SecurityTokenReference element and extract credentials. * * @param parameters The parameters to parse * @return the STRParserResult Object containing the parsing results * @throws WSSecurityException */ public STRParserResult parseSecurityTokenReference(STRParserParameters parameters) throws WSSecurityException { if (parameters == null || parameters.getData() == null || parameters.getData().getWsDocInfo() == null || parameters.getStrElement() == null) { throw new WSSecurityException( WSSecurityException.ErrorCode.FAILURE, "invalidSTRParserParameter" ); } SecurityTokenReference secRef = new SecurityTokenReference(parameters.getStrElement(), parameters.getData().getBSPEnforcer()); String uri = null; if (secRef.getReference() != null) { uri = secRef.getReference().getURI(); uri = XMLUtils.getIDFromReference(uri); } else if (secRef.containsKeyIdentifier()) { uri = secRef.getKeyIdentifierValue(); } WSSecurityEngineResult result = parameters.getData().getWsDocInfo().getResult(uri); if (result != null) { return processPreviousResult(result, secRef, parameters); } return processSTR(secRef, parameters); }
/** * Parse a SecurityTokenReference element and extract credentials. * * @param parameters The parameters to parse * @return the STRParserResult Object containing the parsing results * @throws WSSecurityException */ public STRParserResult parseSecurityTokenReference(STRParserParameters parameters) throws WSSecurityException { if (parameters == null || parameters.getData() == null || parameters.getData().getWsDocInfo() == null || parameters.getStrElement() == null) { throw new WSSecurityException( WSSecurityException.ErrorCode.FAILURE, "invalidSTRParserParameter" ); } SecurityTokenReference secRef = new SecurityTokenReference(parameters.getStrElement(), parameters.getData().getBSPEnforcer()); String uri = null; if (secRef.getReference() != null) { uri = secRef.getReference().getURI(); uri = XMLUtils.getIDFromReference(uri); } else if (secRef.containsKeyIdentifier()) { uri = secRef.getKeyIdentifierValue(); } WSSecurityEngineResult result = parameters.getData().getWsDocInfo().getResult(uri); if (result != null) { return processPreviousResult(result, secRef, uri, parameters); } return processSTR(secRef, uri, parameters); }
WSSecurityEngineResult result = parameters.getData().getWsDocInfo().getResult(uri); if (result != null) { return processPreviousResult(result, secRef, parameters);