Package org.picketlink.Identity

Examples of org.picketlink.Identity.AuthenticationResult


            if(session.getAttribute(SESSION_REDIRECT) == null) {
                session.setAttribute(SESSION_REDIRECT, request.getHeader(REFERER));
            }

            try {
                AuthenticationResult status = identity.login();
                if(status == AuthenticationResult.FAILED) {
                    if(response.getStatus() == 302) { // Authenticator is requesting a redirect
                        return;
                    }
                    response.setStatus(400);
View Full Code Here


  @Override
  public org.jboss.errai.security.shared.api.identity.User login(String username, String password) {
    credentials.setUserId(username);
    credentials.setPassword(password);
   
    final AuthenticationResult result;
   
    try {
      result = identity.login();
    }
    catch (UserAlreadyLoggedInException ex) {
View Full Code Here

        when(user.getLoginName()).thenReturn("john");
    }

    @Test
    public void testLogin() throws Exception {
        AuthenticationResult result = AuthenticationResult.SUCCESS;
        when(identity.login()).thenReturn(result);
        when(credentialMatcher.isValid()).thenReturn(true);
        boolean status = authenticationManager.login(user, "123");
        assertTrue("Login result should return true", status);
    }
View Full Code Here

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

    final AuthenticationResult result;
   
    try {
      result = identity.login();
    }
    catch (UserAlreadyLoggedInException ex) {
View Full Code Here

TOP

Related Classes of org.picketlink.Identity.AuthenticationResult

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.