Open oneturkmen opened 3 years ago
@oneturkmen JWTSecurityContext.java is not a CDI managed bean. Therefore it expects the token as part of the constructor. Actually you are not able to instatiate the class without providing this in the constructor. Does this answer your request?
When using a field of type
JsonWebToken
, the field should also be annotated with@Inject
. Alternative way would be to useProvider<JsonWebToken>
- in that case, no@Inject
is necessary.Relevant Code: https://github.com/ManuelB/javaee-openui5-multi-modules-base/blob/ae0a7d808df2dda6d350df99a6023b1cbed89d9d/jwt/jaxrs/src/main/java/org/eclipse/microprofile/jwt/jaxrs/JWTSecurityContext.java#L34
Link about JsonWebToken usage: