pub struct OAuthState {
pub provider: String,
pub callback_url: String,
pub error_callback_url: String,
pub expires_at: u64,
}Expand description
One stored OAuth state record. Carries the post-callback redirect
URLs alongside the provider so the callback handler doesn’t need to
consult an env var to know where to send the user. Both URLs are
validated against PYLON_TRUSTED_ORIGINS at create time, so the
callback can trust them without re-checking.
Fields§
§provider: String§callback_url: StringURL the callback redirects to on success. The frontend supplies
this via ?callback= on the start request.
error_callback_url: StringURL the callback redirects to on failure. Defaults to
callback_url when the frontend doesn’t pass an explicit
?error_callback=. The error code + message ride along as
query params (?oauth_error=X&oauth_error_message=Y).
expires_at: u64Trait Implementations§
Source§impl Clone for OAuthState
impl Clone for OAuthState
Source§fn clone(&self) -> OAuthState
fn clone(&self) -> OAuthState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OAuthState
impl Debug for OAuthState
Source§impl PartialEq for OAuthState
impl PartialEq for OAuthState
Source§fn eq(&self, other: &OAuthState) -> bool
fn eq(&self, other: &OAuthState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for OAuthState
impl StructuralPartialEq for OAuthState
Auto Trait Implementations§
impl Freeze for OAuthState
impl RefUnwindSafe for OAuthState
impl Send for OAuthState
impl Sync for OAuthState
impl Unpin for OAuthState
impl UnsafeUnpin for OAuthState
impl UnwindSafe for OAuthState
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