Package org.wso2.carbon.core.common

Examples of org.wso2.carbon.core.common.AuthenticationException


        getProperty(HTTPConstants.COOKIE_STRING);
      }
      return result;
    } catch (Exception e) {
      String msg = "Error occurred while logging in";
      throw new AuthenticationException(msg, e);
    }
  }
View Full Code Here


        }

        try {
            return authenticate(request, websealuser, password, username);
        } catch (RemoteException e) {
            throw new AuthenticationException(e.getMessage(), e);
        }
    }
View Full Code Here

                                getProperty(HTTPConstants.COOKIE_STRING);
            }
            return result;
        } catch (Exception e) {
            String msg = "Error occurred while logging in";
            throw new AuthenticationException(msg, e);
        }
    }
View Full Code Here

                                getProperty(HTTPConstants.COOKIE_STRING);
            }
            return result;
        } catch (Exception e) {
            String msg = "Error occurred while logging in";
            throw new AuthenticationException(msg, e);
        }
    }
View Full Code Here

            String userNameWithDomain = username;
            username = UserCoreUtil.getTenantLessUsername(username);
            UserRealm realm = AnonymousSessionUtil.getRealmByTenantDomain(registryService,
                    realmService, tenantDomain);
            if (realm == null) {
                throw new AuthenticationException("Invalid domain or unactivated tenant login");
            }
            ServerConfiguration serverConfig = CarbonServicesServiceComponent
                    .getServerConfiguration();
            boolean isAuthenticated = realm.getUserStoreManager().authenticate(username, password);
            boolean isAuthorized = realm.getAuthorizationManager().isUserAuthorized(username,
View Full Code Here

                realm.getUserStoreManager().addRememberMe(username, uuid);
                data.setAuthenticated(true);
            }
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            throw new AuthenticationException(e.getMessage(), e);
        }
        return data;
    }
View Full Code Here

            } catch (SignatureException e) {
                String msg = "Error in creating short lived authentication token for, username: "
                        + username + ".";
                log.error(msg, e);
                throw new AuthenticationException(msg, e);
            } catch (Exception e) {
                log.error("Error authenticating " + e.getMessage(), e);
                throw new AuthenticationException("Error authenticating " + e.getMessage(), e);
            }
        }
        return null;
    }
View Full Code Here

        try {
            session.removeAttribute(ServerConstants.ADMIN_SERVICE_AUTH_TOKEN);
        } catch (java.lang.Exception e) {
            String msg = "Error occurred while logging out";
            log.error(msg, e);
            throw new AuthenticationException(msg, e);
        }
    }
View Full Code Here

        String userName = request.getParameter("username");
        String password = request.getParameter("password");
        try {
            return authenticate(request, userName, password);
        } catch (RemoteException e) {
            throw new AuthenticationException(e.getMessage(), e);
        }
    }
View Full Code Here

            setAdminCookie(authStatus);
            //Add an entry to the CarbonSSOSessionManager
            return authStatus;
        } catch (RemoteException e) {
            log.error("Error when sign-in for the user : " + username, e);
            throw new AuthenticationException("Error when sign-in for the user : " + username, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.core.common.AuthenticationException

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.