pub struct BrowserOAuthHandler { /* private fields */ }Expand description
Default OAuthHandler that opens the system browser and listens
for the OAuth callback on a dynamically-assigned local port.
Implementations§
Source§impl BrowserOAuthHandler
impl BrowserOAuthHandler
pub fn new() -> Result<BrowserOAuthHandler, Error>
Sourcepub fn with_redirect_uri(
redirect_uri: impl Into<String>,
port: u16,
) -> Result<BrowserOAuthHandler, Error>
pub fn with_redirect_uri( redirect_uri: impl Into<String>, port: u16, ) -> Result<BrowserOAuthHandler, Error>
Create a handler bound to a specific port with a custom redirect URI.
Use this when the OAuth provider has a fixed redirect URI registered
(e.g. http://localhost:1455/auth/callback for Codex).
Trait Implementations§
Source§impl OAuthHandler for BrowserOAuthHandler
impl OAuthHandler for BrowserOAuthHandler
Source§fn redirect_uri(&self) -> &str
fn redirect_uri(&self) -> &str
The redirect URI the OAuth provider should send the user back to,
e.g.
http://127.0.0.1:<port>/oauth2callback.Called when user needs to authorize. App should open browser to
auth_url
and return the authorization code and state (CSRF token) from the callback.Auto Trait Implementations§
impl !Freeze for BrowserOAuthHandler
impl RefUnwindSafe for BrowserOAuthHandler
impl Send for BrowserOAuthHandler
impl Sync for BrowserOAuthHandler
impl Unpin for BrowserOAuthHandler
impl UnsafeUnpin for BrowserOAuthHandler
impl UnwindSafe for BrowserOAuthHandler
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