Docs › OCPP 2.0.1 › Authorize

Authorize OCPP 2.0.1

Der Simulator sendet diese Nachricht als Ladepunkt.

Auch in: OCPP 1.6, OCPP 2.1

Request

FeldTypEinschränkungen / Beschreibung
idTokenobjectPflichtContains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
idToken.additionalInfoarray<object>minItems 1
idToken.additionalInfo[].additionalIdTokenstringPflichtmaxLength 36
This field specifies the additional IdToken.
idToken.additionalInfo[].typestringPflichtmaxLength 50
This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.
idToken.idTokenstringPflichtmaxLength 36
IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
idToken.typestringPflichtenum: Central, eMAID, ISO14443, ISO15693, KeyCode, Local, MacAddress, NoAuthorization
Enumeration of possible idToken types.
certificatestringmaxLength 5500
The X.509 certificated presented by EV and encoded in PEM format.
iso15118CertificateHashDataarray<object>minItems 1; maxItems 4
iso15118CertificateHashData[].hashAlgorithmstringPflichtenum: SHA256, SHA384, SHA512
Used algorithms for the hashes provided.
iso15118CertificateHashData[].issuerNameHashstringPflichtmaxLength 128
Hashed value of the Issuer DN (Distinguished Name).
iso15118CertificateHashData[].issuerKeyHashstringPflichtmaxLength 128
Hashed value of the issuers public key
iso15118CertificateHashData[].serialNumberstringPflichtmaxLength 40
The serial number of the certificate.
iso15118CertificateHashData[].responderURLstringPflichtmaxLength 512
This contains the responder URL (Case insensitive).
JSON-Schema (Request)
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "comment": "OCPP 2.0.1 FINAL",
  "definitions": {
    "CustomDataType": {
      "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
      "javaType": "CustomData",
      "type": "object",
      "properties": {
        "vendorId": {
          "type": "string",
          "maxLength": 255
        }
      },
      "required": [
        "vendorId"
      ]
    },
    "HashAlgorithmEnumType": {
      "description": "Used algorithms for the hashes provided.\r\n",
      "javaType": "HashAlgorithmEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "SHA256",
        "SHA384",
        "SHA512"
      ]
    },
    "IdTokenEnumType": {
      "description": "Enumeration of possible idToken types.\r\n",
      "javaType": "IdTokenEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "Central",
        "eMAID",
        "ISO14443",
        "ISO15693",
        "KeyCode",
        "Local",
        "MacAddress",
        "NoAuthorization"
      ]
    },
    "AdditionalInfoType": {
      "description": "Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.\r\n",
      "javaType": "AdditionalInfo",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "additionalIdToken": {
          "description": "This field specifies the additional IdToken.\r\n",
          "type": "string",
          "maxLength": 36
        },
        "type": {
          "description": "This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.\r\n",
          "type": "string",
          "maxLength": 50
        }
      },
      "required": [
        "additionalIdToken",
        "type"
      ]
    },
    "IdTokenType": {
      "description": "Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.\r\n",
      "javaType": "IdToken",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "additionalInfo": {
          "type": "array",
          "additionalItems": false,
          "items": {
            "$ref": "#/definitions/AdditionalInfoType"
          },
          "minItems": 1
        },
        "idToken": {
          "description": "IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.\r\n",
          "type": "string",
          "maxLength": 36
        },
        "type": {
          "$ref": "#/definitions/IdTokenEnumType"
        }
      },
      "required": [
        "idToken",
        "type"
      ]
    },
    "OCSPRequestDataType": {
      "javaType": "OCSPRequestData",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "hashAlgorithm": {
          "$ref": "#/definitions/HashAlgorithmEnumType"
        },
        "issuerNameHash": {
          "description": "Hashed value of the Issuer DN (Distinguished Name).\r\n\r\n",
          "type": "string",
          "maxLength": 128
        },
        "issuerKeyHash": {
          "description": "Hashed value of the issuers public key\r\n",
          "type": "string",
          "maxLength": 128
        },
        "serialNumber": {
          "description": "The serial number of the certificate.\r\n",
          "type": "string",
          "maxLength": 40
        },
        "responderURL": {
          "description": "This contains the responder URL (Case insensitive). \r\n\r\n",
          "type": "string",
          "maxLength": 512
        }
      },
      "required": [
        "hashAlgorithm",
        "issuerNameHash",
        "issuerKeyHash",
        "serialNumber",
        "responderURL"
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "customData": {
      "$ref": "#/definitions/CustomDataType"
    },
    "idToken": {
      "$ref": "#/definitions/IdTokenType"
    },
    "certificate": {
      "description": "The X.509 certificated presented by EV and encoded in PEM format.\r\n",
      "type": "string",
      "maxLength": 5500
    },
    "iso15118CertificateHashData": {
      "type": "array",
      "additionalItems": false,
      "items": {
        "$ref": "#/definitions/OCSPRequestDataType"
      },
      "minItems": 1,
      "maxItems": 4
    }
  },
  "required": [
    "idToken"
  ]
}

Response

FeldTypEinschränkungen / Beschreibung
idTokenInfoobjectPflichtID_ Token urn:x-oca:ocpp:uid:2:233247 Contains status information about an identifier. It is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date.
idTokenInfo.statusstringPflichtenum: Accepted, Blocked, ConcurrentTx, Expired, Invalid, NoCredit, NotAllowedTypeEVSE, NotAtThisLocation, NotAtThisTime, Unknown
ID_ Token. Status. Authorization_ Status urn:x-oca:ocpp:uid:1:569372 Current status of the ID Token.
idTokenInfo.cacheExpiryDateTimestringformat date-time
ID_ Token. Expiry. Date_ Time urn:x-oca:ocpp:uid:1:569373 Date and Time after which the token must be considered invalid.
idTokenInfo.chargingPriorityintegerPriority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; overrules this one.
idTokenInfo.language1stringmaxLength 8
ID_ Token. Language1. Language_ Code urn:x-oca:ocpp:uid:1:569374 Preferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
idTokenInfo.evseIdarray<integer>minItems 1
Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.
idTokenInfo.groupIdTokenobjectContains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.
idTokenInfo.groupIdToken.additionalInfoarray<object>minItems 1
idTokenInfo.groupIdToken.additionalInfo[].additionalIdTokenstringPflichtmaxLength 36
This field specifies the additional IdToken.
idTokenInfo.groupIdToken.additionalInfo[].typestringPflichtmaxLength 50
This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.
idTokenInfo.groupIdToken.idTokenstringPflichtmaxLength 36
IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.
idTokenInfo.groupIdToken.typestringPflichtenum: Central, eMAID, ISO14443, ISO15693, KeyCode, Local, MacAddress, NoAuthorization
Enumeration of possible idToken types.
idTokenInfo.language2stringmaxLength 8
ID_ Token. Language2. Language_ Code urn:x-oca:ocpp:uid:1:569375 Second preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
idTokenInfo.personalMessageobjectMessage_ Content urn:x-enexis:ecdm:uid:2:234490 Contains message details, for a message to be displayed on a Charging Station.
idTokenInfo.personalMessage.formatstringPflichtenum: ASCII, HTML, URI, UTF8
Message_ Content. Format. Message_ Format_ Code urn:x-enexis:ecdm:uid:1:570848 Format of the message.
idTokenInfo.personalMessage.languagestringmaxLength 8
Message_ Content. Language. Language_ Code urn:x-enexis:ecdm:uid:1:570849 Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
idTokenInfo.personalMessage.contentstringPflichtmaxLength 512
Message_ Content. Content. Message urn:x-enexis:ecdm:uid:1:570852 Message contents.
certificateStatusstringenum: Accepted, SignatureError, CertificateExpired, CertificateRevoked, NoCertificateAvailable, CertChainError, ContractCancelled
Certificate status information. - if all certificates are valid: return 'Accepted'. - if one of the certificates was revoked, return 'CertificateRevoked'.
JSON-Schema (Response)
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "comment": "OCPP 2.0.1 FINAL",
  "definitions": {
    "CustomDataType": {
      "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
      "javaType": "CustomData",
      "type": "object",
      "properties": {
        "vendorId": {
          "type": "string",
          "maxLength": 255
        }
      },
      "required": [
        "vendorId"
      ]
    },
    "AuthorizationStatusEnumType": {
      "description": "ID_ Token. Status. Authorization_ Status\r\nurn:x-oca:ocpp:uid:1:569372\r\nCurrent status of the ID Token.\r\n",
      "javaType": "AuthorizationStatusEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "Accepted",
        "Blocked",
        "ConcurrentTx",
        "Expired",
        "Invalid",
        "NoCredit",
        "NotAllowedTypeEVSE",
        "NotAtThisLocation",
        "NotAtThisTime",
        "Unknown"
      ]
    },
    "AuthorizeCertificateStatusEnumType": {
      "description": "Certificate status information. \r\n- if all certificates are valid: return 'Accepted'.\r\n- if one of the certificates was revoked, return 'CertificateRevoked'.\r\n",
      "javaType": "AuthorizeCertificateStatusEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "Accepted",
        "SignatureError",
        "CertificateExpired",
        "CertificateRevoked",
        "NoCertificateAvailable",
        "CertChainError",
        "ContractCancelled"
      ]
    },
    "IdTokenEnumType": {
      "description": "Enumeration of possible idToken types.\r\n",
      "javaType": "IdTokenEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "Central",
        "eMAID",
        "ISO14443",
        "ISO15693",
        "KeyCode",
        "Local",
        "MacAddress",
        "NoAuthorization"
      ]
    },
    "MessageFormatEnumType": {
      "description": "Message_ Content. Format. Message_ Format_ Code\r\nurn:x-enexis:ecdm:uid:1:570848\r\nFormat of the message.\r\n",
      "javaType": "MessageFormatEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "ASCII",
        "HTML",
        "URI",
        "UTF8"
      ]
    },
    "AdditionalInfoType": {
      "description": "Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.\r\n",
      "javaType": "AdditionalInfo",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "additionalIdToken": {
          "description": "This field specifies the additional IdToken.\r\n",
          "type": "string",
          "maxLength": 36
        },
        "type": {
          "description": "This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.\r\n",
          "type": "string",
          "maxLength": 50
        }
      },
      "required": [
        "additionalIdToken",
        "type"
      ]
    },
    "IdTokenInfoType": {
      "description": "ID_ Token\r\nurn:x-oca:ocpp:uid:2:233247\r\nContains status information about an identifier.\r\nIt is advised to not stop charging for a token that expires during charging, as ExpiryDate is only used for caching purposes. If ExpiryDate is not given, the status has no end date.\r\n",
      "javaType": "IdTokenInfo",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "status": {
          "$ref": "#/definitions/AuthorizationStatusEnumType"
        },
        "cacheExpiryDateTime": {
          "description": "ID_ Token. Expiry. Date_ Time\r\nurn:x-oca:ocpp:uid:1:569373\r\nDate and Time after which the token must be considered invalid.\r\n",
          "type": "string",
          "format": "date-time"
        },
        "chargingPriority": {
          "description": "Priority from a business point of view. Default priority is 0, The range is from -9 to 9. Higher values indicate a higher priority. The chargingPriority in &lt;&lt;transactioneventresponse,TransactionEventResponse&gt;&gt; overrules this one. \r\n",
          "type": "integer"
        },
        "language1": {
          "description": "ID_ Token. Language1. Language_ Code\r\nurn:x-oca:ocpp:uid:1:569374\r\nPreferred user interface language of identifier user. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.\r\n\r\n",
          "type": "string",
          "maxLength": 8
        },
        "evseId": {
          "description": "Only used when the IdToken is only valid for one or more specific EVSEs, not for the entire Charging Station.\r\n\r\n",
          "type": "array",
          "additionalItems": false,
          "items": {
            "type": "integer"
          },
          "minItems": 1
        },
        "groupIdToken": {
          "$ref": "#/definitions/IdTokenType"
        },
        "language2": {
          "description": "ID_ Token. Language2. Language_ Code\r\nurn:x-oca:ocpp:uid:1:569375\r\nSecond preferred user interface language of identifier user. Don’t use when language1 is omitted, has to be different from language1. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.\r\n",
          "type": "string",
          "maxLength": 8
        },
        "personalMessage": {
          "$ref": "#/definitions/MessageContentType"
        }
      },
      "required": [
        "status"
      ]
    },
    "IdTokenType": {
      "description": "Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.\r\n",
      "javaType": "IdToken",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "additionalInfo": {
          "type": "array",
          "additionalItems": false,
          "items": {
            "$ref": "#/definitions/AdditionalInfoType"
          },
          "minItems": 1
        },
        "idToken": {
          "description": "IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.\r\n",
          "type": "string",
          "maxLength": 36
        },
        "type": {
          "$ref": "#/definitions/IdTokenEnumType"
        }
      },
      "required": [
        "idToken",
        "type"
      ]
    },
    "MessageContentType": {
      "description": "Message_ Content\r\nurn:x-enexis:ecdm:uid:2:234490\r\nContains message details, for a message to be displayed on a Charging Station.\r\n\r\n",
      "javaType": "MessageContent",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "format": {
          "$ref": "#/definitions/MessageFormatEnumType"
        },
        "language": {
          "description": "Message_ Content. Language. Language_ Code\r\nurn:x-enexis:ecdm:uid:1:570849\r\nMessage language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.\r\n",
          "type": "string",
          "maxLength": 8
        },
        "content": {
          "description": "Message_ Content. Content. Message\r\nurn:x-enexis:ecdm:uid:1:570852\r\nMessage contents.\r\n\r\n",
          "type": "string",
          "maxLength": 512
        }
      },
      "required": [
        "format",
        "content"
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "customData": {
      "$ref": "#/definitions/CustomDataType"
    },
    "idTokenInfo": {
      "$ref": "#/definitions/IdTokenInfoType"
    },
    "certificateStatus": {
      "$ref": "#/definitions/AuthorizeCertificateStatusEnumType"
    }
  },
  "required": [
    "idTokenInfo"
  ]
}

Quelle: Open Charge Alliance, OCPP 2.0.1 – JSON-Schemas, unverändert wiedergegeben. © Open Charge Alliance. Lizenz: CC BY-ND 4.0. Die vollständige Spezifikation gibt es bei der Open Charge Alliance. ocpp-sim ist nicht mit der OCA verbunden.