javaee8-samples
                                
                                 javaee8-samples copied to clipboard
                                
                                    javaee8-samples copied to clipboard
                            
                            
                            
                        jwt does not run on wildfly
hi! I'm trying to run jwt on wildfly 14 adding web.xml and beans.xml in the generated war the application starts but authentication does not work.
no class is initialized when the application starts when calling /api/login with the parameters securityContext.getCallerPrincipal () is still null, so we get a 401 and that does not go any further.
it seems that there is no explanation of how it works to make it possible to understand what is meant to be done.
A+JYT
Thanks for the report. It should of course work on WildFly 14. Whenever I've got some time I'll take a look.
Hi,
To begin, thank you for the samples and all the work.
I've got many errors deploying on Payara, to make it run :
- I added @RequestScoped on Controllers classes otherwise SecurityContext injection seems to fail
- I added @RequestScoped on TokenProvider class otherwise injection fail JWTAuthenticationMechanism
- Uncomment @RollesAllowed in SampleController to avoid null on securityContext.getCallerPrincipal().getName()
- I execute "mvn clean package -DskipTests" before running
I don't know if my modifications are the good way but if it can help waiting official solution...