From io.vertx.ext.auth.impl.UserImpl to io.quarkus.vertx.http.runtime.security.QuarkusHttpUser #43155
Replies: 5 comments 16 replies
-
It probably requires a conversion support from FYI, you can make the authentication declarative with routes in Quarkus, by configuring the secure policy for a given path, https://quarkus.io/guides/security-authorize-web-endpoints-reference and use But if we can support the minimal |
Beta Was this translation helpful? Give feedback.
-
IMHO when users starts to set |
Beta Was this translation helpful? Give feedback.
-
Btw. I VERY MUCH appreciate your time and expertise provided here |
Beta Was this translation helpful? Give feedback.
-
Happy to report In the example I find @RolesAllowed({ "User", "Admin" }) However when I decode the token from the example:
I get: {
"sub": "jdoe-using-jwt-rbac",
"aud": "using-jwt-rbac",
"upn": "[email protected]",
"birthdate": "2001-07-13",
"auth_time": 1551652091,
"iss": "https://quarkus.io/using-jwt-rbac",
"roleMappings": {
"group2": "Group2MappedRole",
"group1": "Group1MappedRole"
},
"groups": [
"Echoer",
"Tester",
"Subscriber",
"group2"
],
"preferred_username": "jdoe",
"exp": 1551652391,
"iat": 1551652091,
"jti": "a-123"
} The roles claim is nowhere to be found. So what's used for roles? |
Beta Was this translation helpful? Give feedback.
-
happy camper here, thx so much |
Beta Was this translation helpful? Give feedback.
-
I'm coming from a Vert.x background. When trying to use a RouteFilter that authenticates users using Vert.x's JWTAuth, I get a ClassCast exception:
io.vertx.ext.auth.impl.UserImpl cannot be cast to class io.quarkus.vertx.http.runtime.security.QuarkusHttpUser
Both classes implementUser
. My code:What's the correct approach here?
Beta Was this translation helpful? Give feedback.
All reactions