pub struct OAuthClientBuilder { /* private fields */ }Expand description
Builder for OAuth clients.
Implementations§
Source§impl OAuthClientBuilder
impl OAuthClientBuilder
Sourcepub fn secret(self, credential: impl Into<String>) -> Self
pub fn secret(self, credential: impl Into<String>) -> Self
Sets the client secret (makes this a confidential client).
Sourcepub fn redirect_uri(self, uri: impl Into<String>) -> Self
pub fn redirect_uri(self, uri: impl Into<String>) -> Self
Adds a redirect URI.
Sourcepub fn redirect_uris<I, S>(self, uris: I) -> Self
pub fn redirect_uris<I, S>(self, uris: I) -> Self
Adds multiple redirect URIs.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets the client description.
Sourcepub fn build(self) -> Result<OAuthClient, OAuthError>
pub fn build(self) -> Result<OAuthClient, OAuthError>
Builds the OAuth client.
§Errors
Returns an error if:
- No redirect URIs are configured
- Client ID is empty
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OAuthClientBuilder
impl RefUnwindSafe for OAuthClientBuilder
impl Send for OAuthClientBuilder
impl Sync for OAuthClientBuilder
impl Unpin for OAuthClientBuilder
impl UnwindSafe for OAuthClientBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).