mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-11 23:50:07 +01:00
refactor: JwtAuthorizer creation simplification
This commit is contained in:
parent
9101f91ad8
commit
2c0266b4f8
5 changed files with 40 additions and 38 deletions
|
|
@ -28,8 +28,8 @@ async fn main() {
|
|||
|
||||
// First let's create an authorizer builder from a JWKS Endpoint
|
||||
// User is a struct deserializable from JWT claims representing the authorized user
|
||||
let jwt_auth: JwtAuthorizer<User> = JwtAuthorizer::new()
|
||||
.from_jwks_url("http://localhost:3000/oidc/jwks")
|
||||
let jwt_auth: JwtAuthorizer<User> = JwtAuthorizer::
|
||||
from_jwks_url("http://localhost:3000/oidc/jwks")
|
||||
.with_check(claim_checker);
|
||||
|
||||
let oidc = Router::new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue