Package org.jboss.errai.security.shared.exception

Examples of org.jboss.errai.security.shared.exception.AuthenticationException


  public User login(String username, String password) {
    credentials.setUserId(username);
    credentials.setCredential(new Password(password));

    if (identity.login() != Identity.AuthenticationResult.SUCCESS) {
      throw new AuthenticationException();
    }

    final User user = createUser((org.picketlink.idm.model.basic.User) identity.getAccount(), getRoles());
    return user;
  }
View Full Code Here


    catch (UserAlreadyLoggedInException ex) {
      throw new UserAlreadyLoggedInException("Already logged in as "
              + ((User) identity.getAccount()).getLoginName());
    }
    catch (RuntimeException ex) {
      throw new AuthenticationException("An error occurred during authentication.", ex);
    }

    if (result == Identity.AuthenticationResult.SUCCESS) {
      final User picketLinkUser = (User) identity.getAccount();
      final TodoListUser todoListUser = lookupTodoListUser(picketLinkUser.getEmail());
View Full Code Here

    catch (UserAlreadyLoggedInException ex) {
      throw new AlreadyLoggedInException("Already logged in as "
              + ((org.picketlink.idm.model.basic.User) identity.getAccount()).getLoginName());
    }
    catch (RuntimeException ex) {
      throw new AuthenticationException("An error occurred while authenticating.", ex);
    }

    if (result != Identity.AuthenticationResult.SUCCESS) {
      throw new FailedAuthenticationException();
    }
View Full Code Here

TOP

Related Classes of org.jboss.errai.security.shared.exception.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.