You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: auth token base64 fallback and CiString case preservation (#9)
* fix: auth token base64 fallback and CiString case preservation
- Make base64 token decoding resilient: catch all decode errors and
fall back to raw token instead of raising AuthorizationOCPIError.
This allows development setups to use plain-text tokens with OCPI
2.2+ endpoints.
- Preserve original case in CiString instead of forcing lower/upper.
CiString means case-insensitive comparison, not mutation. Forcing
case destroyed identifiers like OCPP charge point IDs.
- Change CI_STRING_LOWERCASE_PREFERENCE default to false (preserve
case by default).
- Add try/except in get_auth_token() for decode_string_base64 to
gracefully handle non-base64 tokens.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: add auth_id to Session and CDR schemas (OCPI 2.2.1 required field)
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: auth token fallback, CiString case preservation, remove auth_id (OCPI 2.2.1)
- Auth: fallback to raw token when base64 decode fails (dev/integration)
- CiString: preserve original case (OCPP IDs like K0032832A)
- Remove auth_id from Session/CDR v2.2.1 (replaced by CdrToken per spec)
- Remove CI_STRING_LOWERCASE_PREFERENCE (dead config)
- Narrow exception handling to (UnicodeDecodeError, ValueError)
- Add tests for plain-text fallback and CiString case preservation
Co-authored-by: Cursor <cursoragent@cursor.com>
* style: ruff format verifier.py
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Alfonso Sastre <alfonso@elumobility.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments