pub enum AuthStrategy {
StaticToken(String),
ClientCredentials(ClientCredentialsOptions),
Provider(Arc<dyn TokenProvider>),
}Expand description
Strategy used to authenticate requests made by the SDK.
Variants§
StaticToken(String)
Static bearer token (API key/service user token).
ClientCredentials(ClientCredentialsOptions)
OAuth 2.0 client credentials flow.
Provider(Arc<dyn TokenProvider>)
Custom token provider supplied by the caller.
Implementations§
Source§impl AuthStrategy
impl AuthStrategy
Sourcepub fn into_provider(self) -> Result<Arc<dyn TokenProvider>, PortError>
pub fn into_provider(self) -> Result<Arc<dyn TokenProvider>, PortError>
Convert the strategy into a token provider that can be consumed by the client.
Trait Implementations§
Source§impl Clone for AuthStrategy
impl Clone for AuthStrategy
Auto Trait Implementations§
impl !RefUnwindSafe for AuthStrategy
impl !UnwindSafe for AuthStrategy
impl Freeze for AuthStrategy
impl Send for AuthStrategy
impl Sync for AuthStrategy
impl Unpin for AuthStrategy
impl UnsafeUnpin for AuthStrategy
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