Auth #169

Merged
kdeng00 merged 19 commits from auth into v0.2 2025-08-01 15:16:00 -04:00
Showing only changes of commit c9f6fab746 - Show all commits
+2 -2
View File
@@ -69,8 +69,8 @@ pub async fn auth<B>(
.get(axum::http::header::AUTHORIZATION)
.and_then(|auth_header| auth_header.to_str().ok())
.and_then(|auth_value| {
if auth_value.starts_with("Bearer ") {
Some(auth_value[7..].to_owned())
if let Some(stripped) = auth_value.strip_prefix("Bearer ") {
Some(String::from(stripped))
} else {
None
}