mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-13 16:40:06 +01:00
chore: fmt
This commit is contained in:
parent
ec02b70a99
commit
d8fb138d46
8 changed files with 86 additions and 78 deletions
|
|
@ -28,11 +28,13 @@ 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::
|
||||
from_jwks_url("http://localhost:3000/oidc/jwks")
|
||||
// .no_refresh()
|
||||
.refresh(Refresh {strategy: RefreshStrategy::Interval, ..Default::default()})
|
||||
.check(claim_checker);
|
||||
let jwt_auth: JwtAuthorizer<User> = JwtAuthorizer::from_jwks_url("http://localhost:3000/oidc/jwks")
|
||||
// .no_refresh()
|
||||
.refresh(Refresh {
|
||||
strategy: RefreshStrategy::Interval,
|
||||
..Default::default()
|
||||
})
|
||||
.check(claim_checker);
|
||||
|
||||
let oidc = Router::new()
|
||||
.route("/authorize", post(oidc_provider::authorize))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue