Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ocpi/core/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ocpi/core/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class OCPIResponse(BaseModel):
class Receiver(BaseModel):
endpoints_url: URL
auth_token: str
raw_token: bool = False


class Push(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions ocpi/modules/cdrs/v_2_2_1/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ocpi/modules/cdrs/v_2_3_0/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading