edx-app-ios
edx-app-ios copied to clipboard
[chore] jwt authentication implementation
Description
For in-app purchases, we need to make api calls to e-commerce backend of edx-platform. E-commerce apis use jwt
authentication instead of bearer
authentication, so we need to migrate from bearer
to jwt
and also let users use the application who have already logged in. New refresh
token calls for existing apis fetch the new jwt
token using the old refresh_token
, once updated, application will be migrated to fetch jwt
token, while if a user signs in again, application will receive jwt
token.
Implementation of following authentication cases:
- [ ] Username/Password
- [ ] Social login
- [ ] Token Expiration
- [ ] Webview Authentication
How to test this PR
- [ ] Mobile client can authenticate and use ecommerce endpoints
- [ ] Mobile client can still authenticate and use webviews and other endpoints
Notes:
Currently jwt
implementation is available on iap sandbox
@mumer92 I haven't see any change to request JWT token in case of social auth.
@asifbilal786 You can review this PR.
@mumer92 tests are failing