diff --git a/include/ocpp/v201/ctrlr_component_variables.hpp b/include/ocpp/v201/ctrlr_component_variables.hpp index 6ecddef25..95b2a49bb 100644 --- a/include/ocpp/v201/ctrlr_component_variables.hpp +++ b/include/ocpp/v201/ctrlr_component_variables.hpp @@ -155,6 +155,7 @@ extern const ComponentVariable LocalAuthListCtrlrEnabled; extern const RequiredComponentVariable LocalAuthListCtrlrEntries; extern const RequiredComponentVariable ItemsPerMessageSendLocalList; extern const ComponentVariable LocalAuthListCtrlrStorage; +extern const ComponentVariable LocalAuthListDisablePostAuthorize; extern const ComponentVariable MonitoringCtrlrAvailable; extern const ComponentVariable BytesPerMessageClearVariableMonitoring; extern const RequiredComponentVariable BytesPerMessageSetVariableMonitoring; diff --git a/lib/ocpp/v201/charge_point.cpp b/lib/ocpp/v201/charge_point.cpp index e378d1109..7c9d8a20e 100644 --- a/lib/ocpp/v201/charge_point.cpp +++ b/lib/ocpp/v201/charge_point.cpp @@ -930,6 +930,12 @@ AuthorizeResponse ChargePoint::validate_token(const IdToken id_token, const std: EVLOG_info << "Found invalid entry in local authorization list but not sending Authorize.req because " "RemoteAuthorization is disabled"; response.idTokenInfo.status = AuthorizationStatusEnum::Unknown; + } else if (this->device_model + ->get_optional_value(ControllerComponentVariables::LocalAuthListDisablePostAuthorize) + .value_or(false)) { + EVLOG_info << "Found invalid entry in local authorization list but not sending Authorize.req because " + "LocalAuthListDisablePostAuthorize is enabled"; + response.idTokenInfo.status = AuthorizationStatusEnum::Unknown; } else if (this->connectivity_manager->is_websocket_connected()) { // C14.FR.03: If a value found but not valid we shall send an authorize request EVLOG_info << "Found invalid entry in local authorization list: Sending Authorize.req"; diff --git a/lib/ocpp/v201/ctrlr_component_variables.cpp b/lib/ocpp/v201/ctrlr_component_variables.cpp index 263e3d86f..ad65bca49 100644 --- a/lib/ocpp/v201/ctrlr_component_variables.cpp +++ b/lib/ocpp/v201/ctrlr_component_variables.cpp @@ -826,6 +826,13 @@ const ComponentVariable LocalAuthListCtrlrStorage = { "Storage", }), }; +const ComponentVariable LocalAuthListDisablePostAuthorize = { + ControllerComponents::LocalAuthListCtrlr, + std::nullopt, + std::optional({ + "DisablePostAuthorize", + }), +}; const ComponentVariable MonitoringCtrlrAvailable = { ControllerComponents::MonitoringCtrlr, std::nullopt,