// 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

/// A trait for providing authorization tokens for client requests.
#[async_trait::async_trait(?Send)]
pub trait Authorization {
    /// Get a valid access token.
    ///
    /// The implementation of this method may perform extra actions under the
    /// hood, e.g. refreshing expired tokens.
    async fn get_access_token(&self) -> anyhow::Result<String>;
}
