Examples of SwarmPolicyFileHiveFactory


Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

   */
  @Override
  protected void setUpHive()
  {
    // create factory
    PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
    try
    {
      // this example uses 1 policy file but you can add as many as you
      // like
      factory.addPolicyFile(getServletContext().getResource("/WEB-INF/denial.hive"));
    }
    catch (MalformedURLException e)
    {
      throw new WicketRuntimeException(e);
    }
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

   */
  @Override
  protected void setUpHive()
  {
    // create factory
    PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
    try
    {
      // this example uses 1 policy file but you can add as many as you
      // like
      factory.addPolicyFile(getServletContext().getResource("/WEB-INF/tabs.hive"));
    }
    catch (MalformedURLException e)
    {
      throw new WicketRuntimeException(e);
    }
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

  @Override
  protected void setUpHive()
  {
    if (HiveMind.getHive(getHiveKey()) == null)
    {
      PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
      try
      {
        factory
          .addPolicyFile(getServletContext().getResource("/WEB-INF/secure-rules.hive"));
      }
      catch (MalformedURLException e)
      {
        throw new WicketRuntimeException(e);
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

    // example of shared hive
    // check first
    if (HiveMind.getHive(getHiveKey()) == null)
    {
      // create factory
      PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
      try
      {
        // this example uses 1 policy file but you can add as many as
        // you
        // like
        factory.addPolicyFile(getServletContext()
          .getResource("/WEB-INF/customactions.hive"));
      }
      catch (MalformedURLException e)
      {
        throw new WicketRuntimeException(e);
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

  @Override
  protected void setUpHive()
  {
    if (HiveMind.getHive(getHiveKey()) == null)
    {
      PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
      try
      {
        factory.addPolicyFile(getServletContext().getResource("/WEB-INF/standard.hive"));
      }
      catch (MalformedURLException e)
      {
        throw new WicketRuntimeException(e);
      }
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

   */
  @Override
  protected void setUpHive()
  {
    // create factory to read policy files
    PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
    try
    {
      // this quickstart uses 1 policy file but you can add as many as you
      // like
      factory.addPolicyFile(getServletContext().getResource("/WEB-INF/application.hive"));
      // to avoid having to type the full packagename we declare an alias
      factory.setAlias("web", "org.apache.wicket.security.web");
      // alias for the principals
      factory.setAlias("principal",
        "org.apache.wicket.security.hive.authorization.SimplePrincipal");
    }
    catch (MalformedURLException e)
    {
      throw new WicketRuntimeException(e);
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

   */
  @Override
  protected void setUpHive()
  {
    // create factory
    PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
    try
    {
      // this example uses 1 policy file but you can add as many as you
      // like
      factory.addPolicyFile(getServletContext().getResource("/WEB-INF/multilogin.hive"));
      factory.setAlias("hp", "org.apache.wicket.security.examples.multilogin.pages.HomePage");
    }
    catch (MalformedURLException e)
    {
      throw new WicketRuntimeException(e);
    }
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

   */

  @Override
  protected void setUpHive()
  {
    PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
    try
    {
      log.debug("realpath:" + getServletContext().getResource("."));
      if (!factory.addPolicyFile(getServletContext().getResource("WEB-INF/standard.hive")))
      {
        log
          .error("Could not add the standard.hive policy file, authorization will not work");
        return;
      }
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

    // example of shared hive
    // check first
    if (HiveMind.getHive(getHiveKey()) == null)
    {
      // create factory
      PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
      try
      {
        // this example uses 1 policy file but you can add as many as
        // you
        // like
        factory.addPolicyFile(getServletContext().getResource("/WEB-INF/httpauth.hive"));
      }
      catch (MalformedURLException e)
      {
        throw new WicketRuntimeException(e);
      }
View Full Code Here

Examples of org.apache.wicket.security.hive.config.SwarmPolicyFileHiveFactory

      }

      @Override
      protected void setUpHive()
      {
        PolicyFileHiveFactory factory = new SwarmPolicyFileHiveFactory(getActionFactory());
        try
        {
          factory.addPolicyFile(getServletContext().getResource("WEB-INF/policy.hive"));
          factory.setAlias("SimplePrincipal",
            "org.apache.wicket.security.hive.authorization.SimplePrincipal");
          factory.setAlias("myPackage", "org.apache.wicket.security.pages");
        }
        catch (MalformedURLException e)
        {
          log.error(e.getMessage(), e);
        }
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.