pub struct CallbackServer { /* private fields */ }Expand description
HTTP server that listens for the OAuth callback.
Implementations§
Source§impl CallbackServer
impl CallbackServer
Sourcepub fn new(port: u16) -> Self
pub fn new(port: u16) -> Self
Create a new callback server on the given port.
Default timeout is 5 minutes.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set a custom timeout for waiting for the callback.
Sourcepub fn redirect_uri(&self) -> String
pub fn redirect_uri(&self) -> String
Get the redirect URI for this server.
Sourcepub fn wait_for_callback(self) -> Result<CallbackResult, CallbackError>
pub fn wait_for_callback(self) -> Result<CallbackResult, CallbackError>
Start the server and wait for the OAuth callback.
Blocks until callback is received or timeout expires.
Auto Trait Implementations§
impl Freeze for CallbackServer
impl RefUnwindSafe for CallbackServer
impl Send for CallbackServer
impl Sync for CallbackServer
impl Unpin for CallbackServer
impl UnwindSafe for CallbackServer
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