pub enum AuthHeaderManager {
OIDCToken(Arc<Authenticator>),
FixedToken(String),
AuthTicket(String),
Custom(Arc<dyn Fn(&mut HeaderMap, &ClientWithMiddleware) -> Result<(), AuthenticatorError> + Send + Sync>),
CustomAsync(Arc<dyn CustomAuthenticator + Send + Sync>),
}Expand description
Enumeration of the possible authentication methods available.
Variants§
OIDCToken(Arc<Authenticator>)
Authenticator that makes OIDC requests to obtain tokens.
FixedToken(String)
A fixed OIDC token
AuthTicket(String)
An internal auth ticket.
Custom(Arc<dyn Fn(&mut HeaderMap, &ClientWithMiddleware) -> Result<(), AuthenticatorError> + Send + Sync>)
A synchronous authentication method.
CustomAsync(Arc<dyn CustomAuthenticator + Send + Sync>)
An async authentication method.
Implementations§
Source§impl AuthHeaderManager
impl AuthHeaderManager
Sourcepub async fn set_headers(
&self,
headers: &mut HeaderMap,
client: &ClientWithMiddleware,
) -> Result<(), AuthenticatorError>
pub async fn set_headers( &self, headers: &mut HeaderMap, client: &ClientWithMiddleware, ) -> Result<(), AuthenticatorError>
Set necessary headers in headers. This will sometimes request tokens from
the identity provider.
§Arguments
headers- Request header collection.client- Reqwest client used to send authentication requests, if necessary.
Trait Implementations§
Source§impl Clone for AuthHeaderManager
impl Clone for AuthHeaderManager
Source§fn clone(&self) -> AuthHeaderManager
fn clone(&self) -> AuthHeaderManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthHeaderManager
impl !RefUnwindSafe for AuthHeaderManager
impl Send for AuthHeaderManager
impl Sync for AuthHeaderManager
impl Unpin for AuthHeaderManager
impl !UnwindSafe for AuthHeaderManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more