mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-03-13 00:21:51 +01:00
26 lines
528 B
Rust
26 lines
528 B
Rust
|
use utoipa::{self};
|
||
|
|
||
|
#[derive(utoipa::ToSchema)]
|
||
|
pub struct AuthenticationMethod(String);
|
||
|
|
||
|
pub mod responses {
|
||
|
|
||
|
#[derive(utoipa::ToResponse)]
|
||
|
pub struct Unauthorized {
|
||
|
pub www_authenticate: Option<String>,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#[derive(utoipa::OpenApi)]
|
||
|
#[openapi(
|
||
|
info(description = "FabAccess Auth API"),
|
||
|
modifiers(&SecurityAddon),
|
||
|
components(schemas(AuthenticationMethod), responses(responses::Unauthorized)),
|
||
|
security(
|
||
|
("basicAuth" = []),
|
||
|
),
|
||
|
)]
|
||
|
pub struct ApiDoc;
|
||
|
|
||
|
include!("./security.rs");
|