Examples of AuthenticationAdminServiceStub


Examples of org.wso2.carbon.bam.services.stub.authenticationadminservice202.AuthenticationAdminServiceStub

    private String sessionCookie;

    public AuthenticationAdminClient_2_0_2(String serverURL) throws AxisFault {
        String serviceURL;
        serviceURL = generateURL(new String[]{serverURL, SERVICES_SUFFIX, AUTH_ADMIN_SERVICE_2_0_X});
        stub = new AuthenticationAdminServiceStub(BAMUtil.getConfigurationContextService().getClientConfigContext(), serviceURL);
        stub._getServiceClient().getOptions().setManageSession(true);
    }
View Full Code Here

Examples of org.wso2.carbon.bam.services.stub.authenticationadminservice203.AuthenticationAdminServiceStub

    private String sessionCookie;

    public AuthenticationAdminClient_2_0_3(String serverURL) throws AxisFault {
        String serviceURL;
        serviceURL = generateURL(new String[]{serverURL, SERVICES_SUFFIX, BAMConstants.AUTH_ADMIN_SERVICE_2_0_X});
        stub = new AuthenticationAdminServiceStub(BAMUtil.getConfigurationContextService().getClientConfigContext(), serviceURL);
        stub._getServiceClient().getOptions().setManageSession(true);
    }
View Full Code Here

Examples of org.wso2.carbon.core.services.authentication.AuthenticationAdminServiceStub

            System.setProperty("javax.net.ssl.trustStore", key_store);
            System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
            System.setProperty("javax.net.ssl.trustStoreType", "JKS");

            // first authenticate the client. Change the host and port in the URL, appropriately.
            AuthenticationAdminServiceStub authenticationStub =
                    new AuthenticationAdminServiceStub("https://localhost:9443/services/AuthenticationAdminService");
            authenticationStub._getServiceClient().getOptions().setManageSession(true);
            boolean resp = authenticationStub.login("admin","admin",NetworkUtils.getLocalHostname());

            // get the cooke to use in the next service invoations. This lets registry service to authenticate
            // the second request
            ServiceContext serviceContext = authenticationStub._getServiceClient().getLastOperationContext().getServiceContext();
            String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
            // print the cookie
            System.out.println("session Cookie " + sessionCookie);

            // doing the registry update. Change the host and port in the URL, appropriately.
View Full Code Here

Examples of org.wso2.carbon.core.services.authentication.AuthenticationAdminServiceStub

            System.setProperty("javax.net.ssl.trustStore", key_store);
            System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
            System.setProperty("javax.net.ssl.trustStoreType", "JKS");

            // first authenticate the client. Change the host and port in the URL, appropriately.
            AuthenticationAdminServiceStub authenticationStub =
                    new AuthenticationAdminServiceStub("https://localhost:9443/services/AuthenticationAdminService");
            authenticationStub._getServiceClient().getOptions().setManageSession(true);
            boolean resp = authenticationStub.login("admin","admin",NetworkUtils.getLocalHostname());

            // get the cookie to use in the next service invoations. This lets registry service to authenticate
            // the second request
            ServiceContext serviceContext = authenticationStub._getServiceClient().getLastOperationContext().getServiceContext();
            String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
            // print the cookie
            System.out.println("session Cookie " + sessionCookie);

            // doing the registry update. Change the host and port in the URL, appropriately.
View Full Code Here

Examples of org.wso2.carbon.event.client.stub.generated.authentication.AuthenticationAdminServiceStub

            ConfigurationContext clientConfigurationContext =
                    MessageBoxServiceValueHolder.getInstance().getConfigurationContextService().getClientConfigContext();
            try {
                String servicesString = "https://" + hostName + ":" + servicePort + webContext + "services/";
                AuthenticationAdminServiceStub stub =
                        new AuthenticationAdminServiceStub(clientConfigurationContext, servicesString + "AuthenticationAdmin");
                stub._getServiceClient().getOptions().setManageSession(true);
                boolean isAuthenticated = stub.login(userName, password, NetworkUtils.getLocalHostname());

                if (isAuthenticated) {
                    ServiceContext serviceContext = stub._getServiceClient().getLastOperationContext().getServiceContext();
                    String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
                    QpidAdminServiceStub qpidAdminServiceStub = new QpidAdminServiceStub(clientConfigurationContext, servicesString + "QpidAdminService");
                    qpidAdminServiceStub._getServiceClient().getOptions().setManageSession(true);
                    qpidAdminServiceStub._getServiceClient().getOptions().setProperty(HTTPConstants.COOKIE_STRING, sessionCookie);
                    String accessKey = qpidAdminServiceStub.getAccessKey();
View Full Code Here

Examples of org.wso2.carbon.event.client.stub.generated.authentication.AuthenticationAdminServiceStub

            // getting the access key from the back end.
            ConfigurationContext clientConfigurationContext =
                    EventBrokerHolder.getInstance().getConfigurationContextService().getClientConfigContext();
            try {
                String servicesString = "https://" + hostName + ":" + servicePort + webContext + "services/";
                AuthenticationAdminServiceStub stub =
                        new AuthenticationAdminServiceStub(clientConfigurationContext, servicesString + "AuthenticationAdmin");
                stub._getServiceClient().getOptions().setManageSession(true);
                boolean isAuthenticated = stub.login(userName, password, NetworkUtils.getLocalHostname());
               
                if (isAuthenticated) {
                    ServiceContext serviceContext = stub._getServiceClient().getLastOperationContext().getServiceContext();
                    String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
                    QpidAdminServiceStub qpidAdminServiceStub = new QpidAdminServiceStub(clientConfigurationContext, servicesString + "QpidAdminService");
                    qpidAdminServiceStub._getServiceClient().getOptions().setManageSession(true);
                    qpidAdminServiceStub._getServiceClient().getOptions().setProperty(HTTPConstants.COOKIE_STRING, sessionCookie);
                    String accessKey = qpidAdminServiceStub.getAccessKey();
View Full Code Here

Examples of org.wso2.carbon.event.client.stub.generated.authentication.AuthenticationAdminServiceStub

    private String sessionCookie;
    private AuthenticationAdminServiceStub stub;

    public AuthenticationClient(ConfigurationContext configurationContext, String serviceUrl) throws AxisFault {
        //if (configurationContext != null) {
            stub = new AuthenticationAdminServiceStub(configurationContext, serviceUrl);
        //}
        stub._getServiceClient().getOptions().setManageSession(true);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.