Closed dwibudut closed 1 year ago
Hey there, thanks a lot for adding this. The use-case is definitely valid. I might take the liberty to slightly modify/move this logic at a later stage though.
The tests are currently failing because the MockWebsocketServer
in the following files requires the new method signature as well:
ocppj/ocppj_test.go
,ocpp1.6_test/ocpp16_test.go
ocpp2.0.1_test/ocpp2_test.go
Hello,
I just implement the requires method SetCheckClientHandler
on the MockWebsocketServer
and add test func to the method
ocppj/ocppj_test.go
ocpp1.6_test/ocpp16_test.go
ocpp2.0.1_test/ocpp2_test.go
This method can be used to validate the charging station id on database or API before connected upgraded(ws) or other, like validate request IP that allowed on the server, etc.
Thx
Great, thanks a lot for writing tests as well! Merged it
Feature to add a custom client validation handler before connected For example: used for validate the charging station id on database or API before connected upgraded(ws)