Authentication Manager - Authenticate with MS / XBL

Authentication Manager

Authenticate with Windows Live Server and Xbox Live.

class xbox.webapi.authentication.manager.AuthenticationManager(client_session, client_id, client_secret, redirect_uri, scopes=None)[source]

Bases: object

Parameters:
generate_authorization_url(state=None)[source]

Generate Windows Live Authorization URL.

Parameters:

state (str | None) –

Return type:

str

async request_tokens(authorization_code)[source]

Request all tokens.

Parameters:

authorization_code (str) –

Return type:

None

async refresh_tokens()[source]

Refresh all tokens.

Return type:

None

async request_oauth_token(authorization_code)[source]

Request OAuth2 token.

Parameters:

authorization_code (str) –

Return type:

OAuth2TokenResponse

async refresh_oauth_token()[source]

Refresh OAuth2 token.

Return type:

OAuth2TokenResponse

async _oauth2_token_request(data)[source]

Execute token requests.

Parameters:

data (dict) –

Return type:

OAuth2TokenResponse

async request_user_token(relying_party='http://auth.xboxlive.com', use_compact_ticket=False)[source]

Authenticate via access token and receive user token.

Parameters:
  • relying_party (str) –

  • use_compact_ticket (bool) –

Return type:

XAUResponse

async request_xsts_token(relying_party='http://xboxlive.com')[source]

Authorize via user token and receive final X token.

Parameters:

relying_party (str) –

Return type:

XSTSResponse