Struct splinter::oauth::OAuthClient [−][src]
pub struct OAuthClient { /* fields omitted */ }
Expand description
An OAuth2 client for Splinter
This client currently supports OAuth2 authorization code grants (https://tools.ietf.org/html/rfc6749#section-4.1).
Implementations
Generates the URL that the end user should be redirected to for authorization
Arguments
client_redirect_url
- The endpoint that Splinter will redirect to after it has completed authorization and the code exchange
Exchanges the given authorization code for an access token and the client redirect URL
provided in the original auth request, represented by a String
.
Arguments
auth_code
- The authorization code that was supplied by the OAuth providercsrf_token
- The CSRF token that was provided in the original auth request, which is used to prevent CSRF attacks and to correlate the auth code with the original auth request.
Exchanges the given refresh token for an access token.
Attempts to get the subject that the given access token is for from the OAuth server. This
method will return Ok(None)
if the access token could not be resolved to a subject.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for OAuthClient
impl Send for OAuthClient
impl Sync for OAuthClient
impl Unpin for OAuthClient
impl !UnwindSafe for OAuthClient
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more