Skip to content

Releases: openedx/edx-rest-api-client

Drop Python 2.7 Support

28 Feb 18:50
Compare
Choose a tag to compare

Drops Python 2.7 support.

No change

24 Jan 17:12
Compare
Choose a tag to compare

This release was just to get tests to pass so the release could make it to PyPI.

Restore oauth_uri variable

24 Jan 15:37
Compare
Choose a tag to compare

Restores the deleted oauth_uri variable of OAuthAPIClient. This is a fix for our ProctorTrack integration, which was relying on the oauth_uri variable as part of the contract. This may or may not be a long-term solution.
Note: The removal of this variable originally landed after 1.9.2 and was first released with 2.0.0.

Additionally, since OAuthAPIClient can be used to retrieve tokens against multiple oauth endpoints, we add the oauth_url to the cache key for the token.

Caching for deprecated `EdxRestApiClient` to help transition off of it

22 Jan 16:44
Compare
Choose a tag to compare

Adds caching to deprecated EdxRestApiClient to help transition off of it.

To enable an iterative transition to OAuthAPIClient from the deprecated EdxRestApiClient, use EdxRestApiClient.get_and_cache_jwt_oauth_access_token to get the same JWT token used and cached by OAuthAPIClient.

Also:

  • Includes a NewRelic custom metric to tag which api client was used.
  • Adds cache expiration to match access token expiration.
  • Allows LMS oauth endpoint url argument to optionally include a path.

BREAKING CHANGE: This should be a non-issue, but if you had passed EdxRestApiClient.get_oauth_access_token a url that did not end with/oauth2/access_token/ it would have been left unchanged before this release, but after this release it would now have /oauth2/access_token/
appended. Since in actuality the LMS oauth endpoint ends with /oauth2/access_token/, this seems unlikely to be an issue.

BOM-897

Add caching to OAuthAPIClient

16 Jan 15:17
Compare
Choose a tag to compare

Adds internal caching of access tokens to OAuthAPIClient using the Django-based TieredCache.

Note: Also drops Python 3.6 testing in favor of Python 3.5 and 3.8.

BREAKING CHANGE:

  • The addition of the TieredCache means that Django is required, as well as certain custom middleware. See the README update for details.
  • Removed OAuthAPIClient.oauth_uri.

Correctly refresh tokens

08 Nov 18:21
Compare
Choose a tag to compare

Instead of using the refresh_token grant type for automatically refreshing tokens, just do a normal client_credentials request.

Fixed refresh_token grant request

06 Nov 18:22
Compare
Choose a tag to compare

The refresh_token request was not passing in the previously acquired access token.

Added OAuthAPIClient

23 Oct 13:36
Compare
Choose a tag to compare

This release adds OAuthAPIClient, a requests.Session subclass which automatically authenticates with the preferred edX API authentication method (currently using JWT tokens).

It also marks EdxRestApiClient as deprecated, because Slumber is no longer supported.

Fix for Travis PyPI deploy - take 2.

09 Aug 20:17
Compare
Choose a tag to compare

This fixes a minor issue in the last attempt to fix the Travis PyPi deployment.

Fix for Travis PyPI deploy.

03 Aug 19:30
Compare
Choose a tag to compare
1.8.1

Fix pypi deploy for tags.