Credentials

OCPI 2.2.1

By Abhishek Uniyal · Updated

Credentials in OCPI 2.2.1

The Credentials module registers two platforms and exchanges their access details. Authenticate this illustrative POST with bootstrap Token A. Its body supplies a different token for requests back to the registering platform.

Sources (2)
"The Sender generates a unique credentials token: `CREDENTIALS_TOKEN_B`, sends it to the Receiver in a POST request to the `credentials` module of the Receiver. The Receiver stores `CREDENTIALS_TOKEN_B` and uses it for any requests to the Sender Platform, including the version information and details."OCPI 2.2.1 Credentials chapter · #credentials_registration"After the literal 'Token', there SHALL be one space, followed by the 'encoded token'. The encoded token is obtained by encoding the credentials token to an octet sequence with UTF-8 and then encoding that octet sequence with Base64 according to https://datatracker.ietf.org/doc/html/rfc4648#section-4[RFC 4648]."OCPI 2.2.1 Transport and format chapter · #transport_and_format_authorization_header

Example request · registration-post

Authorization: Token ZXhhbXBsZS1ib290c3RyYXAtQQ==

{
  "token": "example-reverse-B",
  "url": "https://sender.example.invalid/versions",
  "roles": [
    {
      "role": "CPO",
      "party_id": "EXA",
      "country_code": "NL",
      "business_details": {
        "name": "Example Sender"
      }
    },
    {
      "role": "EMSP",
      "party_id": "EXA",
      "country_code": "NL",
      "business_details": {
        "name": "Example Provider"
      }
    }
  ]
}
Read the credentials exchange

Which endpoints does this module define?

These paths illustrate the requests. Use the URLs advertised by your partner, replace the placeholders and choose the matching interface. A listed method does not establish that this site's simulator implements it.

Both parties

  • Retrieves the credentials object to access the server's platform.

    GET
    /ocpi/2.2.1/credentials/
  • Provides the server with a credentials object to access the client's system (i.e. register).

    POST
    /ocpi/2.2.1/credentials/
  • Provides the server with an updated credentials object to access the client's system.

    PUT
    /ocpi/2.2.1/credentials/
  • Informs the server that its credentials to the client's system are now invalid (i.e. unregister).

    DELETE
    /ocpi/2.2.1/credentials/
Source
Method: Description GET: Retrieves the credentials object to access the server's platform. POST: Provides the server with a credentials object to access the client's system (i.e. register). PUT: Provides the server with an updated credentials object to access the client's system. PATCH: n/a DELETE: Informs the server that its credentials to the client's system are now invalid (i.e. unregister).OCPI 2.2.1 Credentials chapter · #credentials_interfaces_and_endpoints

Try an endpoint

Send a request to this site's OCPI endpoints and read the answer. It never reaches your own system.