Question

I'm building a Maven Web Application user authentication. I created a new JDBC Realm in Glassfish and setup my domain classes with JPA. I can login with some created users and can check if they have a specific role. But when i secure a bean i always can access it.... The security annotation is ignored, for example @RolesAllowed, @DenyAll

Was it helpful?

Solution

Found the solution! Be sure your class is a EJB, for example with @Stateless. Then the authorization annotations will work!

http://www.oracle.com/technetwork/articles/javaee/security-annotation-142276.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top