Package org.sonatype.plexus.rest.resource

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor


    assertEquals("authcBasic,perms[foo]", descriptor.getFilterExpression());
  }

  @Test
  public void simplePath() {
    PathProtectionDescriptor descriptor = new PathProtectionDescriptorBuilder()
        .path("/foo")
        .build();

    log(descriptor.getPathPattern());
    assertEquals("/foo", descriptor.getPathPattern());

    log(descriptor.getFilterExpression());
    assertEquals(null, descriptor.getFilterExpression());
  }
View Full Code Here


        .build();
  }

  @Test
  public void singlePerm() {
    PathProtectionDescriptor descriptor = new PathProtectionDescriptorBuilder()
        .path("/foo")
        .authcBasic()
        .perms("foo")
        .build();

    log(descriptor.getPathPattern());
    assertEquals("/foo", descriptor.getPathPattern());

    log(descriptor.getFilterExpression());
    assertEquals("authcBasic,perms[foo]", descriptor.getFilterExpression());
  }
View Full Code Here

    setRequireStrictChecking(false);
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/metadata/*/**", "authcBasic,perms[nexus:metadata]");
  }
View Full Code Here

    assertEquals("authcBasic,perms[foo]", descriptor.getFilterExpression());
  }

  @Test
  public void multiplePerms() {
    PathProtectionDescriptor descriptor = new PathProtectionDescriptorBuilder()
        .path("/foo")
        .authcBasic()
        .perms("foo", "bar")
        .build();

    log(descriptor.getPathPattern());
    assertEquals("/foo", descriptor.getPathPattern());

    log(descriptor.getFilterExpression());
    assertEquals("authcBasic,perms[foo,bar]", descriptor.getFilterExpression());
  }
View Full Code Here

    return null;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/plexus_user/*", "authcBasic,perms[security:users]");
  }
View Full Code Here

    return RESOURCE_URI;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/attributes/*/**", "authcBasic,perms[nexus:cache]");
  }
View Full Code Here

    }
    return buff.toString();
  }

  public PathProtectionDescriptor build() {
    return new PathProtectionDescriptor(buildPathExpression(), buildFilterExpression());
  }
View Full Code Here

    return new PlexusUserSearchCriteriaResourceRequest();
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/user_search/**", "authcBasic,perms[security:users]");
  }
View Full Code Here

    return RESOURCE_URI;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/roles/*", "authcBasic,perms[security:roles]");
  }
View Full Code Here

    return RESOURCE_URI;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor(getResourceUri(), "authcBasic,perms[nexus:componentsrepotypes]");
  }
View Full Code Here

TOP

Related Classes of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

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.