-
Notifications
You must be signed in to change notification settings - Fork 7
54 enroll via multichallenge optional #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors the privacyIDEAADFSProvider codebase to improve maintainability and add support for forwarding custom client information during authentication. The changes standardize string usage through named constants, enhance parameter forwarding capabilities, and update dependencies.
Key changes:
- Introduced
PIConstantsclass to replace hardcoded strings throughout the codebase - Added configuration flags and logic to forward client IP address and user agent to the PrivacyIDEA backend
- Enhanced enrollment cancellation handling with new UI controls and API support
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| PIConstants.cs | New file defining constants for endpoints, parameters, token types, and other string literals |
| PrivacyIDEA.cs | Refactored to use PIConstants; added custom parameter forwarding to all API methods |
| PIResponse.cs | Updated to use constants and added enrollment via multichallenge optional flags |
| Adapter.cs | Implemented custom parameter collection and forwarding; added enrollment cancellation handling |
| Configuration.cs | Added configuration flags for forwarding client IP and user agent |
| AuthPage.html | Added cancel enrollment button and supporting JavaScript |
| AdapterPresentationForm.cs | Added property for enrollment via multichallenge optional state |
| FormResult.cs | Added enrollment cancelled flag |
| RegistryReader.cs, PILog.cs, PIChallenge.cs, PIEnrollResponse.cs, PIWebAuthnSignRequest.cs | Updated namespace references |
| Tests.csproj | Added Newtonsoft.Json dependency |
| PrivacyIDEAClientTests.cs | Renamed class and updated namespace import |
| privacyIDEAADFSProvider.sln | Updated Visual Studio version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
…b.com/privacyidea/adfs-provider into 54-enroll-via-multichallenge-optional
…b.com/privacyidea/adfs-provider into 54-enroll-via-multichallenge-optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
…b.com/privacyidea/adfs-provider into 54-enroll-via-multichallenge-optional
This pull request refactors the
privacyIDEAADFSProvider/Adapter.csfile to centralize and standardize string constants by using thePIConstantsclass, and modularizes authentication logic for better maintainability. The changes improve code readability, reduce hard-coded strings, and make the authentication flow easier to extend and debug.Refactoring for constant usage:
PIConstants, including keys for context data, transaction IDs, modes, error messages, and HTTP headers. This makes the code less error-prone and easier to maintain. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Modularization of authentication logic:
ProcessPasskeyAuthentication,ProcessPasskeyRegistration,ProcessPushAuthentication,ProcessWebauthnAuthentication). This reduces code duplication and improves clarity in the main authentication flow. [1] [2]General improvements: