Examples of authenticate()


Examples of org.apache.lenya.ac.file.FileUser.authenticate()

     * @throws AccessControlException if an error occurs
     */
    final public void testAuthenticate() throws AccessControlException {
        String password = "daisy";
        FileUser user = createAndSaveUser("mickey", "Mickey Mouse", "mickey@mouse.com", password);
        assertTrue(user.authenticate(password));

        File configDir = getAccreditablesDirectory();
        FileUserManager manager = null;
        manager = FileUserManager.instance(configDir);
        assertNotNull(manager);
View Full Code Here

Examples of org.apache.openejb.server.cxf.fault.AuthenticatorService.authenticate()

                e.printStackTrace();
                fail("A throwable instead of a checked exception...");
            }

            try {
                noHandler.authenticate("John", "Doe");
            } catch (WrongPasswordException e) {
                System.out.println("My lovely checked exception...");
            } catch (Throwable e) {
                e.printStackTrace();
                fail("A throwable instead of a checked exception...");
View Full Code Here

Examples of org.apache.pivot.web.BasicAuthentication.authenticate()

        final GetQuery getQuery = new GetQuery(HOSTNAME, PORT, PATH, SECURE);
        getQuery.getParameters().put("a", "b");
        getQuery.setSerializer(new BinarySerializer());
        getQuery.getRequestHeaders().add("bar", "hello");
        getQuery.getRequestHeaders().add("bar", "world");
        authentication.authenticate(getQuery);
        queryGroup.add(getQuery);

        // POST
        final PostQuery postQuery = new PostQuery(HOSTNAME, PORT, PATH, SECURE);
        authentication.authenticate(postQuery);
View Full Code Here

Examples of org.apache.qpid.server.security.SubjectCreator.authenticate()

                throw body.getConnectionException(AMQConstant.RESOURCE_ERROR, "Unable to create SASL Server:" + body.getMechanism());
            }

            session.setSaslServer(ss);

            final SubjectAuthenticationResult authResult = subjectCreator.authenticate(ss, body.getResponse());
            //save clientProperties
            session.setClientProperties(body.getClientProperties());

            MethodRegistry methodRegistry = session.getMethodRegistry();
View Full Code Here

Examples of org.apache.qpid.server.security.auth.AuthenticationManager.authenticate()

        if (ss == null)
        {
            throw new AMQException("No SASL context set up in session");
        }

        AuthenticationResult authResult = authMgr.authenticate(ss, body.response);
        switch (authResult.status)
        {
            case ERROR:
                // Can't do this as we violate protocol. Need to send Close
                // throw new AMQException(AMQConstant.NOT_ALLOWED.getCode(), AMQConstant.NOT_ALLOWED.getName());
View Full Code Here

Examples of org.apache.qpid.server.security.auth.manager.AuthenticationManager.authenticate()

                        {
                            SocketAddress address = getSocketAddress(request);
                            AuthenticationManager authenticationManager =
                                    ApplicationRegistry.getInstance().getAuthenticationManager(address);
                            AuthenticationResult authResult =
                                    authenticationManager.authenticate(credentials[0], credentials[1]);
                            subject = authResult.getSubject();

                        }
                    }
                }
View Full Code Here

Examples of org.apache.shale.usecases.logic.LogonLogic.authenticate()

     */
    public String logon() {

        // Attempt a successful authentication
        LogonLogic logic = (LogonLogic) getBean(LOGIC_BEAN);
        User user = logic.authenticate(username, password);
        if (user != null) {
            if (user.isConfirmed()) {
                // Confirmed user, log him/her on
                register(user);
                if (isRememberMe()) {
View Full Code Here

Examples of org.apache.shiro.mgt.RealmSecurityManager.authenticate()

    }

    // Ask the sec-manager to authenticate, this won't alter the current subject
    RealmSecurityManager sm = security.getSecurityManager();
    try {
      sm.authenticate(new UsernamePasswordToken(username, password));
    }
    catch (AuthenticationException e) {
      log.trace("Authentication failed", e);
      throw new WebApplicationException("Authentication failed", Status.FORBIDDEN);
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.auth.SlingAuthenticator.authenticate()

        SlingAuthenticator authenticator = slingAuthenticator;
        if (authenticator != null) {
            try {

                return authenticator.authenticate(request, response);

            } catch (MissingRepositoryException mre) {

                log.error("handleSecurity: Cannot authenticate request: "
                    + mre.getMessage());
View Full Code Here

Examples of org.apache.sshd.server.PasswordAuthenticator.authenticate()

    }

    private boolean checkPassword(ServerSession session, String username, String password) throws Exception {
        PasswordAuthenticator auth = session.getServerFactoryManager().getPasswordAuthenticator();
        if (auth != null) {
            return auth.authenticate(username, password, session);
        }
        throw new Exception("No PasswordAuthenticator configured");
    }

}
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.