Package org.wso2.carbon.authenticator.stub

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub.login()


        AuthenticationAdminStub stub = new AuthenticationAdminStub(ctx, serviceEPR);
        ServiceClient client = stub._getServiceClient();
        Options options = client.getOptions();
        options.setManageSession(true);
        try {
            boolean result = stub.login(username, password, serviceEPR);
            if (result) {
                cookie = (String) stub._getServiceClient().getServiceContext().
                                getProperty(HTTPConstants.COOKIE_STRING);
            }
            return result;
View Full Code Here


    AuthenticationAdminStub stub = new AuthenticationAdminStub(ctx, serviceEPR);
    ServiceClient client = stub._getServiceClient();
    Options options = client.getOptions();
    options.setManageSession(true);
    try {
      boolean result = stub.login(username, password, serviceEPR);
      if (result){
        cookie = (String) stub._getServiceClient().getServiceContext().
        getProperty(HTTPConstants.COOKIE_STRING);
      }
      return result;
View Full Code Here

                authenticationAdminStub =
                        new AuthenticationAdminStub(configurationContext, serverUrl);
            } else {
                authenticationAdminStub = new AuthenticationAdminStub(serverUrl);
            }
            isLoggedIn = authenticationAdminStub.login(stratosUserName, passWord, hostName);
        } catch (Exception e) {
            throw new CSGException(e);
        }

        if(!isLoggedIn){
View Full Code Here

        authStub = new AuthenticationAdminStub(configCtx, serviceURL);
        client = authStub._getServiceClient();
        option = client.getOptions();
        option.setManageSession(true);
        option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, authCookie);
        isAuthenticated = authStub.login(userName, password, remoteIp);
        authCookie = (String) authStub._getServiceClient().getServiceContext()
                .getProperty(HTTPConstants.COOKIE_STRING);
        return isAuthenticated;
    }
}
View Full Code Here

            authenticationAdminStub = new AuthenticationAdminStub(authenticationServiceURL);
            ServiceClient client = authenticationAdminStub._getServiceClient();
            Options options = client.getOptions();
            options.setManageSession(true);

            loginStatus = authenticationAdminStub.login(userName, password, hostName);
            ServiceContext serviceContext = authenticationAdminStub.
                    _getServiceClient().getLastOperationContext().getServiceContext();
            // String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
            String msg = "Log in client successfully logged in to the service: " + hostName;
            if (log.isDebugEnabled()){
View Full Code Here

            ServiceClient client = authenticationAdminStub._getServiceClient();
            Options options = client.getOptions();
            options.setManageSession(true);

            Boolean status;
            status = authenticationAdminStub.login(userName, password,
                    StatusMonitorConstants.MANAGER_HOST);
            ServiceContext serviceContext = authenticationAdminStub.
                    _getServiceClient().getLastOperationContext().getServiceContext();
            // String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
View Full Code Here

            ServiceClient client = authenticationAdminStub._getServiceClient();
            Options options = client.getOptions();
            options.setManageSession(true);

            Boolean status;
            status = authenticationAdminStub.login(authConfigBean.getUserName(),
                    authConfigBean.getPassword(), StatusMonitorConstants.IDENTITY_HOST);
            ServiceContext serviceContext = authenticationAdminStub.
                    _getServiceClient().getLastOperationContext().getServiceContext();
            // String sessionCookie = (String) serviceContext.getProperty(HTTPConstants.COOKIE_STRING);
View Full Code Here

            // 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);
View Full Code Here

            // 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);
View Full Code Here

        boolean authenticate = false;

        serviceURL = backendServerURL + "AuthenticationAdmin";
        authStub = new AuthenticationAdminStub(configCtx, serviceURL);
        authStub._getServiceClient().getOptions().setManageSession(true);
        authenticate = authStub.login(userName, password, remoteIp);
        authCookie = (String) authStub._getServiceClient().getServiceContext().getProperty(
                HTTPConstants.COOKIE_STRING);
        return authenticate;
    }
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.