lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go
MIT License
277 stars 126 forks source link

Allow intercepting the client id inside the checkClientHandler #280

Open FabianTerhorst opened 4 months ago

FabianTerhorst commented 4 months ago

I had a issue having multiple connections with the same client id, but with a different token inside the http websocket upgrade request. Making it possible to remap the id inside the checkClientHandler would fix this for me. Im open to suggestions.

lorenzodonini commented 3 months ago

Hey, can you explain in more detail why this would be needed? The client identifier has to be passed within the URL as per specification. Why would this ID depend on another token passed within the request?

If you could provide an example the requirement would become clearer.

Note that duplicate clients with the same ID currently get rejected with a 1008 (policy violation) error. This is to prevent kicking out existing clients.