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

ThePalaceProject / web-patron / 15615874631
77%

Build:
DEFAULT BRANCH: main
Ran 12 Jun 2025 04:20PM UTC
Jobs 1
Files 107
Run time 205min
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

12 Jun 2025 04:19PM UTC coverage: 83.738% (-0.2%) from 83.896%
15615874631

push

github

web-flow
Add token authentication (PP-2240) (#66)

## Description

<!--- Describe your changes -->
Basic token authentication has been added as one of the supported
methods for authenticating users. On a successful login, the user's
credentials are saved. The stored credentials are used to refresh a
token once it has expired. This all happens in the background; once a
user has logged in with a token, they will be logged in without
interruption unless the user signs themselves out.

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->
Palace's mobile clients all have implemented token auth. This gets the
CPW more up to date.
<!--- If it fixes an open issue, please link to the issue here. -->

[Jira PP-2240](https://ebce-lyrasis.atlassian.net/browse/PP-2240)

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
Added tests mock fetching a token from circulation manager using test
credentials and grabbing a new token if a 401 was returned and
credentials had previously been saved.
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have updated the documentation accordingly.
- [x] All new and existing tests passed.

842 of 1097 branches covered (76.75%)

Branch coverage included in aggregate %.

52 of 60 new or added lines in 6 files covered. (86.67%)

1434 of 1621 relevant lines covered (88.46%)

29.78 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
86.36
src/auth/BasicTokenAuthHandler.tsx
2
69.23
src/auth/fetch.ts
2
82.65
3.81% src/components/context/UserContext.tsx
3
12.9
-3.1% src/auth/AuthenticationHandler.tsx
Jobs
ID Job ID Ran Files Coverage
1 15615874631.1 12 Jun 2025 04:20PM UTC 107
83.74
GitHub Action Run
Source Files on build 15615874631
  • Tree
  • List 107
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 4777158f on github
  • Prev Build on main (#14845643120)
  • Next Build on main (#15742568006)
  • Delete
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