Fix/devtools fixex#1418
Merged
Merged
Conversation
…tructure Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Essentials web API login response payload and refactors debug WebSocket TLS certificate loading to improve PKCS#12 compatibility on the Crestron/Mono runtime.
Changes:
- Updated
/loginPOST handler to return a structuredLoginResponseobject instead of the prior{ Token = ... }wrapper. - Introduced an internal
LoginResponseDTO to control which authentication fields are serialized. - Simplified
DebugWebsocketSinkPKCS#12 loading by re-encoding the archive with BouncyCastle and importing viaX509Certificate2from raw bytes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/PepperDash.Essentials.Core/Web/RequestHandlers/LoginRequestHandler.cs |
Changes the login response contract and adds a LoginResponse DTO. |
src/PepperDash.Core/Logging/DebugWebsocketSink.cs |
Refactors PKCS#12 import path for the debug WSS certificate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
andrew-welker
approved these changes
May 11, 2026
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 pull request introduces two main changes: it updates the login response structure to include more detailed user information, and it simplifies the process of loading PKCS#12 certificates for the debug WebSocket sink to improve compatibility and reliability.
Closes PepperDash/essentials-devtools#29 as verified by @jonnyarndt
Login Response Enhancements:
LoginResponseobject, including fields such asUserName,Password,Access,State,Groups,ADConnect, andValid, instead of just a token string. This provides clients with more comprehensive authentication data.LoginResponseclass is introduced to encapsulate all relevant authentication response fields.Certificate Loading Improvements:
LoadCertFromBouncyCastlemethod inDebugWebsocketSinkhas been refactored to re-encode the PKCS#12 archive using BouncyCastle and pass the raw bytes directly toX509Certificate2. This removes the need forRSACryptoServiceProviderand avoids issues with theEphemeralKeySetflag, improving compatibility with the Crestron/Mono runtime. [1] [2]