@Path(value="/endp") @DenyAll @RequestScoped public class RolesEndpoint extends Object
Constructor and Description |
---|
RolesEndpoint() |
Modifier and Type | Method and Description |
---|---|
jakarta.ws.rs.core.Response |
checkIsUserInRole(jakarta.ws.rs.core.SecurityContext sec)
This endpoint requires a Tester role, and also validates that the caller has the role Echoer by calling
SecurityContext.isUserInRole(String).
|
String |
echoInput(jakarta.ws.rs.core.SecurityContext sec,
String input) |
String |
echoInput2(jakarta.ws.rs.core.SecurityContext sec,
String input) |
String |
echoInputPermitAll(jakarta.ws.rs.core.SecurityContext sec,
String input) |
String |
echoNeedsToken2Role(jakarta.ws.rs.core.SecurityContext sec,
String input) |
String |
getInjectedPrincipal(jakarta.ws.rs.core.SecurityContext sec) |
String |
getPrincipalClass(jakarta.ws.rs.core.SecurityContext sec)
Validate that the SecurityContext#getUserPrincipal is a JsonWebToken
|
String |
heartbeat() |
String |
needsGroup1Mapping(jakarta.ws.rs.core.SecurityContext sec)
This endpoint requires a role that is mapped to the group1 role
|
@GET @Path(value="/echo") @RolesAllowed(value="Echoer") public String echoInput(@Context jakarta.ws.rs.core.SecurityContext sec, @QueryParam(value="input") String input)
@GET @Path(value="/echo-permit-all") @PermitAll public String echoInputPermitAll(@Context jakarta.ws.rs.core.SecurityContext sec, @QueryParam(value="input") String input)
@GET @Path(value="/echo2") @RolesAllowed(value="NoSuchUser") public String echoInput2(@Context jakarta.ws.rs.core.SecurityContext sec, @QueryParam(value="input") String input)
@GET @Path(value="/echoNeedsToken2Role") @RolesAllowed(value="Token2Role") public String echoNeedsToken2Role(@Context jakarta.ws.rs.core.SecurityContext sec, @QueryParam(value="input") String input)
@GET @Path(value="/getPrincipalClass") @RolesAllowed(value="Tester") public String getPrincipalClass(@Context jakarta.ws.rs.core.SecurityContext sec)
sec
- @GET @Path(value="/needsGroup1Mapping") @RolesAllowed(value="Group1MappedRole") public String needsGroup1Mapping(@Context jakarta.ws.rs.core.SecurityContext sec)
@GET @Path(value="/checkIsUserInRole") @RolesAllowed(value="Tester") public jakarta.ws.rs.core.Response checkIsUserInRole(@Context jakarta.ws.rs.core.SecurityContext sec)
@GET @Path(value="/getInjectedPrincipal") @RolesAllowed(value="Tester") public String getInjectedPrincipal(@Context jakarta.ws.rs.core.SecurityContext sec)
@GET @Path(value="/heartbeat") @PermitAll public String heartbeat()
Copyright © 2017 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.