Package org.eclipse.jetty.util.security

Examples of org.eclipse.jetty.util.security.Password


            if (isJSecurityCheck(uri))
            {
                final String username = request.getParameter(__J_USERNAME);
                final String password = request.getParameter(__J_PASSWORD);
           
                boolean success = tryLogin(messageInfo, clientSubject, response, session, username, new Password(password));
                if (success)
                {
                    // Redirect to original request                   
                    String nuri=null;
                    synchronized(session)
View Full Code Here


        credentials = credentials.substring(credentials.indexOf(' ')+1);
        credentials = B64Code.decode(credentials, StandardCharsets.ISO_8859_1);
        int i = credentials.indexOf(':');
        String userName = credentials.substring(0,i);
        String password = credentials.substring(i+1);
        return login(clientSubject, userName, new Password(password), authMethod, messageInfo);
    }
View Full Code Here

    final Server server = new Server(port);
    @SuppressWarnings("ConstantConditions")
    String webDir = EventHubHandler.class.getClassLoader().getResource("frontend").toExternalForm();
    HashLoginService loginService = new HashLoginService();
    loginService.putUser(properties.getProperty("eventhubhandler.username"),
        new Password(properties.getProperty("eventhubhandler.password")), new String[]{"user"});

    server.addBean(loginService);

    ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler();
    Constraint constraint = new Constraint();
View Full Code Here

    securityHandler.setConstraintMappings(new ConstraintMapping[]{cm});
    HashLoginService hashLoginService = new HashLoginService("Test Server");
    securityHandler.setLoginService(hashLoginService);
    webappContext.setSecurityHandler(securityHandler);

    hashLoginService.putUser("admin", new Password("admin"), new String[]{"users"});

    server.start();

    // ping nexus to wake up
    startNx();
View Full Code Here

                            {
                                while (rs2.next())
                                    roles.add(rs2.getString(_roleTableRoleField));
                            }
                        }
                        return putUser(userName,new Password(credentials), roles.toArray(new String[roles.size()]));
                    }
                }
            }
        }
        catch (NamingException e)
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.util.security.Password

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.