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 primarily focuses on the implementation of a test client for the OCPP server and the addition of authentication features. The changes are spread across multiple files in the
ocpp-server
directory, including changes to theMakefile
,OcppService.cs
, andappgw.bicep
. Additionally, a newclient
directory has been created with necessary files for the test client.Here are the most important changes:
OCPP Server Changes:
ocpp-server/Makefile
: Added new commandstest-client
andtest-client-badauth
for testing a simple node client with good and bad authentication respectively. Also, thetest-client
command has been added to the.PHONY
rule. [1] [2]ocpp-server/api/OcppServer/PubSub/OcppService.cs
: Added a new authentication check when a new user connects. If theauth
query parameter is present and not equal to a predefined value, anUnauthorizedAccessException
is thrown. [1] [2]ocpp-server/infra/modules/appgw.bicep
: Updated the application gateway configuration to use theAuthorization
header for authentication and changed the modified path and query string in the URL configuration. [1] [2]Test Client Implementation:
ocpp-server/client/index.js
: Implemented a simple WebSocket client that connects to the server using the OCPP protocol. The client can send and receive messages from the server.ocpp-server/client/package.json
andocpp-server/client/package-lock.json
: Added thews
package as a dependency for the test client. [1] [2]ocpp-server/client/.gitignore
: Added a comprehensive.gitignore
file for the client directory to ignore logs, cache files, dependency directories, and other unnecessary files.Add node client with basic auth