Skip to content

feat(backends): implement a generic CAS backend - #1986

Open
sinavir wants to merge 2 commits into
python-social-auth:masterfrom
sinavir:cas
Open

sinavir wants to merge 2 commits into
python-social-auth:masterfrom
sinavir:cas

Conversation

@sinavir

@sinavir sinavir commented Sep 16, 2026

Copy link
Copy Markdown

This commit introduces support for the CAS protocol using python-cas library.

It is tested using zulip (for the client) and django-cas-server (for the cas server).

I'm not very confident about how to write the test for this. I'm interested to know if you recommend any code or documentation interesting to get that task done

@nijel

nijel commented Sep 17, 2026

Copy link
Copy Markdown
Member

Thanks for the pull requests. The tests typically mock the authentication API provider, check existing tests for inspiration. Documentation should be added to https://github.com/python-social-auth/social-docs/.

@nijel

nijel commented Sep 17, 2026

Copy link
Copy Markdown
Member

@codex review

Comment thread pyproject.toml Outdated
"defusedxml>=0.7.1",
"oauthlib>=3.3.1",
"PyJWT[crypto]>=2.13.0",
"python-cas>=1.7.2",

@nijel nijel Sep 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should probably go to an extra, not be part of core deps like Google OneTap or Shopify.

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.00%. Comparing base (c0b4ecc) to head (da7fdf8).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
social_core/backends/cas_generic.py 0.00% 30 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1986      +/-   ##
==========================================
- Coverage   89.19%   89.00%   -0.20%     
==========================================
  Files         345      346       +1     
  Lines       13926    13956      +30     
  Branches      698      700       +2     
==========================================
  Hits        12421    12421              
- Misses       1262     1292      +30     
  Partials      243      243              
Flag Coverage Δ
unittests 89.00% <0.00%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

This commit introduce support for the CAS protocol using python-cas
library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants