Examples of AuthenticationAdminStub


Examples of org.wso2.carbon.authenticator.proxy.AuthenticationAdminStub

    }
   
    public boolean authenticate(ConfigurationContext ctx, String serverURL) throws AxisFault, AuthenticationException {
        String serviceEPR = serverURL + "AuthenticationAdmin";
//        String remoteAddress = serverURL;
        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;
        } catch (Exception e) {
            String msg = "Error occurred while logging in";
View Full Code Here

Examples of org.wso2.carbon.authenticator.proxy.AuthenticationAdminStub

    }
   
    public boolean authenticate(ConfigurationContext ctx, String serverURL) throws AxisFault, AuthenticationException {
        String serviceEPR = serverURL + "AuthenticationAdmin";
//        String remoteAddress = serverURL;
        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;
        } catch (Exception e) {
            String msg = "Error occurred while logging in";
View Full Code Here

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

    public String login() throws Exception {
        log.debug("Server login class login method called");
        FrameworkSettings.getProperty();
        String authenticationServiceURL = FrameworkSettings.SERVICE_URL + "AuthenticationAdmin";
        log.debug("AuthenticationAdminService URL = " + authenticationServiceURL);
        authenticationAdminStub = new AuthenticationAdminStub(authenticationServiceURL);
        ServiceClient client = authenticationAdminStub._getServiceClient();
        Options options = client.getOptions();
        options.setManageSession(true);

        String userName = FrameworkSettings.USER_NAME;
View Full Code Here

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

     *             if error occurs when instantiating the stub
     */
    public AuthenticationServiceClient(String cookie, String backendServerURL,
            ConfigurationContext configCtx) throws AxisFault {
        String serviceURL = backendServerURL + "AuthenticationAdmin";
        stub = new AuthenticationAdminStub(configCtx, serviceURL);
        ServiceClient client = stub._getServiceClient();
        Options option = client.getOptions();
        option.setManageSession(true);
        option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
    }
View Full Code Here

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

    public AuthenticationAdminClient(ConfigurationContext ctx, String serverURL, String cookie,
            HttpSession session, boolean doManageSession) throws AxisFault {
        this.session = session;
        this.doManageSession = doManageSession;
        String serviceEPR =  serverURL + "AuthenticationAdmin";
        stub = new AuthenticationAdminStub(ctx, serviceEPR);
        ServiceClient client = stub._getServiceClient();
        Options options = client.getOptions();
        options.setManageSession(this.doManageSession);
        if (cookie != null && this.doManageSession) {
            options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
View Full Code Here

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

        }
    }

  public boolean authenticate(ConfigurationContext ctx, String serverURL, String username, String password) throws AxisFault, AuthenticationException {
    String serviceEPR = serverURL + "AuthenticationAdmin";
    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;
    } catch (Exception e) {
      String msg = "Error occurred while logging in";
View Full Code Here

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

                                   String passWord,
                                   String hostName,
                                   String domainName)
            throws RemoteException, SocketException, LoginAuthenticationExceptionException {
        try {
            AuthenticationAdminStub authenticationAdminStub =
                    getLoggedAuthAdminStub(serverUrl, userName , passWord, hostName, domainName);
            ServiceContext serivceContext = authenticationAdminStub._getServiceClient().
                    getLastOperationContext().getServiceContext();
            return (String) serivceContext.getProperty(HTTPConstants.COOKIE_STRING);

        } catch (CSGException ex) {
            throw new AxisFault(ex.getMessage());
View Full Code Here

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

    public AuthenticationAdminStub getLoggedAuthAdminStub(String serverUrl,
                                    String userName,
                                    String passWord,
                                    String hostName,
                                    String domainName) throws CSGException {
        AuthenticationAdminStub authenticationAdminStub;
        boolean isLoggedIn;
        String stratosUserName = userName + "@" + domainName;
        try {
            if (CSGAgentUtils.isClientAxis2XMLExists()) {
                ConfigurationContext configurationContext =
                        ConfigurationContextFactory.createConfigurationContextFromFileSystem(
                                null, CSGConstant.CLIENT_AXIS2_XML);
                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

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

            String userName, String password, String remoteIp) throws Exception {
        String serviceURL = null;
        ServiceClient client = null;
        Options option = null;
        boolean isAuthenticated = false;
        AuthenticationAdminStub authStub = null;

        serviceURL = backendServerURL + "AuthenticationAdmin";
        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

Examples of org.wso2.carbon.authenticator.stub.AuthenticationAdminStub

        String userName = authConfigBean.getUserName();
        String password = authConfigBean.getPassword();
        boolean loginStatus = false;
        String authenticationServiceURL = "https://" + hostName +
                StatusMonitorAgentConstants.AUTHENTICATION_ADMIN_PATH;
        AuthenticationAdminStub authenticationAdminStub;
        try {
            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()){
                log.debug(msg);
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.