refactor: middlewares folder
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
pub mod dto;
|
||||
pub mod errors;
|
||||
pub mod middlewares;
|
||||
pub mod providers;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
mod auth;
|
||||
mod docs;
|
||||
mod dto;
|
||||
mod errors;
|
||||
mod middlewares;
|
||||
mod providers;
|
||||
mod routes;
|
||||
mod state;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use axum::{extract::Request, http::StatusCode, middleware::Next, response::Response};
|
||||
|
||||
use crate::auth::{
|
||||
use crate::middlewares::auth::{
|
||||
jwt::validate_token,
|
||||
keycloak::{get_jwks, refresh_jwks},
|
||||
};
|
||||
@@ -1,3 +1,5 @@
|
||||
pub mod jwt;
|
||||
pub mod keycloak;
|
||||
pub mod middleware;
|
||||
|
||||
pub use middleware::auth_middleware;
|
||||
@@ -0,0 +1 @@
|
||||
pub mod auth;
|
||||
@@ -1,8 +1,8 @@
|
||||
pub mod chat;
|
||||
pub mod models;
|
||||
|
||||
use crate::auth::middleware::auth_middleware;
|
||||
use crate::docs::ApiDoc;
|
||||
use crate::middlewares::auth::auth_middleware;
|
||||
use crate::state::app_state::AppState;
|
||||
use axum::{Json, Router, middleware, routing::get, routing::post};
|
||||
use utoipa::OpenApi;
|
||||
|
||||
Reference in New Issue
Block a user