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