public void prepare(Crypto crypto) throws WSSecurityException { if (sct == null) { if (identifier != null) { sct = new SecurityContextToken(wscVersion, doc, identifier); } else { sct = new SecurityContextToken(wscVersion, doc); identifier = sct.getIdentifier(); } } // The wsu:Id of the wsc:SecurityContextToken if (sctId == null) { sctId = getWsConfig().getIdAllocator().createId("sctId-", sct); } sct.setID(sctId); }
private SecurityToken findCancelOrRenewToken(Exchange exchange, Element el) throws WSSecurityException { Element childElement = DOMUtils.getFirstElement(el); String uri = ""; if ("SecurityContextToken".equals(childElement.getLocalName())) { SecurityContextToken sct = new SecurityContextToken(childElement); uri = sct.getIdentifier(); } else { SecurityTokenReference ref = new SecurityTokenReference(childElement, new BSPEnforcer()); uri = ref.getReference().getURI(); } TokenStore store = (TokenStore)exchange.getEndpoint().getEndpointInfo() .getProperty(TokenStore.class.getName()); return store.getToken(uri); }
private SecurityToken findCancelOrRenewToken(Exchange exchange, Element el) throws WSSecurityException { Element childElement = DOMUtils.getFirstElement(el); String uri = ""; if ("SecurityContextToken".equals(childElement.getLocalName())) { SecurityContextToken sct = new SecurityContextToken(childElement); uri = sct.getIdentifier(); } else { SecurityTokenReference ref = new SecurityTokenReference(childElement, new BSPEnforcer()); uri = ref.getReference().getURI(); } TokenStore store = (TokenStore)exchange.getEndpoint().getEndpointInfo() .getProperty(TokenStore.class.getName()); return store.getToken(uri); }
try { Element validateTargetElement = (Element)validateTarget.getToken(); SecurityContextToken sct = new SecurityContextToken(validateTargetElement); String identifier = sct.getIdentifier(); SecurityToken token = tokenParameters.getTokenStore().getToken(identifier);
try { Element validateTargetElement = (Element)validateTarget.getToken(); SecurityContextToken sct = new SecurityContextToken(validateTargetElement); String identifier = sct.getIdentifier(); SecurityToken token = tokenParameters.getTokenStore().getToken(identifier);
try { Element cancelTargetElement = (Element)cancelTarget.getToken(); SecurityContextToken sct = new SecurityContextToken(cancelTargetElement); String identifier = sct.getIdentifier(); SecurityToken token = tokenParameters.getTokenStore().getToken(identifier);
try { Element cancelTargetElement = (Element)cancelTarget.getToken(); SecurityContextToken sct = new SecurityContextToken(cancelTargetElement); String identifier = sct.getIdentifier(); SecurityToken token = tokenParameters.getTokenStore().getToken(identifier);
RequestData data ) throws WSSecurityException { SecurityContextToken sct = new SecurityContextToken(elem);
.getProperty(TokenStore.class.getName())).remove(tokenIdToRenew); String instance = IDGenerator.generateID(null); sct = new SecurityContextToken( NegotiationUtils.getWSCVersion(tokenType), writer.getDocument(), tokenIdToRenew, instance); .createSecureId("sctId-", sct.getElement())); } else { sct = new SecurityContextToken( NegotiationUtils.getWSCVersion(tokenType), writer.getDocument()); sct.setID(WSSConfig.getNewInstance().getIdAllocator()
.getProperty(TokenStore.class.getName())).remove(tokenIdToRenew); String instance = IDGenerator.generateID(null); sct = new SecurityContextToken( NegotiationUtils.getWSCVersion(tokenType), writer.getDocument(), tokenIdToRenew, instance); .createSecureId("sctId-", sct.getElement())); } else { sct = new SecurityContextToken( NegotiationUtils.getWSCVersion(tokenType), writer.getDocument()); sct.setID(WSSConfig.getNewInstance().getIdAllocator()
new SecurityContextToken( NegotiationUtils.getWSCVersion(tokenType), writer.getDocument() );
new SecurityContextToken( NegotiationUtils.getWSCVersion(tokenType), writer.getDocument() );
Document doc = DOMUtils.getEmptyDocument(); SecurityContextToken sct = new SecurityContextToken(getWSCVersion(tokenRequirements.getTokenType()), doc); WSSConfig wssConfig = WSSConfig.getNewInstance(); sct.setID(wssConfig.getIdAllocator().createId("sctId-", sct));
Document doc = DOMUtils.getEmptyDocument(); SecurityContextToken sct = new SecurityContextToken(getWSCVersion(tokenRequirements.getTokenType()), doc); WSSConfig wssConfig = WSSConfig.getNewInstance(); sct.setID(wssConfig.getIdAllocator().createId("sctId-", sct));
SecurityContextToken sct = new SecurityContextToken(version, doc, tokenIdentifier); return sct.getElement();