Resolve some TODOs

This commit is contained in:
2025-03-20 21:00:29 +01:00
parent 133d0de084
commit c6757f477a
3 changed files with 8 additions and 6 deletions

View File

@ -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 {