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

rust-server.server-server_auth.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
use super::Service;
use crate::{Api, AuthenticationApi};
use swagger::{
    ApiError,
    Authorization, 
    auth::{Basic, Bearer}, 
    Has, 
    XSpanIdString};

impl AuthenticationApi for Service where
T: Api + Clone + Send + 'static + AuthenticationApi,
C: Has + Has> + Send + Sync + 'static {

    /// Passthrough of the task to the api-implementation
    fn bearer_authorization(&self, token: &Bearer) -> Result {
        self.api_impl.bearer_authorization(token)
    }

    /// Passthrough of the task to the api-implementation
    fn apikey_authorization(&self, token: &str) -> Result {
        self.api_impl.apikey_authorization(token)
    }

    /// Passthrough of the task to the api-implementation
    fn basic_authorization(&self, basic: &Basic) -> Result {
        self.api_impl.basic_authorization(basic)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy