문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top