Skip to content
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

Should JWT @Claim require @Inject too #5160

Closed
emmanuelbernard opened this issue Nov 4, 2019 · 7 comments
Closed

Should JWT @Claim require @Inject too #5160

emmanuelbernard opened this issue Nov 4, 2019 · 7 comments

Comments

@emmanuelbernard
Copy link
Member

The guide seems to use @Claim and @Inject together and 0.27 seems to mandate that. But our quarkus lab used to work with just @Claim in seems
Is that a regression or was the behavior never intended?

@lordofthejars

@sberyozkin
Copy link
Member

This test shows Inject everywhere.
May be this code is related ? Not 100% sure, CC Martin @mkouba and Michal @michalszynkiewicz

@mkouba
Copy link
Contributor

mkouba commented Nov 4, 2019

@Inject is optional for a field injection point if it has at least one qualifier. It's a Quarkus-specific feature that actually violates the CDI spec (where @Inject is mandatory).

@sberyozkin the TCK must be CDI-compliant. So it has to use @Inject.

In any case, I wouldn't call it a "regression"...

@sberyozkin
Copy link
Member

sberyozkin commented Nov 4, 2019

@mkouba Hi Martin, thanks for the fast update; As far as I'm concerned, the fewer annotations, the better :-), so if Qurakus allows for it then it is fine. May be some documentation has to be updated somewhere to answer a question from @emmanuelbernard ? If you tell me what to update then I can take care of it, thanks

@mkouba
Copy link
Contributor

mkouba commented Nov 4, 2019

I've updated the CDI guide to include few lines about this feature: #5167 (previously it was only mentioned in the blogpost)

@emmanuelbernard
Copy link
Member Author

@sberyozkin can you run some quarkus specific tests as well outside the TCK. Because if I did not make a mistake it was not working for me at the time. I had to add @Inject. But maybe I got it wrong.

@sberyozkin
Copy link
Member

@emmanuelbernard
Stuart updated this test resource recently, the test itself is here. So it works without Inject.

@mkouba
Copy link
Contributor

mkouba commented Nov 5, 2019

Thanks @sberyozkin.

@mkouba mkouba closed this as completed Nov 5, 2019
@gsmet gsmet added this to the 1.0.0.Final milestone Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants