pub struct AuthRequest {
pub grant_type: String,
pub client_id: String,
pub client_secret: String,
pub refresh_token: Option<String>,
pub scope: Option<String>,
}Expand description
Authentication request
Fields§
§grant_type: StringGrant type
client_id: StringClient ID
client_secret: StringClient secret
refresh_token: Option<String>Refresh token (for refresh grant)
scope: Option<String>Scope
Implementations§
Source§impl AuthRequest
impl AuthRequest
Sourcepub fn client_credentials(client_id: String, client_secret: String) -> Self
pub fn client_credentials(client_id: String, client_secret: String) -> Self
Create a client credentials authentication request
Sourcepub fn refresh_token(
client_id: String,
client_secret: String,
refresh_token: String,
) -> Self
pub fn refresh_token( client_id: String, client_secret: String, refresh_token: String, ) -> Self
Create a refresh token authentication request
Trait Implementations§
Source§impl Clone for AuthRequest
impl Clone for AuthRequest
Source§fn clone(&self) -> AuthRequest
fn clone(&self) -> AuthRequest
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 AuthRequest
impl Debug for AuthRequest
Source§impl<'de> Deserialize<'de> for AuthRequest
impl<'de> Deserialize<'de> for AuthRequest
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 Display for AuthRequest
impl Display for AuthRequest
Auto Trait Implementations§
impl Freeze for AuthRequest
impl RefUnwindSafe for AuthRequest
impl Send for AuthRequest
impl Sync for AuthRequest
impl Unpin for AuthRequest
impl UnwindSafe for AuthRequest
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