Added an authorization header bearer token extraction demo.

This commit is contained in:
2026-10-09 16:46:28 +02:00
parent 18e142ec91
commit 7fb3abc93d
6 changed files with 236 additions and 1 deletions
+2 -1
View File
@@ -5,7 +5,7 @@ use uuid::Uuid;
use super::{
dtos::account::{AccountRequest, AccountResponse},
extractors::{json::Json, path::Path, query::Query},
extractors::{auth::Auth, json::Json, path::Path, query::Query},
};
use crate::{
error::AppError,
@@ -33,6 +33,7 @@ pub struct QueryParams {
#[axum::debug_handler]
#[tracing::instrument(skip(pool))]
async fn list_accounts(
Auth(auth): Auth,
State(pool): State<PgPool>,
Query(query): Query<QueryParams>,
) -> Result<Json<Vec<AccountResponse>>, AppError> {