CPO asks the eMSP to authorize the token

Start here · 8 min

OCPI 2.1.1, 2.2.1 and 2.3.0

Showing OCPI 2.1.1 exchanges. Explanations and sources show the OCPI 2.2.1 reading. Physical and billing-system events are authored examples.

Part of the lesson OCPI charging session lifecycle

Step 3 of 10 · Complete EV charging session
tokensCPOsendseMSPreceives
tokensDriverActorChargerActorCPOsendseMSPreceives
Legend

The line follows the selected step. Actor dots identify the parties; they show no conformance verdict.

Step 3 of 10 · Paused

Selected step

All 4 actors

Driver · Charger · CPO · eMSP

Selected exchange

The token belongs to a driver of the eMSP. Its whitelist value, ALLOWED_OFFLINE, means real-time authorization is used while the eMSP can be reached, so the CPO asks the eMSP to authorize the token through the Tokens module.

CPO → eMSP · tokens

Sources (3)
"When the token is known by the Sender, the response SHALL contain a AuthorizationInfo object. If the token is not known, the response SHALL contain the status code: `2004: Unknown Token`, and no `data` field."OCPI 2.2.1 Tokens module · #mod_tokens_post_response_dataALWAYS: Token always has to be whitelisted, realtime authorization is not possible/allowed. CPO shall always allow any use of this Token. ALLOWED: It is allowed to whitelist the token, realtime authorization is also allowed. The CPO may choose which version of authorization to use. ALLOWED_OFFLINE: In normal situations realtime authorization shall be used. But when the CPO cannot get a response from the eMSP (communication between CPO and eMSP is offline), the CPO shall allow this Token to be used. NEVER: Whitelisting is forbidden, only realtime authorization is allowed. CPO shall always send a realtime authorization for any use of this Token to the eMSP.OCPI 2.2.1 Tokens module · #mod_tokens_whitelisttype_enumlocation_id · CiString(36) · cardinality 1: Unique identifier for the location. evse_uids · CiString(36) · cardinality *: Unique identifiers for EVSEs within the CPO's platform for the EVSE within the given location.OCPI 2.2.1 Tokens module · #mod_tokens_locationreferences_class
Why this matters

The Token whitelist policy determines whether real-time authorization or a cached whitelist is used. ALWAYS uses the whitelist; NEVER uses real-time authorization.

Explore the tokens module

No sandbox run sends this exchange, so there is nothing to run here.

Test this flow

Test this flow runs against an eMSP endpoint you have registered. The endpoint test grades your endpoint's answer to each Session push. It does not read the stored Session back.