pub struct MetaAuth { /* private fields */ }Expand description
One Meta OAuth client (MetaAuth). Endpoints are fixed in production; tests point them at local mocks.
Implementations§
Source§impl MetaAuth
impl MetaAuth
pub fn new(client: Client) -> Self
Sourcepub fn with_auth_host(self, host: &str) -> Self
pub fn with_auth_host(self, host: &str) -> Self
Points device authorization and token polling at another host (local mocks).
Sourcepub fn with_mint_url(self, url: &str) -> Self
pub fn with_mint_url(self, url: &str) -> Self
Overrides the mint endpoint (SetMintURL).
Sourcepub async fn start_device_flow(&self) -> Result<DeviceCode, String>
pub async fn start_device_flow(&self) -> Result<DeviceCode, String>
StartDeviceFlow.
WaitForAuthorization: polls on a ticker until approved, denied or expired, then mints the API key. A mint failure is logged and the bundle carries only the DCA token.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MetaAuth
impl !UnwindSafe for MetaAuth
impl Freeze for MetaAuth
impl Send for MetaAuth
impl Sync for MetaAuth
impl Unpin for MetaAuth
impl UnsafeUnpin for MetaAuth
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more