lpotthast / axum-keycloak-auth

Protect axum routes with a JWT emitted by Keycloak.
https://crates.io/crates/axum-keycloak-auth
Apache License 2.0
34 stars 13 forks source link

Allow token validation outside the axum middleware context #18

Closed Tockra closed 5 months ago

Tockra commented 5 months ago

I want to leverage Keycloak token validation in my Axum middleware and elsewhere in my application, like websocket authorization. Hence, I've centralized the validation logic in decode.rs and introduced a method in the Keycloak layer for easy JWT token validation with a string reference.

Regarding two updates, I'm uncertain about:

Changes:

Tockra commented 5 months ago

What do you think @lpotthast

lpotthast commented 5 months ago

Hey, back from a vacation. This looks really good! Thanks a lot for making these changes!