-
Notifications
You must be signed in to change notification settings - Fork 0
Add authentication status and new request params #17
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
Conversation
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 PR adds support for forwarding client IP addresses and user agent information to the privacyIDEA server, improving audit trails and security context for authentication operations. The changes also include code organization improvements and the introduction of a new authentication status enum.
Key changes:
- Added optional
clientIPandclientUserAgentparameters to all public API methods for forwarding client context - Introduced
PIAuthenticationStatusenum for representing authentication outcomes - Improved code documentation and reorganized helper methods for better maintainability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| PrivacyIDEA.cs | Added client info parameters to all public API methods, implemented AddClientInfo helper, improved documentation, and reorganized code structure |
| PIAuthenticationStatus.cs | New enum defining authentication status values (UNDEFINED, ACCEPT, REJECT, CHALLENGE) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
This pull request introduces support for forwarding client IP and user agent information to the privacyIDEA server in several API calls. It also refactors internal helper methods and improves code documentation and organization. The most important changes are grouped below.
Client Information Forwarding:
clientIPandclientUserAgentparameters to all major public API methods inPrivacyIDEA.cs, enabling the forwarding of client-specific information to the privacyIDEA server. These parameters are now included in requests via the newAddClientInfohelper method. [1] [2] [3] [4] [5] [6] [7]AddClientInfoprivate method to append client IP and user agent data to request parameter dictionaries when provided.Code Organization and Documentation:
SetServiceAccountmethod, placing it after the request logic for better organization and clarity. [1] [2]Internal Refactoring:
GetAuthTokenmethod to accept optional client info parameters and forward them in authentication requests. [1] [2]StringContent, improving code reuse.New Enum Definition:
PIAuthenticationStatusenum to represent authentication outcomes, improving code clarity and type safety.Closing #1