Examples of HashLoginService


Examples of org.eclipse.jetty.security.HashLoginService

        ConstraintSecurityHandler sh = new ConstraintSecurityHandler();
        sh.setAuthenticator(new BasicAuthenticator());
        sh.setConstraintMappings(new ConstraintMapping[] {cm});

        HashLoginService loginService = new HashLoginService("MyRealm", "src/test/resources/myRealm.properties");
        sh.setLoginService(loginService);
        sh.setConstraintMappings(new ConstraintMapping[]{cm});

        return sh;
    }
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

        ConstraintSecurityHandler sh = new ConstraintSecurityHandler();
        sh.setAuthenticator(new BasicAuthenticator());
        sh.setConstraintMappings(new ConstraintMapping[] {cm});

        HashLoginService loginService = new HashLoginService("MyRealm", "src/test/resources/myRealm.properties");
        sh.setLoginService(loginService);
        sh.setConstraintMappings(new ConstraintMapping[]{cm});

        return sh;
    }
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

        ConstraintSecurityHandler sh = new ConstraintSecurityHandler();
        sh.setAuthenticator(new BasicAuthenticator());
        sh.setConstraintMappings(new ConstraintMapping[] {cm});
       
        HashLoginService loginService = new HashLoginService("MyRealm", "src/test/resources/myRealm.properties");
        sh.setLoginService(loginService);
        sh.setConstraintMappings(new ConstraintMapping[]{cm});

        return sh;
    }
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

     * @throws IOException
     */
    public void addWebApp( String context, String path ) throws IOException
    {
        // Set the default users and roles for the realm (note that realm name *must* match web.xml <realm-name>
        HashLoginService loginService = new HashLoginService( "JSPWikiRealm" );
        loginService.putUser( Users.ADMIN, new Password(Users.ADMIN_PASS), new String[] {"Authenticated", "Admin"} );
        loginService.putUser( Users.JANNE, new Password(Users.JANNE_PASS), new String[] {"Authenticated"} );

        WebAppContext webAppContext = new WebAppContext(path, context);

        // Add a security handler.
        SecurityHandler csh = new ConstraintSecurityHandler();
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

    protected void configureServer() throws Exception {
        URL resource = getClass()
            .getResource("jetty-realm.properties");
        LoginService realm =
            new HashLoginService("BookStoreRealm", resource.toString());
        server.addBean(realm);
    }
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

     * @throws IOException
     */
    public void addWebApp( String context, String path ) throws IOException
    {
        // Set the default users and roles for the realm (note that realm name *must* match web.xml <realm-name>
        HashLoginService loginService = new HashLoginService( "JSPWikiRealm" );
        loginService.putUser( Users.ADMIN, new Password(Users.ADMIN_PASS), new String[] {"Authenticated", "Admin"} );
        loginService.putUser( Users.JANNE, new Password(Users.JANNE_PASS), new String[] {"Authenticated"} );

        WebAppContext webAppContext = new WebAppContext(path, context);

        // Add a security handler.
        SecurityHandler csh = new ConstraintSecurityHandler();
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

  }

  @Override
  protected LoginService getHandlerLoginService() {
    String realmFile = configuration.get(Constants.Security.BASIC_REALM_FILE);
    HashLoginService loginService = new HashLoginService();
    loginService.setConfig(realmFile);
    loginService.setIdentityService(getHandlerIdentityService());
    return loginService;
  }
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

    constraint.setName("security" + servletDefinition.hashCode());

    if (servletDefinition.isRequireBasicAuth()) {
      // add basic authentication and role-based authorization based on
      // the credentials store (realm file)
      LoginService loginService = new HashLoginService(
          "elastisys:scale security realm",
          servletDefinition.getRealmFile());
      securityHandler.getServer().addBean(loginService);
      securityHandler.setAuthenticator(new BasicAuthenticator());
      securityHandler.setLoginService(loginService);
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

        ConstraintSecurityHandler sh = new ConstraintSecurityHandler();
        sh.setAuthenticator(new BasicAuthenticator());
        sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[] {cm}));

        HashLoginService loginService = new HashLoginService("MyRealm", "src/test/resources/myRealm.properties");
        sh.setLoginService(loginService);
        sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[]{cm}));

        return sh;
    }
View Full Code Here

Examples of org.eclipse.jetty.security.HashLoginService

        ConstraintSecurityHandler sh = new ConstraintSecurityHandler();
        sh.setAuthenticator(new BasicAuthenticator());
        sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[] {cm}));

        HashLoginService loginService = new HashLoginService("MyRealm", "src/test/resources/myRealm.properties");
        sh.setLoginService(loginService);
        sh.setConstraintMappings(Arrays.asList(new ConstraintMapping[]{cm}));

        return sh;
    }
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.