pub struct OAuth2TokenBody {
pub client_id: String,
pub client_secret: Option<String>,
pub code: Option<String>,
pub code_verifier: Option<String>,
pub grant_type: OAuth2TokenBodyGrantType,
pub redirect_uri: Option<String>,
pub refresh_token: Option<String>,
pub scope: Option<String>,
}Expand description
OAuth2TokenBody
JSON schema
{
"$id": "https://haste.health/jsonschema/oauth2/token-body",
"title": "OAuth2TokenBody",
"type": "object",
"required": [
"client_id",
"grant_type"
],
"properties": {
"client_id": {
"description": "The client ID used in the initial request. May also be included in the Basic header.",
"type": "string"
},
"client_secret": {
"description": "The client Secret used in the initial request. May also be included in the Basic header.",
"type": "string"
},
"code": {
"description": "The authorization code received from the authorization server.",
"type": "string"
},
"code_verifier": {
"description": "The code verifier used in the initial request.",
"type": "string"
},
"grant_type": {
"description": "The grant type used in the initial request.",
"enum": [
"refresh_token",
"client_credentials",
"authorization_code"
]
},
"redirect_uri": {
"description": "The redirect URI used in the initial request.",
"type": "string"
},
"refresh_token": {
"description": "The refresh token used to obtain a new access token.",
"type": "string"
},
"scope": {
"description": "The scope of the access request.",
"type": "string"
}
},
"additionalProperties": true
}Fields§
§client_id: StringThe client ID used in the initial request. May also be included in the Basic header.
client_secret: Option<String>The client Secret used in the initial request. May also be included in the Basic header.
code: Option<String>The authorization code received from the authorization server.
code_verifier: Option<String>The code verifier used in the initial request.
grant_type: OAuth2TokenBodyGrantTypeThe grant type used in the initial request.
redirect_uri: Option<String>The redirect URI used in the initial request.
refresh_token: Option<String>The refresh token used to obtain a new access token.
scope: Option<String>The scope of the access request.
Trait Implementations§
Source§impl Clone for OAuth2TokenBody
impl Clone for OAuth2TokenBody
Source§fn clone(&self) -> OAuth2TokenBody
fn clone(&self) -> OAuth2TokenBody
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 OAuth2TokenBody
impl Debug for OAuth2TokenBody
Source§impl<'de> Deserialize<'de> for OAuth2TokenBody
impl<'de> Deserialize<'de> for OAuth2TokenBody
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<&OAuth2TokenBody> for OAuth2TokenBody
impl From<&OAuth2TokenBody> for OAuth2TokenBody
Source§fn from(value: &OAuth2TokenBody) -> Self
fn from(value: &OAuth2TokenBody) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OAuth2TokenBody
impl RefUnwindSafe for OAuth2TokenBody
impl Send for OAuth2TokenBody
impl Sync for OAuth2TokenBody
impl Unpin for OAuth2TokenBody
impl UnwindSafe for OAuth2TokenBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more