All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rust-axum.apis-mod.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
{{#apiInfo}}
{{#apis}}
pub mod {{classFilename}};
{{/apis}}
{{/apiInfo}}

{{#authMethods}}
{{#isApiKey}}
{{#isKeyInCookie}}
/// Cookie Authentication.
#[async_trait::async_trait]
pub trait CookieAuthentication {
    type Claims;

    /// Extracting Claims from Cookie. Return None if the Claims is invalid.
    async fn extract_claims_from_cookie(&self, cookies: &axum_extra::extract::CookieJar, key: &str) -> Option;
}
{{/isKeyInCookie}}
{{#isKeyInHeader}}
/// API Key Authentication - Header.
#[async_trait::async_trait]
pub trait ApiKeyAuthHeader {
    type Claims;

    /// Extracting Claims from Header. Return None if the Claims is invalid.
    async fn extract_claims_from_header(&self, headers: &axum::http::header::HeaderMap, key: &str) -> Option;
}
{{/isKeyInHeader}}
{{/isApiKey}}
{{/authMethods}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy