// SPDX-FileCopyrightText: Politik im Blick developers
// SPDX-FileCopyrightText: Wolfgang Silbermayr <wolfgang@silbermayr.at>
//
// SPDX-License-Identifier: AGPL-3.0-or-later OR EUPL-1.2

use crate::{Result, user::UserInfo};

#[cfg_attr(feature = "mockall", mockall::automock)]
#[async_trait::async_trait]
pub trait ApiAuth: Sync + Send + std::fmt::Debug {
    async fn authorize(&self, authorization_header: http::HeaderValue) -> Result<Option<UserInfo>>;
}
