New Security API 1.0 supports the existing declarative security as expressed by constraints in web.xml or annotations like @RolesAllowed keep working as they have always worked. But JAX-RS API does not support the @RolesAllowed or other security annotations.
New Security API 1.0 supports the existing declarative security as expressed by constraints in web.xml or annotations like @RolesAllowed keep working as they have always worked. But JAX-RS API does not support the @RolesAllowed or other security annotations.
Example : https://github.com/payara/Payara-Examples/tree/master/Java-EE/security-jwt-example https://github.com/payara/Payara-Examples/blob/master/Java-EE/security-jwt-example/src/main/webapp/WEB-INF/web.xml