Struct oauth2::DeviceAuthorizationRequest [−][src]
pub struct DeviceAuthorizationRequest<'a, TE> where
TE: ErrorResponse, { /* fields omitted */ }
The request for a set of verification codes from the authorization server.
See https://tools.ietf.org/html/rfc8628#section-3.1.
Implementations
impl<'a, TE> DeviceAuthorizationRequest<'a, TE> where
TE: ErrorResponse + 'static,
[src]
TE: ErrorResponse + 'static,
pub fn add_extra_param<N, V>(self, name: N, value: V) -> Self where
N: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
[src]
N: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
Appends an extra param to the token request.
This method allows extensions to be used without direct support from
this crate. If name
conflicts with a parameter managed by this crate, the
behavior is undefined. In particular, do not set parameters defined by
RFC 6749 or
RFC 7636.
Security Warning
Callers should follow the security recommendations for any OAuth2 extensions used with this function, which are beyond the scope of RFC 6749.
pub fn add_scope(self, scope: Scope) -> Self
[src]
Appends a new scope to the token request.
pub fn request<F, RE, EF>(
self,
http_client: F
) -> Result<DeviceAuthorizationResponse<EF>, RequestTokenError<RE, TE>> where
F: FnOnce(HttpRequest) -> Result<HttpResponse, RE>,
RE: Error + 'static,
EF: ExtraDeviceAuthorizationFields,
[src]
self,
http_client: F
) -> Result<DeviceAuthorizationResponse<EF>, RequestTokenError<RE, TE>> where
F: FnOnce(HttpRequest) -> Result<HttpResponse, RE>,
RE: Error + 'static,
EF: ExtraDeviceAuthorizationFields,
Synchronously sends the request to the authorization server and awaits a response.
pub async fn request_async<C, F, RE, EF>(
self,
http_client: C
) -> Result<DeviceAuthorizationResponse<EF>, RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
F: Future<Output = Result<HttpResponse, RE>>,
RE: Error + 'static,
EF: ExtraDeviceAuthorizationFields,
[src]
self,
http_client: C
) -> Result<DeviceAuthorizationResponse<EF>, RequestTokenError<RE, TE>> where
C: FnOnce(HttpRequest) -> F,
F: Future<Output = Result<HttpResponse, RE>>,
RE: Error + 'static,
EF: ExtraDeviceAuthorizationFields,
Asynchronously sends the request to the authorization server and returns a Future.
Trait Implementations
impl<'a, TE: Debug> Debug for DeviceAuthorizationRequest<'a, TE> where
TE: ErrorResponse,
[src]
TE: ErrorResponse,
Auto Trait Implementations
impl<'a, TE> RefUnwindSafe for DeviceAuthorizationRequest<'a, TE> where
TE: RefUnwindSafe,
TE: RefUnwindSafe,
impl<'a, TE> Send for DeviceAuthorizationRequest<'a, TE> where
TE: Send,
TE: Send,
impl<'a, TE> Sync for DeviceAuthorizationRequest<'a, TE> where
TE: Sync,
TE: Sync,
impl<'a, TE> Unpin for DeviceAuthorizationRequest<'a, TE> where
TE: Unpin,
TE: Unpin,
impl<'a, TE> UnwindSafe for DeviceAuthorizationRequest<'a, TE> where
TE: UnwindSafe,
TE: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,