diff --git a/ocpi/core/push.py b/ocpi/core/push.py index f00dc19..f1c7836 100644 --- a/ocpi/core/push.py +++ b/ocpi/core/push.py @@ -123,7 +123,7 @@ async def push_object( receiver_responses = [] for receiver in push.receivers: # get client endpoints - if version.value.startswith("2.1") or version.value.startswith("2.0"): + if receiver.raw_token or version.value.startswith("2.1") or version.value.startswith("2.0"): token = receiver.auth_token else: # 2.2.x and 2.3.x use base64-encoded tokens token = encode_string_base64(receiver.auth_token) diff --git a/ocpi/core/schemas.py b/ocpi/core/schemas.py index 93772d6..78a1999 100644 --- a/ocpi/core/schemas.py +++ b/ocpi/core/schemas.py @@ -24,6 +24,7 @@ class OCPIResponse(BaseModel): class Receiver(BaseModel): endpoints_url: URL auth_token: str + raw_token: bool = False class Push(BaseModel): diff --git a/ocpi/modules/cdrs/v_2_2_1/schemas.py b/ocpi/modules/cdrs/v_2_2_1/schemas.py index 7a798a0..d6430f8 100644 --- a/ocpi/modules/cdrs/v_2_2_1/schemas.py +++ b/ocpi/modules/cdrs/v_2_2_1/schemas.py @@ -79,6 +79,7 @@ class CdrLocation(BaseModel): state: String(20) | None # type: ignore country: String(3) # type: ignore coordinates: GeoLocation + evse_uid: CiString(36) # type: ignore evse_id: CiString(48) # type: ignore connector_id: CiString(36) # type: ignore connector_standard: ConnectorType diff --git a/ocpi/modules/cdrs/v_2_3_0/schemas.py b/ocpi/modules/cdrs/v_2_3_0/schemas.py index 64a3a5b..4be0a50 100644 --- a/ocpi/modules/cdrs/v_2_3_0/schemas.py +++ b/ocpi/modules/cdrs/v_2_3_0/schemas.py @@ -79,6 +79,7 @@ class CdrLocation(BaseModel): state: String(20) | None # type: ignore country: String(3) # type: ignore coordinates: GeoLocation + evse_uid: CiString(36) # type: ignore evse_id: CiString(48) # type: ignore connector_id: CiString(36) # type: ignore connector_standard: ConnectorType