Skip to content
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

Nodeclient #7

Merged
merged 8 commits into from
Jul 24, 2024
Merged

Nodeclient #7

merged 8 commits into from
Jul 24, 2024

Conversation

jmservera
Copy link
Owner

@jmservera jmservera commented Jul 24, 2024

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 the Makefile, OcppService.cs, and appgw.bicep. Additionally, a new client 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 commands test-client and test-client-badauth for testing a simple node client with good and bad authentication respectively. Also, the test-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 the auth query parameter is present and not equal to a predefined value, an UnauthorizedAccessException is thrown. [1] [2]
  • ocpp-server/infra/modules/appgw.bicep: Updated the application gateway configuration to use the Authorization 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 and ocpp-server/client/package-lock.json: Added the ws 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

ocpp-server/client/index.js Dismissed Show dismissed Hide dismissed
@jmservera jmservera merged commit 1e52c90 into main Jul 24, 2024
5 checks passed
@jmservera jmservera deleted the nodeclient branch July 24, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant