Package org.wso2.carbon.bam.core.clients

Examples of org.wso2.carbon.bam.core.clients.AuthenticationAdminClient_3_1_0.authenticate()


        try {
            AuthenticationAdminClient_2_0_2 authenticationAdminClient_2_0_2 =
                    new AuthenticationAdminClient_2_0_2(server.getServerURL());

            isLoggedIn = authenticationAdminClient_2_0_2.authenticate(server.getUserName(), server.getPassword());

            if (isLoggedIn) {
                String sessionCookie = authenticationAdminClient_2_0_2.getSessionCookie();
                getSessionCache().addSessionString(server.getServerURL(), sessionCookie);
            }
View Full Code Here


        try {
            AuthenticationAdminClient_2_0_3 authenticationAdminClient_2_0_3 =
                    new AuthenticationAdminClient_2_0_3(server.getServerURL());

            isLoggedIn = authenticationAdminClient_2_0_3.authenticate(server.getUserName(), server.getPassword());

            if (isLoggedIn) {
                String sessionCookie = authenticationAdminClient_2_0_3.getSessionCookie();
                getSessionCache().addSessionString(server.getServerURL(), sessionCookie);
            }
View Full Code Here

        try {
            AuthenticationAdminClient_3_1_0 authenticationAdminClient_3_1_0 =
                    new AuthenticationAdminClient_3_1_0(server.getServerURL());

            isLoggedIn = authenticationAdminClient_3_1_0.authenticate(server.getUserName(), server.getPassword());

            if (isLoggedIn) {
                String sessionCookie = authenticationAdminClient_3_1_0.getSessionCookie();
                getSessionCache().addSessionString(server.getServerURL(), sessionCookie);
            }
View Full Code Here

            try {
                new Socket(url.getHost(), port); //this is just to check if the server is up
                boolean authenticated;
                try {
                    AuthenticationAdminClient_3_2_0 authenticationAdminClient = new AuthenticationAdminClient_3_2_0(monitoredServer.getServerURL());
                    authenticated = authenticationAdminClient.authenticate(monitoredServer.getUserName(), monitoredServer.getPassword());
                } catch (Exception e) {
                    if (e.getMessage().indexOf("404") > 0) {
                        return BAMConstants.SERVER_AUTH_FAILED_404;
                    } else {
                        //this is for backward compatibility with the old stubs
View Full Code Here

        boolean isLoggedIn = false;

        try {
            AuthenticationAdminClient_3_2_0 authenticationAdminClient = new AuthenticationAdminClient_3_2_0(server.getServerURL());

            isLoggedIn = authenticationAdminClient.authenticate(server.getUserName(), server.getPassword());

            if (isLoggedIn) {
                String sessionCookie = authenticationAdminClient.getSessionCookie();
                getSessionCache().addSessionString(server.getServerURL(), sessionCookie);
            }
View Full Code Here

            String authAdminUrl = "https://" + url.getHost() + ":" + url.getPort()  /* "https://localhost:9443" */
                    + urlContext + "/services/AuthenticationAdmin";                 /* "/wsas/services/AuthenticationAdmin" */

            AuthenticationClient authenticationClient = new AuthenticationClient(configurationContext, authAdminUrl);

            if (authenticationClient.authenticate(userName, password)) {
                this.cookie = authenticationClient.getSessionCookie();
            } else {
                throw new AuthenticationExceptionException("authentication Fault");
            }
        } catch (RemoteException e) {
View Full Code Here

        // attempts to do multi-factor authentication, if the user has enabled it.
        if (xmppSettingsDO != null && xmppSettingsDO.isXmppEnabled() && isAutheticated) {
            MPAuthenticationProvider mpAuthenticationProvider = new MPAuthenticationProvider(
                    xmppSettingsDO);
            authenticationStatus = mpAuthenticationProvider.authenticate();
            if (log.isDebugEnabled()) {
                log.debug("XMPP Multifactor Authentication was completed Successfully.");
            }
        }
View Full Code Here

        // attempts to do multi-factor authentication, if the user has enabled
        // it.
        if (xmppSettingsDO != null && xmppSettingsDO.isXmppEnabled()) {
            MPAuthenticationProvider mpAuthenticationProvider = new MPAuthenticationProvider(
                    xmppSettingsDO);
            authenticationStatus = mpAuthenticationProvider.authenticate();
        }

        if (log.isInfoEnabled()) {
            log.info("XMPP Multifactor Authentication was completed Successfully.");
        }
View Full Code Here

     */
    public static boolean doLogin(String username, String password) {
        try {
            UserStoreManager userStore = IdentityTenantUtil.getRealm(null, username)
                    .getUserStoreManager();
            return userStore.authenticate(username, password);
        } catch (Exception e) {
            log.error("Error while authenticating user", e);
            return false;
        }

View Full Code Here

                throw new RegistryException(msg, e);
            }
            if (authenticator.getTenantId() > 0) {
                userName = UserCoreUtil.getTenantLessUsername(userName);
            }
            if (!authenticator.authenticate(userName, password)) {
                String msg = "Attempted to authenticate invalid user.";
                log.warn(msg);
                throw new AuthorizationFailedException(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.