Skip to content

Improve some SAML error responses (PP-3507)#2997

Merged
tdilauro merged 1 commit intomainfrom
bugfix/saml-invalid-credentials-message
Jan 21, 2026
Merged

Improve some SAML error responses (PP-3507)#2997
tdilauro merged 1 commit intomainfrom
bugfix/saml-invalid-credentials-message

Conversation

@tdilauro
Copy link
Contributor

Description

  • Improves some SAML problem detail documents to make them more useful to client app users.
  • Adds a problem detail specifically for SAML expired token.

Motivation and Context

Some of our authentication failure problem detail messages are overly focused on username/password or barcode/PIN credentialed login mechanisms. For example, one problem document received by a SAML patron contained this detail text:

A valid library card barcode number and PIN are required.

[Jira PP-3507]

How Has This Been Tested?

  • All tests pass locally.
  • CI tests pass.

Checklist

  • N/A - I have updated the documentation accordingly.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.93%. Comparing base (34a7c21) to head (9f8a022).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2997      +/-   ##
==========================================
- Coverage   92.93%   92.93%   -0.01%     
==========================================
  Files         453      453              
  Lines       42957    42956       -1     
  Branches     5989     5988       -1     
==========================================
- Hits        39923    39922       -1     
  Misses       1966     1966              
  Partials     1068     1068              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jonathangreen jonathangreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@tdilauro tdilauro merged commit 560ec7a into main Jan 21, 2026
19 checks passed
@tdilauro tdilauro deleted the bugfix/saml-invalid-credentials-message branch January 21, 2026 16:37
tdilauro added a commit that referenced this pull request Jan 21, 2026
## Description

Replace deprecated `setParseAction` with newer `set_parse_action` in the
SAML Python DSL parser.

No logic or other changes are included in this PR.

## Motivation and Context

While testing #2997, I noticed a lot of deprecation warnings like this
one in the output:
```
src/palace/manager/integration/patron_auth/saml/python_expression_dsl/parser.py:55
  /Users/Shared/src/tpp/circulation/src/palace/manager/integration/patron_auth/saml/python_expression_dsl/parser.py:55: DeprecationWarning: 'setParseAction' deprecated - use 'set_parse_action'
    NEGATION_OPERATOR = Literal("-").setParseAction(lambda _: Operator.NEGATION)
```

## How Has This Been Tested?

All tests continue to pass, both locally and [in
CI](https://github.com/ThePalaceProject/circulation/actions/runs/21214944881).

## Checklist

- N/A I have updated the documentation accordingly.
- [x] All new and existing tests passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants