Package org.sonatype.plexus.rest.resource

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


    return RESOURCE_URI;
  }

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


    return RESOURCE_URI;
  }

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

    return new UserToRoleResourceRequest();
  }

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

    return RESOURCE_URI;
  }

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

    return RESOURCE_URI;
  }

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

    return RESOURCE_URI;
  }

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

    return RESOURCE_URI;
  }

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

    );
  }

  @Test(expected = IllegalStateException.class)
  public void handlePlexusResourceSecurityWithMismatch() {
    final PathProtectionDescriptor descriptor = new PathProtectionDescriptor("/foo/bar/*", "");
    Mockito.when(mockResource.getResourceProtection()).thenReturn(descriptor);
    Mockito.when(mockResource.getResourceUri()).thenReturn("/foo/baz");
    nexusApplication.handlePlexusResourceSecurity(mockResource);
  }
View Full Code Here

    return null;
  }

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

    nexusApplication.handlePlexusResourceSecurity(mockResource);
  }

  @Test
  public void handlePlexusResourceSecurityWithoutMismatch() {
    final PathProtectionDescriptor descriptor = new PathProtectionDescriptor("/foo/bar/*", "");
    Mockito.when(mockResource.getResourceProtection()).thenReturn(descriptor);
    Mockito.when(mockResource.getResourceUri()).thenReturn("/foo/bar/{pattern}");
    nexusApplication.handlePlexusResourceSecurity(mockResource);
  }
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.