I have two apps, server side is based on java with rest easy and client where I'm using angular js.
I used basic authentication where I generated token in first request and all requests used this token, but since I moved project to Wildfly, and there is no Tomcat this way doesn't work.
My class TokenAuthenticator
extends BasicAuthenticator
from Catalina;
web.xml has:
<login-config>
<realm-name>App</realm-name>
</login-config>
<security-role>
<role-name>user</role-name>
</security-role>
and jboss-web.xml:
<jboss-web>
<security-domain>App</security-domain>
<valve>
<class-name>package.TokenAuthenticator</class-name>
</valve>
<context-root>/app-server</context-root>
</jboss-web>
In my EJB beans I'm using @RolesAllowed
annotation to restrict access to resources.
I read that for now, Wildfly doesn't support valves.
What is my the best alternative?