pub enum AdminAuth {
None,
Token(String),
OAuth2(Arc<ClientCredentialsFlow>),
}Expand description
Authentication strategy used by the admin client.
Token(...) adds Authorization: Bearer <token> to every request.
Mirrors Java’s AuthenticationToken provider. OAuth2(...) performs a
client_credentials exchange against the IDP and attaches the resulting
access token as a bearer credential — mirrors Java’s
AuthenticationOAuth2.
Variants§
None
No authentication.
Token(String)
Bearer token. The string is the raw token; the Bearer prefix is added
at request time.
OAuth2(Arc<ClientCredentialsFlow>)
OAuth2 client_credentials flow. The cached access token is refreshed
(when missing or near expiry) and attached as Authorization: Bearer <access-token> at request time. The flow is shared (Arc) so its
token cache is reused across every admin call.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AdminAuth
impl !UnwindSafe for AdminAuth
impl Freeze for AdminAuth
impl Send for AdminAuth
impl Sync for AdminAuth
impl Unpin for AdminAuth
impl UnsafeUnpin for AdminAuth
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