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

Allow basic auth username to be explicitly defined #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msqr
Copy link

@msqr msqr commented Jul 1, 2024

Currently when basic authorization is used because the PASSWORD environment variable is defined, the username is assumed to be the charge point ID (the CP_ID environment variable). This change is to allow an explicit basic authorization username to be used instead, by defining a CP_USERNAME environment variable. For example:

WS_URL=ws://localhost:9085/ocpp/j/v16 CP_ID=CP0 CP_USERNAME=foo PASSWORD=secret npx ts-node index_16.ts

In the case that PASSWORD is defined but CP_USERNAME is not, then the current behavior is preserved and CP_ID is used for the basic authorization username.

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