chore(scripts): add OCPI 2.2.1 registration walker#2
Open
MostafaMoradii wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/ocpi-register.sh— walks the OCPI 2.2.1 credentials handshake (GET/versions→ GET/versions/{v}→ POST/credentials) against a hub.Authorization: Tokenvalue (OCPI 2.2+ requirement), prints each request/response with status + headers + JSON-pretty body, and stops on the first 4xx/5xx so failures are obvious.HUB_BASE,TOKEN_A,MY_VERSIONS_URL,MY_TOKEN_B,COUNTRY_CODE,PARTY_ID); body shape is 2.2/2.2.1 (the script header notes how to adjust for 2.1.1).Used today to diagnose a
401 Unauthorizedontestapiv2.ortaksarjplatformu.com/ocpi/versions(token had been consumed; awaiting a freshTOKEN_A).Test plan
bash -n scripts/ocpi-register.sh(syntax)TOKEN_Aarrives; expect the three steps to print andPOST /credentialsto return ourTOKEN_CTOKEN_Aand confirm the script stops at step 1 with status 401