pub struct Hidden {
pub client: Client,
}
Fields§
§client: Client
Implementations§
Source§impl 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.