Commit Graph

24 Commits

Author SHA1 Message Date
Usama Sadiq
55661b441d refactor: ran pyupgrade on openedx/core/djangoapps/credit (#26848) 2021-03-16 15:16:31 +05:00
M. Zulqarnain
355423d322 pylint amnesty in openedx (#26364) 2021-02-04 15:34:01 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Manjinder Singh
d7bd80a100 Renamed OAuth2Authentication to BearerAuthentication (#23128)
* Renamed OAuth2Authentication to BearerAuthentication
* Added back OAuth2Authentication name
-there are libraries such as edx-enterprise that still import OAuth2Authentication.  The OAuth2Authentication class should be fully removed when everything is importing BearerAuthentication correctly
2020-02-18 13:29:29 -05:00
Manjinder Singh
cce8cdd661 Replacing OAuth2Auth (#23067)
- Removing deprecated auth classes
- Replacing OAuth2AuthenticationAllowInactiveUserDeprecated with OAuth2AuthenticationAllowInactiveUser
- the old class was a child class of a deprecated class that we are removing and replacing.
2020-02-11 10:38:13 -05:00
Manjinder Singh
eb694528e7 Adding metrics to oauth2authentication class (#22970)
Currently, we are working on removing the rest_framework_auth library from edx-platform. For this push, we need to remove the oauth2Authentication class. This PR creates a new class oauth2AuthenticationDeprecated that adds additional new relic metrics. The metrics would allow us to see how often this class is used and its success rate. The hope is that this information will help us with transitioning to a different authentication class.
2020-01-30 09:13:51 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Michael Youngstrom
de52c6d310 INCR-186 2019-04-01 16:08:31 -04:00
Robert Raposa
fbc59231fc Update edx-drf-extensions to 2.0.0.
Note: this version update is backward incompatible.

ARCH-255
2018-10-17 01:00:34 -04:00
Jeremy Bowman
5289c7e828 PLAT-1915 Stop using deprecated BaseException.message 2018-01-31 17:22:01 -05:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Clinton Blackburn
531ed41822 Updated the Credit API to support JWT authentication 2016-11-16 13:44:46 -05:00
Clinton Blackburn
92153752c0 Rewrote Credit API
- API built atop Django REST Framework
- Added support for OAuth 2.0 and session authentication
- Added permissions around eligibility data

ECOM-2609
2015-11-24 22:06:54 -05:00
Clinton Blackburn
98a39b922e Updated CreditCourse update endpoint
The update (PUT) endpoint now supports creating new CreditCourse objects in addition to updating existing ones. This functionality greatly simplifies the logic needed by consumers (e.g. the Course Administration Tool) to create or update CreditCourse objects.

ECOM-2524
2015-10-24 20:13:54 -04:00
Tasawer
65c93d7ad5 Fix for multiple provider ids
ECOM-2538
2015-10-21 13:54:59 +00:00
Will Daly
8555630df7 Upgrade djangorestframework to v3.1
* Upgrade edx-submissions
* Upgrade edx-ora2
* Upgrade edx-val
* Upgrade edx-proctoring
* Update all edx-platform code that depends on DRF, including:
  - auth_exchange
  - cors_csrf
  - embargo
  - enrollment
  - util
  - commerce
  - course_structure
  - discussion_api
  - mobile_api
  - notifier_api
  - teams
  - credit
  - profile_images
  - user_api
  - lib/api (OAuth2 and pagination)
2015-09-25 12:40:57 -04:00
Clinton Blackburn
99c410dc16 Treating final grade as string
Floating point values should be treated as strings to ensure values such as 1.0 are not converted to 1. Such conversion invalidates the signature generated for the credit request. Additionally, JSON has no concept of a floating point datatype.

ECOM-2172
2015-09-17 11:49:54 -04:00
Clinton Blackburn
a1ba77d6b3 Diabled CSRF protection for Credit Course API endpoints
CSRF protection needs to be disabled so that requests made using OAuth and other non-session-based authentication mechanisms can be properly processed. If session authentication is used, DRF will enforce CSRF protection.

XCOM-524
2015-08-29 03:02:05 -04:00
Clinton Blackburn
58865ee0a8 Added API endpoints for CreditCourse
Endpoints support create, read, and list operations.

NOTE: This commit also includes a retrofitted SimpleRouter that supports overriding the lookup regex. This retrofit is simpler to implement than updating edx-ora2 which is pinned to DRF 2.3.x.

XCOM-524
2015-08-11 15:44:37 -04:00
Tasawer
6e788d95b9 new view added "get_provider_detail" for getting provider info with provider_id
ECOM-1858
2015-07-15 12:25:26 +05:00
Will Daly
da982341e7 Accept string-encoded timestamps 2015-06-25 13:18:30 -07:00
Will Daly
62742952a2 Make credit provider callback CSRF exempt 2015-06-25 13:04:45 -07:00
Will Daly
cea06e1217 Update the format of the credit provider timestamp.
Use the number of seconds since the epoch (Jan 1 1970 UTC)
instead of an ISO-formatted datetime string.  This is easier
for credit providers to parse.
2015-06-22 10:03:31 -07:00
Will Daly
8988aa1c9e Credit provider integration Python API
* Add end-point for initiating a request for credit from a provider.
* Add an end-point for a provider to update the status of a request (approved / denied).
2015-06-11 11:34:25 -04:00