• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

edx / frontend-auth / 674
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: renovate/prop-types-15.x
DEFAULT BRANCH: master
Ran 05 Nov 2019 10:09PM UTC
Jobs 1
Files 10
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
674

push

travis-ci

web-flow
feat: anonymous access (#82)

This PR allows unauthenticated requests to be made though the apiClient. There are breaking behavior changes. There are also breaking API changes as well as new functionality contained in this refactor.

**New functionality:**

- `getAuthenticatedUser`: a function that gets the jwt token and returns user information. It will return null if the user is not authenticated. It will not perform a redirect, unlike `ensureAuthenticatedUser`.
- `isPublic` and `isCsrfExempt` options have been added to request configuration for axios requests (get, post, patch, etc). Setting these to true will prevent frontend-auth from attempting to refresh the jwt access token or a csrf token respectively.

BREAKING CHANGE: (Behavior Change) Frontend-auth intercepts outbound requests and attempts to refresh the jwt token if it does not exist or is expired. In the case of a 401 response indicating that the user is logged out, frontend auth will not redirect the user to login, and will allow the outbound request to proceed. Prior behavior: Upon receiving a 401 response, frontend-auth would block the request and redirect the user to login.

`ensureAuthenticatedUser` continues to redirect if the user is logged out.

**API Changes**

- `getAuthenticatedAPIClient` has been renamed to `getAuthenticatedApiClient`. Note the capitalization changes: API  > Api.
- `redirectToLogout` (formerly `apiClient.logout`)
- `redirectToLogin` (formerly `apiClient.login`)
- `ensureAuthenticatedUser` (formerly `apiClient.ensureAuthenticatedUser`)

See the updated README for more details.

58 of 58 branches covered (100.0%)

Branch coverage included in aggregate %.

142 of 142 new or added lines in 6 files covered. (100.0%)

203 of 203 relevant lines covered (100.0%)

21.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 674.1 05 Nov 2019 10:09PM UTC 0
100.0
Travis Job 674.1
Source Files on build 674
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #674
  • de68ed45 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc