Package org.reficio.ws.client.core

Examples of org.reficio.ws.client.core.Security


                return user.equals("tom") && pass.equals("007");
            }
        });
        try {

            final Security security = Security.builder()
                    .authBasic("tom", "007")
                    .build();

            verifyServiceBehavior(1, new ClientBuilder() {
                @Override
View Full Code Here


            public boolean authenticate(String user, String pass) {
                return user.equals("tom") && pass.equals("007");
            }
        });

        final Security props = Security.builder()
                .authBasic("james", "003")
                .build();

        try {
            verifyServiceBehavior(1, new ClientBuilder() {
View Full Code Here

        exception.expectMessage("not authenticated");

        verifyServiceBehavior(2, new ClientBuilder() {
            @Override
            public SoapClient buildClient(String endpointUrl) {
                Security securityContext = Security.builder()
                        .trustStoreUrl(getKeyStoreUrlTwo())
                        .trustStorePassword(getKeyStorePassword())
                        .build();

                return SoapClient.builder().endpointUri("https://" + endpointUrl)
View Full Code Here

    }

    private class HttpsClientBuilder implements ClientBuilder {
        @Override
        public SoapClient buildClient(String endpointUrl) {
            Security securityContext = Security.builder()
                    .trustStoreUrl(keyStoreUrl)
                    .trustStorePassword(getKeyStorePassword())
                    .build();

            return SoapClient.builder().endpointUri("https://" + endpointUrl)
View Full Code Here

        HttpProxyServer proxyServer = new DefaultHttpProxyServer(PROXY_PORT, filters, null, null, null);
        return proxyServer;
    }

    private Security proxySecurity() {
        Security securityContext = Security.builder()
                .trustStoreUrl(getKeyStoreUrlTwo())
                .trustStorePassword(getKeyStorePassword())
                .build();
        return securityContext;
    }
View Full Code Here

        SslTunnel tunnel = new SslTunnel(ks, getKeyStorePassword(), PROXY_SSL_PORT, "localhost", PROXY_PORT);
        return tunnel;
    }

    private Security endpointSecurity() {
        Security securityContext = Security.builder()
                .trustStoreUrl(getKeyStoreUrlOne())
                .trustStorePassword(getKeyStorePassword())
                .build();
        return securityContext;
    }
View Full Code Here

            public boolean authenticate(String user, String pass) {
                return user.equals("tom") && pass.equals("007");
            }
        });

        final Security securityContext = Security.builder()
                .trustStoreUrl(getKeyStoreUrlTwo())
                .trustStorePassword(getKeyStorePassword())
                .authBasic("tom", "007")
                .build();
View Full Code Here

            public boolean authenticate(String user, String pass) {
                return user.equals("tom") && pass.equals("007");
            }
        });

        final Security securityContext = Security.builder()
                .trustStoreUrl(getKeyStoreUrlTwo())
                .trustStorePassword(getKeyStorePassword())
                .authBasic("james", "003")
                .build();
View Full Code Here

    @Test
    public void testService1_httpProxy_defaultProxySetting() throws Exception {
        HttpProxyServer proxyServer = initProxy();
        try {
            final Security securityContext = Security.builder()
                    .trustStoreUrl(getKeyStoreUrlOne())
                    .trustStorePassword(getKeyStorePassword())
                    .build();

            verifyServiceBehavior(1, new ClientBuilder() {
View Full Code Here

    @Test
    public void testService1_httpProxy_directProxy() throws Exception {
        HttpProxyServer proxyServer = initProxy();
        try {
            final Security securityContext = Security.builder()
                    .trustStoreUrl(getKeyStoreUrlOne())
                    .trustStorePassword(getKeyStorePassword())
                    .build();

            verifyServiceBehavior(1, new ClientBuilder() {
View Full Code Here

TOP

Related Classes of org.reficio.ws.client.core.Security

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.