Added working "infinite" jwt token for testing
This commit is contained in:
parent
ac7a753dd3
commit
d3d3771d22
2 changed files with 7 additions and 8 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Reference in a new issue