Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The mobile app obtains an edX-issued access token in either of the following ways:

Expiration

Authorization Bearer

...

Example Response

The response from either of the above endpoints would provide the edX access_token as follows:

{"access_token": "5e0a0cb315e66aa96bab910faa8c70ee0ca91236", "token_type": "Bearer", "expires_in": 2591999, "scope": ""}

Authorization Bearer

Once an access token is obtained, it can be used to authenticate the user in any API call that supports the OAuth2AuthenticationAllowInactiveUser authentication class.  The access token is passed in the Bearer field of the Authorization HTTP header, as follows:

Expiration

 

OAuth2 -> Session Cookie

Additionally, the mobile app can exchange an access token for a session cookie to be used in a WebView:

  • LoginWithAccessTokenView: 1st party (open-edx) OAuth 2.0 access token -> session cookie
    • Returns a 204 (no content), but with the user's session cookies in the response.

 

OAuth2 Client Type, Client ID, and Client Secret

...