Draft
Implement CAS Protocol Support for Single Sign-On Integration#1
Conversation
Deploying uaaa with
|
| Latest commit: |
b6bea7e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5b9c113e.uaaa.pages.dev |
| Branch Preview URL: | https://copilot-fix-3645b4c5-9230-45.uaaa.pages.dev |
Co-authored-by: thezzisu <21094314+thezzisu@users.noreply.github.com>
Co-authored-by: thezzisu <21094314+thezzisu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement CAS protocol like how oauth2/openid is implemented
Implement CAS Protocol Support for Single Sign-On Integration
Aug 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive support for the Central Authentication Service (CAS) protocol in UAAA, providing single sign-on (SSO) capabilities for web applications that use CAS instead of OAuth2/OpenID Connect.
What's New
CAS Protocol Implementation
New Endpoints
GET/POST /cas/login- CAS login endpoint with service parameterGET /cas/serviceValidate- Ticket validation endpoint (CAS 2.0/3.0)GET /cas/p3/serviceValidate- Alternative CAS 3.0 validation endpointGET/POST /cas/logout- Single logout endpointIntegration Features
Usage Example
Response Formats
Success Response (XML)
Success Response (JSON)
{ "serviceResponse": { "authenticationSuccess": { "user": "john.doe", "attributes": { "email": "john.doe@example.com", "name": "John Doe" } } } }Architecture
The CAS implementation follows the same architectural patterns as the existing OAuth2/OIDC implementation:
CASManager- Core protocol logic (similar toOAuthManager)casRouter- HTTP endpoint definitions (similar tooauthRouter)CASConnector- UI integration for authorization flowsFiles Added
packages/server/src/cas/_common.ts- CAS protocol managerpackages/server/src/cas/index.ts- CAS HTTP endpointspackages/server/test/cas.test.js- Test coveragedocs/cas-protocol.md- Protocol documentationdocs/cas-examples.md- Integration examplesFiles Modified
packages/server/src/index.ts- App integrationpackages/server/src/api/session/index.ts- Ticket generation endpointpackages/server/src/db/model/token.ts- CAS ticket fieldspackages/ui/app/composables/useAuthorize.ts- UI connectorREADME.md- Feature documentationTesting
The implementation includes comprehensive test coverage and has been validated with manual testing. All existing functionality remains unchanged.
Security Considerations
This implementation enables organizations to integrate CAS-based applications with UAAA's unified authentication system while maintaining the same security standards and user experience as OAuth2/OIDC applications.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.