use of org.example.contract.doubleit.DoubleItPortType in project cxf by apache.
the class SamlTokenTest method testAsymmetricInitiator.
/**
* 2.3.1.5 (WSS1.0) SAML1.1 Holder of Key, Sign, Optional Encrypt
*/
@org.junit.Test
public void testAsymmetricInitiator() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
URL busFile = SamlTokenTest.class.getResource("client.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricInitiatorPort");
DoubleItPortType samlPort = service.getPort(portQName, DoubleItPortType.class);
updateAddressPort(samlPort, test.getPort());
if (test.isStreaming()) {
SecurityTestUtil.enableStreaming(samlPort);
}
samlPort.doubleIt(25);
((java.io.Closeable) samlPort).close();
bus.shutdown(true);
}
use of org.example.contract.doubleit.DoubleItPortType in project cxf by apache.
the class SamlTokenTest method testBearer.
/**
* 2.3.1.1 (WSS1.0) SAML1.1 Assertion (Bearer)
*/
@org.junit.Test
public void testBearer() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
URL busFile = SamlTokenTest.class.getResource("client.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItBearerPort");
DoubleItPortType samlPort = service.getPort(portQName, DoubleItPortType.class);
updateAddressPort(samlPort, test.getPort());
if (test.isStreaming()) {
SecurityTestUtil.enableStreaming(samlPort);
}
samlPort.doubleIt(25);
((java.io.Closeable) samlPort).close();
bus.shutdown(true);
}
use of org.example.contract.doubleit.DoubleItPortType in project cxf by apache.
the class SamlTokenTest method testTLSHOKSignedEndorsing.
/**
* 2.3.1.3 (WSS1.0) SAML1.1 Assertion (HK) over SSL
*/
@org.junit.Test
public void testTLSHOKSignedEndorsing() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
URL busFile = SamlTokenTest.class.getResource("client.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItTLSHOKSignedEndorsingPort");
DoubleItPortType samlPort = service.getPort(portQName, DoubleItPortType.class);
String portNumber = PORT2;
if (STAX_PORT.equals(test.getPort())) {
portNumber = STAX_PORT2;
}
updateAddressPort(samlPort, portNumber);
if (test.isStreaming()) {
SecurityTestUtil.enableStreaming(samlPort);
}
samlPort.doubleIt(25);
((java.io.Closeable) samlPort).close();
bus.shutdown(true);
}
use of org.example.contract.doubleit.DoubleItPortType in project cxf by apache.
the class SamlTokenTest method testAsymmetricSigned.
/**
* 2.3.1.4 (WSS1.0) SAML1.1 Sender Vouches with X.509 Certificates, Sign, Optional Encrypt
*/
@org.junit.Test
public void testAsymmetricSigned() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
URL busFile = SamlTokenTest.class.getResource("client.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSignedPort");
DoubleItPortType samlPort = service.getPort(portQName, DoubleItPortType.class);
updateAddressPort(samlPort, test.getPort());
samlPort.doubleIt(25);
((java.io.Closeable) samlPort).close();
bus.shutdown(true);
}
use of org.example.contract.doubleit.DoubleItPortType in project cxf by apache.
the class SamlTokenTest method testTLSSenderVouchesSaml2.
/**
* 2.3.2.2 (WSS1.1) SAML2.0 Sender Vouches over SSL
*/
@org.junit.Test
public void testTLSSenderVouchesSaml2() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
URL busFile = SamlTokenTest.class.getResource("client.xml");
Bus bus = bf.createBus(busFile.toString());
BusFactory.setDefaultBus(bus);
BusFactory.setThreadDefaultBus(bus);
URL wsdl = SamlTokenTest.class.getResource("DoubleItSaml.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItTLSSenderVouchesSaml2Port");
DoubleItPortType samlPort = service.getPort(portQName, DoubleItPortType.class);
String portNumber = PORT2;
if (STAX_PORT.equals(test.getPort())) {
portNumber = STAX_PORT2;
}
updateAddressPort(samlPort, portNumber);
if (test.isStreaming()) {
SecurityTestUtil.enableStreaming(samlPort);
}
samlPort.doubleIt(25);
((java.io.Closeable) samlPort).close();
bus.shutdown(true);
}
Aggregations