pub struct Hidden {
pub client: Client,
}Fields
client: ClientImplementations
sourceimpl Hidden
impl Hidden
sourcepub async fn device_auth_request(&self) -> Result<()>
pub async fn device_auth_request(&self) -> Result<()>
Start an OAuth 2.0 Device Authorization Grant.
This function performs a POST to the /device/auth endpoint.
This endpoint is designed to be accessed from an unauthenticated API client. It generates and records a device_code and user_code which must be verified and confirmed prior to a token being granted.
sourcepub async fn device_auth_confirm(&self, body: &DeviceAuthVerify) -> Result<()>
pub async fn device_auth_confirm(&self, body: &DeviceAuthVerify) -> Result<()>
Confirm an OAuth 2.0 Device Authorization Grant.
This function performs a POST to the /device/confirm endpoint.
This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on /device/token.
sourcepub async fn device_access_token(&self) -> Result<()>
pub async fn device_access_token(&self) -> Result<()>
Request a device access token.
This function performs a POST to the /device/token endpoint.
This endpoint should be polled by the client until the user code is verified and the grant is confirmed.
sourcepub async fn spoof_login(&self, body: &SpoofLoginBody) -> Result<()>
pub async fn spoof_login(&self, body: &SpoofLoginBody) -> Result<()>
This function performs a POST to the /login endpoint.
sourcepub async fn logout(&self) -> Result<()>
pub async fn logout(&self) -> Result<()>
This function performs a POST to the /logout endpoint.
sourcepub async fn session_me(&self) -> Result<User>
pub async fn session_me(&self) -> Result<User>
Fetch the user associated with the current session.
This function performs a GET to the /session/me endpoint.
Auto Trait Implementations
impl !RefUnwindSafe for Hidden
impl Send for Hidden
impl Sync for Hidden
impl Unpin for Hidden
impl !UnwindSafe for Hidden
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more