Resolve some TODOs
This commit is contained in:
@ -26,7 +26,7 @@ pub enum AuthenticatedMethod {
|
||||
Cookie,
|
||||
/// User is authenticated through command line, for debugging purposes only
|
||||
Dev,
|
||||
// TODO : token implementation
|
||||
/// User is authenticated using an API token
|
||||
Token(Token),
|
||||
}
|
||||
|
||||
@ -170,9 +170,7 @@ impl FromRequest for AuthExtractor {
|
||||
// Handle tokens expiration
|
||||
if token.is_expired() {
|
||||
log::error!("Attempted to use expired token! {:?}", token);
|
||||
return Err(actix_web::error::ErrorBadRequest(
|
||||
"Token has expired!",
|
||||
));
|
||||
return Err(actix_web::error::ErrorBadRequest("Token has expired!"));
|
||||
}
|
||||
|
||||
return Ok(Self {
|
||||
|
Reference in New Issue
Block a user