I'm using smallrye.jwt as authorization tool. My quarkus app does not generate jwt tokens, but verifies them having secret key.
Problem is that incoming tokens have sub claim of non-string type, but parser expects java.lang.String (I receive 45 instead of "45"). I don't have access to token generation, so I need it to work with what I have. Apparently there's no way to make it work with microprofile. How can I achieve it?
The error I get (I replaced a few values with ...):
Caused by: org.jose4j.jwt.consumer.InvalidJwtException: JWT (claims->{"iss":"...","iat":...,"exp":...,"nbf":...,"jti":"...","sub":45,"prv":"...","pid": ...}) rejected due to invalid claims or other invalid content. Additional details: [[18] The value of the 'sub' claim is not the expected type (1517 - Cannot cast java.lang.Long to java.lang.String)]
My application.properties:
smallrye.jwt.verify.key-format=JWK
smallrye.jwt.verify.key.location=JWTSecret.jwk
smallrye.jwt.verify.algorithm=HS256
Looks like it is coming directly from Jose4j,
subis a standard JWT claim, https://www.rfc-editor.org/rfc/rfc7519#section-4.1.2, and looks like Jose4J is expecting it to be a string as per the RFC7519 text