Examples of authenticate()


Examples of org.apache.ace.authentication.processor.basicauth.BasicHttpAuthenticationProcessor.authenticate()

        when(user.getName()).thenReturn("bob");
        when(user.hasCredential(eq(keyPassword), eq("secret"))).thenReturn(Boolean.TRUE);

        when(m_userAdmin.getUser(eq(keyUsername), eq("bob"))).thenReturn(user);

        User result = processor.authenticate(m_userAdmin, m_servletRequest);
        assert result != null : "Expected a valid user to be returned!";
       
        assert "bob".equals(user.getName()) : "Expected user bob to be returned!";
    }
View Full Code Here

Examples of org.apache.ace.authentication.processor.clientcert.ClientCertAuthenticationProcessor.authenticate()

        User user = mock(User.class);
        when(user.getName()).thenReturn("bob");

        when(m_userAdmin.getUser(eq(lookupKey), eq("CN=Bob,OU=dev,DC=acme,DC=corp"))).thenReturn(user);

        User result = processor.authenticate(m_userAdmin, m_servletRequest);
        assert result != null : "Expected a valid user to be returned!";

        assert "bob".equals(user.getName()) : "Expected bob to be returned as user!";
    }
View Full Code Here

Examples of org.apache.ace.authentication.processor.password.PasswordAuthenticationProcessor.authenticate()

        when(user.getName()).thenReturn("bob");
        when(user.hasCredential(eq(keyPassword), eq(hashedPw))).thenReturn(Boolean.TRUE);

        when(m_userAdmin.getUser(eq(keyUsername), eq("bob"))).thenReturn(user);

        User result = processor.authenticate(m_userAdmin, "bob", "secret");
        assert result != null : "Expected a valid user to be returned!";
       
        assert "bob".equals(user.getName()) : "Expected bob to be returned!";
    }
   
View Full Code Here

Examples of org.apache.airavata.security.Authenticator.authenticate()

            if (authenticator.isAuthenticated(httpServletRequest)) {
                // Allow request to flow
                filterChain.doFilter(servletRequest, servletResponse);
            } else {
                try {
                    if (!authenticator.authenticate(httpServletRequest)) {
                        //sendUnauthorisedError(servletResponse, "Unauthorised : Provided credentials are not valid.");
                        populateUnauthorisedData(servletResponse, "Invalid request. Request does not contain sufficient credentials to authenticate");
                    } else {
                        // Allow request to flow
                        filterChain.doFilter(servletRequest, servletResponse);
View Full Code Here

Examples of org.apache.airavata.security.UserStore.authenticate()

        NodeList configurations = doc.getElementsByTagName("specificConfigurations");
        UserStore userStore = new LDAPUserStore();
        userStore.configure(configurations.item(0));

        assertTrue(userStore.authenticate("amilaj", "secret"));
    }



}
View Full Code Here

Examples of org.apache.axis.security.SecurityProvider.authenticate()

                    null, null );

            String passwd = (String) msgContext.getProperty( MessageContext.PASSWORD );
            category.debug( "Pass: " + passwd );

            AuthenticatedUser authUser = provider.authenticate(msgContext);

            // if a password is defined, then it must match
            if ( authUser == null)
                throw new AxisFault( "Server.Unauthenticated",
                    "User '" + userID + "' not authenticated",
View Full Code Here

Examples of org.apache.beehive.wsm.axis.security.User.authenticate()

                logger.debug("user returned from userList is null");
            }
            return false; // user doesn't exist.
        }

        if ( ! user.authenticate( msgContext.getPassword() ) )
        {
            if (logger.isDebugEnabled()) {
                logger.debug("authenticate failed");
            }
            return false; // password doesn't match.
View Full Code Here

Examples of org.apache.catalina.Realm.authenticate()

         }
      }
      String username = request.getParameter(Constants.FORM_USERNAME);
      String password = request.getParameter(Constants.FORM_PASSWORD);
      log.trace("Authenticating username '" + username + "'");
      principal = realm.authenticate(username, password);
      if (principal == null) {
          forwardToErrorPage(request, response, config);
          return (AuthStatus.FAILURE);
      }
View Full Code Here

Examples of org.apache.catalina.authenticator.AuthenticatorBase.authenticate()

        byte[] alreadyCalled = (byte[]) reentrancyStatus.get();
        if (alreadyCalled[0] == 1) {
            //Re-entrancy from a JSR 196  module, so call the authenticate directly
            try {
                return authBase.authenticate(this, (HttpResponse) getResponse(),
                        context.getLoginConfig());
            } catch (Exception ex) {
                throw new ServletException("Exception thrown while attempting to authenticate", ex);
            }
View Full Code Here

Examples of org.apache.catalina.startup.TesterMapRealm.authenticate()

        realm.setDigest(digest);
        realm.start();

        realm.addUser(USER1, digestedPassword);

        Principal p = realm.authenticate(USER1, password);

        Assert.assertNotNull(p);
        Assert.assertEquals(USER1, p.getName());
    }
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.