pub struct Client {
pub client_id: ClientId,
pub client_secret: ClientSecret,
pub auth_url: AuthUrl,
pub token_url: TokenUrl,
pub redirect_host: String,
pub redirect_port: u16,
}
Expand description
Client builder, used by other flows to send requests and build URLs.
Fields§
§client_id: ClientId
Client identifier issued to the client during the registration process described by Section 2.2.
client_secret: ClientSecret
Client password issued to the client during the registration process described by Section 2.2.
auth_url: AuthUrl
URL of the authorization server’s authorization endpoint.
token_url: TokenUrl
URL of the authorization server’s token endpoint.
redirect_host: String
Hostname of the client’s redirection endpoint.
redirect_port: u16
Port of the client’s redirection endpoint.
Implementations§
source§impl Client
impl Client
pub fn new( client_id: impl ToString, client_secret: impl ToString, auth_url: impl ToString, token_url: impl ToString ) -> Result<Self>
pub fn with_redirect_host<T>(self, host: T) -> Selfwhere
T: ToString,
pub fn with_redirect_port<T>(self, port: T) -> Self
sourcepub fn build(&self) -> Result<BasicClient>
pub fn build(&self) -> Result<BasicClient>
Build the final client.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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