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

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


   
    try {
      result = identity.login();
    }
    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);
    }
View Full Code Here


  public User login(final String username, final String password) {
    if (!keycloakIsLoggedIn()) {
      return wrappedAuthService.login(username, password);
    }
    else {
      throw new AlreadyLoggedInException("Already logged in through Keycloak.");
    }
  }
View Full Code Here

   *
   * @param keycloakSecurityContext The context used to generate the logged in Keycloak {@link User}.
   */
  void setSecurityContext(final KeycloakSecurityContext keycloakSecurityContext) {
    if (wrappedAuthService.isLoggedIn() && keycloakSecurityContext != null) {
      throw new AlreadyLoggedInException("Logged in as " + wrappedAuthService.getUser());
    }
    this.keycloakSecurityContext = keycloakSecurityContext;
    keycloakUser = null;
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.security.shared.exception.AlreadyLoggedInException

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.