[][src]Module mixer_wrappers::oauth

Wrappers around OAuth calls for authenticating the user interacting with your application.

This module does not contain any structs; instead, import methods individually as needed.

get_authorize_url is used to start your application's user on Mixer's standard OAuth flow, where Mixer has the user authenticate and confirm using the application and then redirects them to the configured redirect URL, where a web server needs to be running to take the code from the user and exchange it for the OAuth token.

get_token_from_code is used for exchanging the code for the token in the normal flow.

get_access_token_from_refresh is used to get another access token from the refresh token.

get_shortcode is used for generating a 6-digit code for the application's user to enter on Mixer's "shortcode" OAuth flow, which is useful when the application does not contain a web server to receive the code from the user. This code must be given to the user so that they can enter it on Mixer's site.

check_shortcode is used to poll the Mixer API for the status of a user entering (or not entering) a shortcode.

Structs

ShortcodeResponse

Struct around the response from fetching an auth shortcode.

Enums

ShortcodeStatus

Status of a shortcode auth flow.

Functions

check_shortcode

Check on the status of a shortcode.

get_access_token_from_refresh

Exchange a refresh token for another access token.

get_authorize_url

Get the authorize URL for your application.

get_shortcode

Get an authentication shortcode.

get_token_from_code

Exchange the code from a user's browser for an OAuth token.