-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jersey-pac4j + Payara 5 not working #45
Comments
@sebargarcia could you verify which version of Jersey is used in Paraya 5 and could you also show me what are the dependencies you have been using to setup pac4j. You need to use either |
Yes sure, payara 5 uses jersey 2.26
I will do a very basic project to test this. |
mmm wait i re check and apparently payara 5.182 uses jersey 2.27 |
I suppose there was more breaking changes in jersey 2.27. This must be investigated. I can't promise anything, so I would recommend that you at least do the investigation and see if either:
|
Until then, you can stick to a version using jersey 2.26... it's not ideal but well... :) |
I will do. and comment on this issue, is this okey? thanks. |
yes, that would be excellent to keep everything here, so that we can decide how to best solve this together. |
Hi, I'm not sure about this but I think I read some time ago that the goal of Jersey 2.26 was to loose the coupling to the injection framework (HK2) and that HK2 is now an optional dependency. You should try adding it to your classpath:
|
@pierre-l okey I will try. Yesterday I tried with payara 5.181 (Jersery 2.26) and works like a charm. |
@sebargarcia Ok, glad to read this, but I guess this means my proposal won't work and jax-rs-pac4j |
Well, no goods news here. Yesterday trying all my endpoints with payara 5.181 (Jersey 2.26) I got again the error with hk2
I was confused because some end points works well and others throws that exception. So looking for differences I found that when I use @BeanParam instead of @QueryParam it throws the error. For example this works And the same but with @BeanParam throws the exception My BeanParam Class is
}` I tried with no bean validation an got the same error.
|
@sebargarcia I have 2 possible causes in mind:
Do you know how the Application/ResourceConfig is built? Do you define it yourself or is it Payara's responsibility? |
Today I will write a minimal example project and see if works. `@ApplicationPath("api/v1")
}` And I register PAC4J with a Provider
|
I just looked a bit a jersey 2.27 and almost nothing changed in it, they were just in preparation for donating the project to the eclipse fundation. I suspect a problem with Payara: the error |
Well I made a simple example only with pac4j dependencies. You can clone the project here https://github.com/sebargarcia/testpac4j It has 3 endpoints. (one for generate the profile and the jwt token, and others 2 that uses jwt token) In payara 5.181 Its works but when I use @BeanParams I got errors. (one endpoint in the project uses @BeanParam) |
@sebargarcia great, I will take a look at that during the week |
@victornoel any update? seeing this now blocking pac4j/dropwizard-pac4j#51 due to all the error logging |
@leleuj i opened a pr for a fix if you don't mind taking a look |
@leleuj can we also get a version cut for this? or should I open another issue? |
No need for a new issue, I will do that next week. |
I cut the release which is now available in the Maven central repo. |
Hi, I migrate from Payara 4 to Payara 5 and updates pac4j libraries from version 1.9.x to the last one 3.x.x .I made all the changes neccesaries to run the project but when i tried i get this warning:
The stack trace:
I use the ldap auhtenticator and its authenticates correctly: DEBUG o.p.core.engine.DefaultSecurityLogic - authenticated and authorized -> grant access
but when I inject the profile with @Pac4JProfile LdapProfile profile i always get null.
The text was updated successfully, but these errors were encountered: