pub struct OAuth2Authentication {
pub email: Option<String>,
pub name: Option<String>,
pub sub: String,
pub type_: OAuth2ProviderType,
pub username: Option<String>,
}Expand description
Information about an end user who authenticates using a third-party provider.
JSON schema
{
"title": "OAuth2Authentication",
"description": "Information about an end user who authenticates using a third-party provider.",
"type": "object",
"required": [
"sub",
"type"
],
"properties": {
"email": {
"description": "The email address of the end user contained within the user's ID token, if available from third-party OAuth2 provider's token exchange.",
"examples": [
"test.user@gmail.com"
],
"type": "string"
},
"name": {
"description": "The full name of the end user if available from third-party OAuth2 provider's token exchange.",
"examples": [
"Test User"
],
"type": "string"
},
"sub": {
"description": "The unique identifier for the end user that is captured in the `sub` claim of the JWT.",
"examples": [
"e051beeb-7163-4527-a5b6-35e301529ff2"
],
"type": "string"
},
"type": {
"$ref": "#/components/schemas/OAuth2ProviderType"
},
"username": {
"description": "The username of the end user if available from third-party OAuth2 provider's token exchange.",
"examples": [
"test.user"
],
"type": "string"
}
}
}Fields§
§email: Option<String>The email address of the end user contained within the user’s ID token, if available from third-party OAuth2 provider’s token exchange.
name: Option<String>The full name of the end user if available from third-party OAuth2 provider’s token exchange.
sub: StringThe unique identifier for the end user that is captured in the sub claim of the JWT.
type_: OAuth2ProviderType§username: Option<String>The username of the end user if available from third-party OAuth2 provider’s token exchange.
Implementations§
Source§impl OAuth2Authentication
impl OAuth2Authentication
pub fn builder() -> OAuth2Authentication
Trait Implementations§
Source§impl Clone for OAuth2Authentication
impl Clone for OAuth2Authentication
Source§fn clone(&self) -> OAuth2Authentication
fn clone(&self) -> OAuth2Authentication
Returns a duplicate of the value. Read more
1.0.0 · 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 OAuth2Authentication
impl Debug for OAuth2Authentication
Source§impl<'de> Deserialize<'de> for OAuth2Authentication
impl<'de> Deserialize<'de> for OAuth2Authentication
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&OAuth2Authentication> for OAuth2Authentication
impl From<&OAuth2Authentication> for OAuth2Authentication
Source§fn from(value: &OAuth2Authentication) -> Self
fn from(value: &OAuth2Authentication) -> Self
Converts to this type from the input type.
Source§impl From<OAuth2Authentication> for AuthenticationMethod
impl From<OAuth2Authentication> for AuthenticationMethod
Source§fn from(value: OAuth2Authentication) -> Self
fn from(value: OAuth2Authentication) -> Self
Converts to this type from the input type.
Source§impl From<OAuth2Authentication> for OAuth2Authentication
impl From<OAuth2Authentication> for OAuth2Authentication
Source§fn from(value: OAuth2Authentication) -> Self
fn from(value: OAuth2Authentication) -> Self
Converts to this type from the input type.
Source§impl Serialize for OAuth2Authentication
impl Serialize for OAuth2Authentication
Source§impl TryFrom<OAuth2Authentication> for OAuth2Authentication
impl TryFrom<OAuth2Authentication> for OAuth2Authentication
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: OAuth2Authentication) -> Result<Self, ConversionError>
fn try_from(value: OAuth2Authentication) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for OAuth2Authentication
impl RefUnwindSafe for OAuth2Authentication
impl Send for OAuth2Authentication
impl Sync for OAuth2Authentication
impl Unpin for OAuth2Authentication
impl UnwindSafe for OAuth2Authentication
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