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

ThePalaceProject / web-patron / 15615874631

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

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.36
/src/auth/BasicTokenAuthHandler.tsx


Source Not Available

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