Update dependencies, disable registration and improve path handling
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
use actix_web::error::ErrorUnauthorized;
|
||||
use actix_web::{dev, http::header, Error, FromRequest, HttpRequest};
|
||||
use futures::future::{err, ok, Ready};
|
||||
use jsonwebtoken::{decode, Algorithm, DecodingKey, Validation};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::str::FromStr;
|
||||
|
||||
use actix_web::{dev, Error, FromRequest, http::header, HttpRequest};
|
||||
use actix_web::error::ErrorUnauthorized;
|
||||
use futures::future::{err, ok, Ready};
|
||||
use jsonwebtoken::{Algorithm, decode, DecodingKey, Validation};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct Token<'a> {
|
||||
pub token: &'a str,
|
||||
@@ -17,7 +18,7 @@ pub struct Claims {
|
||||
}
|
||||
|
||||
pub fn secret_key() -> String {
|
||||
dotenv::var("SECRET_KEY").unwrap()
|
||||
dotenv::var("SECRET_KEY").expect("SECRET_KEY env not set!")
|
||||
}
|
||||
|
||||
impl FromStr for Claims {
|
||||
|
||||
Reference in New Issue
Block a user