Class ProtectedClassResource


  • @Path("/protected")
    @RolesAllowed("BASIC_GUY")
    public final class ProtectedClassResource
    extends Object
    RolesAllowed, PermitAll are supported on the class level.

    Method level annotations take precedence over the class level ones

    • Constructor Detail

      • ProtectedClassResource

        public ProtectedClassResource()
    • Method Detail

      • showSecret

        @GET
        @PermitAll
        @Path("guest")
        public String showSecret​(User user)
      • showBasicUserSecret

        @GET
        public String showBasicUserSecret​(@Context
                                          jakarta.ws.rs.core.SecurityContext context)
      • showAdminSecret

        @GET
        @RolesAllowed("ADMIN")
        @Path("admin")
        public String showAdminSecret​(User user)