pub struct BrowserAuth { /* private fields */ }Expand description
Provider-owned browser authentication hooks consumed generically by applications.
Implementations§
Source§impl BrowserAuth
impl BrowserAuth
pub const fn new( label: &'static str, configured: fn(&Path) -> Result<bool>, load: fn(&Path) -> Result<ProviderCredential>, start: fn() -> BoxFuture<'static, Result<Box<dyn BrowserLogin>>>, ) -> Self
Sourcepub const fn with_device_login(
self,
start: fn() -> BoxFuture<'static, Result<Box<dyn DeviceLogin>>>,
) -> Self
pub const fn with_device_login( self, start: fn() -> BoxFuture<'static, Result<Box<dyn DeviceLogin>>>, ) -> Self
Adds a cross-device login flow for headless provider hosts.
pub const fn label(&self) -> &'static str
pub fn configured(&self, path: &Path) -> Result<bool>
pub fn load(&self, path: &Path) -> Result<ProviderCredential>
pub fn start(&self) -> BoxFuture<'static, Result<Box<dyn BrowserLogin>>>
Sourcepub const fn supports_device_login(&self) -> bool
pub const fn supports_device_login(&self) -> bool
Reports whether the provider supports cross-device authentication.
Sourcepub fn start_device(&self) -> BoxFuture<'static, Result<Box<dyn DeviceLogin>>>
pub fn start_device(&self) -> BoxFuture<'static, Result<Box<dyn DeviceLogin>>>
Starts a cross-device login without binding a browser callback on the host.
Auto Trait Implementations§
impl Freeze for BrowserAuth
impl RefUnwindSafe for BrowserAuth
impl Send for BrowserAuth
impl Sync for BrowserAuth
impl Unpin for BrowserAuth
impl UnsafeUnpin for BrowserAuth
impl UnwindSafe for BrowserAuth
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