Added working "infinite" jwt token for testing

This commit is contained in:
Jef Roosens 2021-11-23 20:31:54 +01:00
parent ac7a753dd3
commit d3d3771d22
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
2 changed files with 7 additions and 8 deletions

View file

@ -7,7 +7,7 @@ use figment::{
providers::{Env, Format, Yaml},
Figment,
};
use rb::{auth::JwtConf, guards};
use rb::auth::JwtConf;
use rocket::{
fairing::AdHoc,
http::Status,
@ -49,9 +49,6 @@ pub struct RbConfig
jwt: JwtConf,
}
#[get("/test")]
async fn test(_yeet: guards::Jwt) {}
#[launch]
fn rocket() -> _
{
@ -87,8 +84,7 @@ fn rocket() -> _
posts::patch,
posts::delete
],
)
.mount("/", routes![test]);
);
let new_figment = rocket.figment();
let jwt_conf: JwtConf = new_figment.extract_inner("jwt").expect("jwt config");