Package com.example.helloworld.auth
Class ExampleAuthorizer
java.lang.Object
com.example.helloworld.auth.ExampleAuthorizer
- All Implemented Interfaces:
Authorizer<User>
-
Constructor Details
-
ExampleAuthorizer
public ExampleAuthorizer()
-
-
Method Details
-
authorize
public boolean authorize(User user, String role, @Nullable jakarta.ws.rs.container.ContainerRequestContext ctx) Description copied from interface:Authorizer
Decides if access is granted for the given principal in the given role.- Specified by:
authorize
in interfaceAuthorizer<User>
- Parameters:
user
- aPrincipal
object, representing a userrole
- a user rolectx
- a request context.- Returns:
true
, if the access is granted,false otherwise
-