pub enum AuthPromptData {
RedirectUrl {
prompt: String,
url: EndUserVerificationUrl,
expect_url: bool,
},
DeviceCode {
prompt: String,
url: EndUserVerificationUrl,
code: UserCode,
full_verificiation_url: VerificationUriComplete,
expect_url: bool,
},
}Expand description
Argument passed into crate::flows::AuthPromptCallback
Variants§
RedirectUrl
User action request for authorization code / implict grant flow It requires the user to visit an URL and pass back the returned redirect URL
Fields
§
url: EndUserVerificationUrlURL to use for authentication
DeviceCode
User action request for device code flow It should return directly after showing the action prompt to the user
Fields
§
url: EndUserVerificationUrlURL to use for authentication
§
full_verificiation_url: VerificationUriCompleteThe complete URL with pre-filled UserCode
Implementations§
Source§impl AuthPromptData
impl AuthPromptData
Sourcepub fn prompt(&self) -> String
pub fn prompt(&self) -> String
Return user prompt string aka. instructions of which URL the user needs to visit to authenticate
Sourcepub fn expect_url(&self) -> bool
pub fn expect_url(&self) -> bool
Return whether the callback expects n URL as return value
Sourcepub fn authentication_url(&self) -> Url
pub fn authentication_url(&self) -> Url
Returns the authentication URL
Trait Implementations§
Source§impl Debug for AuthPromptData
impl Debug for AuthPromptData
Source§impl From<DeviceAuthorizationResponse<EmptyExtraDeviceAuthorizationFields>> for AuthPromptData
impl From<DeviceAuthorizationResponse<EmptyExtraDeviceAuthorizationFields>> for AuthPromptData
Source§fn from(value: StandardDeviceAuthorizationResponse) -> Self
fn from(value: StandardDeviceAuthorizationResponse) -> Self
Converts to this type from the input type.
Source§impl From<EndUserVerificationUrl> for AuthPromptData
impl From<EndUserVerificationUrl> for AuthPromptData
Source§fn from(value: EndUserVerificationUrl) -> Self
fn from(value: EndUserVerificationUrl) -> Self
Converts to this type from the input type.
Source§impl From<SisuAuthenticationResponse> for AuthPromptData
impl From<SisuAuthenticationResponse> for AuthPromptData
Source§fn from(value: SisuAuthenticationResponse) -> Self
fn from(value: SisuAuthenticationResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AuthPromptData
impl RefUnwindSafe for AuthPromptData
impl Send for AuthPromptData
impl Sync for AuthPromptData
impl Unpin for AuthPromptData
impl UnwindSafe for AuthPromptData
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