auth_consumer_API

version 1.1.0AsyncAPI 3.0.0 content type application/jsonlicense Apache-2.0EVerestAuth

EVerest API definition for auth consumer

API for EVerest API clients that consume authorization events from an Auth module. Provides token validation status updates and the ability to withdraw previously granted authorizations.

Specification: auth_consumer_API.yaml · pionix:de:everest:auth_consumer_API

send the client publishes, EVerest consumes (3) receive EVerest publishes, the client consumes (4)

Servers

default mqtt

default local MQTT

Host
localhost:1883
Topic prefix
everest_api/1/auth_consumer/{module_id}
{module_id}

The ID of the module as defined in the EVerest config file.

Operations

Client to EVerest

send_request_withdraw_authorization

send Withdraw granted authorization.
Topic
everest_api/1/auth_consumer/{module_id}/m2e/withdraw_authorization
Reply
Sent to $message.header#/replyTo as receive_reply_withdraw_authorization.

If only the evse_id is given, the granted authorization for this EVSE will be withdrawn. If only the id_token is given, the granted authorization for every EVSE where this id_token is placed will be withdrawn. If both parameters are given, the granted authorization for the given EVSE will be withdrawn, if the placed id_token matches the given id_token If no parameter is given, all granted authorizations for all EVSEs will be removed

Message Withdraw granted authorization application/json

Message send_request_withdraw_authorization

Withdraw granted authorization.

Payload

object
  • headersobject
    • replyTostring

      Address to send the response to. Omit it to discard the response. An invalid address, see the EVerest API explanation, rejects the request.

      min length 1
  • payloadobject requiredWithdrawAuthorizationRequest

    Request to withdraw granted authorization. If only the evse_id is given, the granted authorization for this EVSE will be withdrawn. If only the id_token is given, the granted authorization for every EVSE where this id_token is placed will be withdrawn If both parameters are given, the granted authorization for the given EVSE will be withdrawn, if the placed id_token matches the given id_token. If no parameter is given, all granted authorizations for all EVSEs will be removed. If a transaction is running on an affected EVSE, it is stopped. A request that is not such an object, or whose evse_id is not an integer, is ignored with a log warning and withdraws nothing.

    Definition of WithdrawAuthorizationRequest

Example

Example 1
{
  "headers": {
    "replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
  },
  "payload": {
    "id_token": {
      "value": "string",
      "type": "Central"
    },
    "evse_id": 1
  }
}

send_request_get_token_validation_status

send Request current token validation status
Topic
everest_api/1/auth_consumer/{module_id}/m2e/token_validation_status/get
Reply
Sent to $message.header#/replyTo as receive_reply_get_token_validation_status.

Request the most recently published (latched) token validation status. The reply will be sent to the replyTo address specified in the message headers. If no latched value is available yet, a null payload will be sent.

Message Request current token validation status application/json

Message send_request_get_token_validation_status

Request the most recently published (latched) token validation status.

Payload

object
  • headersobject
    • replyTostring

      Address to send the response to. Omit it to discard the response. An invalid address, see the EVerest API explanation, rejects the request.

      min length 1

Example

Example 1
{
  "headers": {
    "replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
  }
}

send_communication_check

send Send communication check
Topic
everest_api/1/auth_consumer/{module_id}/m2e/communication_check
Message Send communication check application/json

Message send_communication_check

Signal to EVerest that communication is good or check shall be stopped

Payload

Send true at least every cfg_communication_check_to_s seconds to signal that the client is alive, otherwise EVerest raises a CommunicationFault, which the next message clears. Send false to stop the check until the module restarts.

Example

CommunicationCheck
true

EVerest to client

receive_reply_withdraw_authorization

receive Reply to withdraw authorization request
Topic
Dynamic: the replyTo address from the request's headers. Answers send_request_withdraw_authorization.
Message Reply to request to withdraw authorization application/json

Message receive_reply_withdraw_authorization

Reply to request to withdraw authorization.

Payload

The result of a WithdrawAuthorizationRequest: Accepted in case requested authorization was removed AuthorizationNotFound in case no match for request was found EvseNotFound in case no match for evse_id was found Rejected in case module could not process the request for other reasons

enumAcceptedAuthorizationNotFoundEvseNotFoundRejected

Example

Example 1
"Accepted"

receive_token_validation_status

receive Receive token validation status message
Topic
everest_api/1/auth_consumer/{module_id}/e2m/token_validation_status

Published whenever the validation status of a token changes. The message contains the token, its validation status, and an optional array of tariff messages received at authorization time.

Message Receive token validation status message application/json

Message receive_token_validation_status

Token validation status, optionally with tariff messages

Example

Minimal payload generated from the schema generated
{
  "token": {
    "id_token": {
      "value": "string",
      "type": "Central"
    },
    "authorization_type": "OCPP"
  },
  "status": "Processing"
}

receive_reply_get_token_validation_status

receive Reply to get token validation status request
Topic
Dynamic: the replyTo address from the request's headers. Answers send_request_get_token_validation_status.
Message Reply to get token validation status request application/json

Message receive_reply_get_token_validation_status

The most recently published token validation status.

Payload

oneOf

Exactly one of:

Example

Minimal payload generated from the schema generated
{
  "token": {
    "id_token": {
      "value": "string",
      "type": "Central"
    },
    "authorization_type": "OCPP"
  },
  "status": "Processing"
}

receive_heartbeat

receive Receive heartbeat
Topic
everest_api/1/auth_consumer/{module_id}/e2m/heartbeat
Message Receive heartbeat application/json

Message receive_heartbeat

Heartbeat produced by EVerest as configured via cfg_heartbeat_interval_ms in the EVerest configuration

Payload

integer HeartBeatId

64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached

Example

Heartbeat
42

Messages

MessageSummaryUsed by
send_request_withdraw_authorization
Withdraw granted authorization

Withdraw granted authorization.

send_request_withdraw_authorization
receive_reply_withdraw_authorization
Reply to request to withdraw authorization

Reply to request to withdraw authorization.

receive_reply_withdraw_authorization
receive_token_validation_status
Receive token validation status message

Token validation status, optionally with tariff messages

receive_token_validation_status
send_request_get_token_validation_status
Request current token validation status

Request the most recently published (latched) token validation status.

send_request_get_token_validation_status
receive_reply_get_token_validation_status
Reply to get token validation status request

The most recently published token validation status.

receive_reply_get_token_validation_status
receive_heartbeat
Receive heartbeat

Heartbeat produced by EVerest as configured via cfg_heartbeat_interval_ms in the EVerest configuration

receive_heartbeat
send_communication_check
Send communication check

Signal to EVerest that communication is good or check shall be stopped

send_communication_check

Schemas

AuthorizationType string
string

Type of authorization of the provided token. The value of AuthorizationType can influence the authorization process

enumOCPPRFIDAutochargePlugAndChargeBankCard
CertificateHashDataInfo object
object

Contains the certificate information

Additional properties allowed.

  • hashAlgorithmstring required

    Used algorithms for the hashes provided

    enumSHA256SHA384SHA512
  • issuerNameHashstring required

    Hashed value of the Issuer Distinguished Name

    max length 128
  • issuerKeyHashstring required

    Hashed value of the issuers public key

    max length 128
  • serialNumberstring required

    The serial number of the certificate

    max length 40
  • responderURLstring required

    This contains the responder URL

    max length 512
CustomIdToken object
object

Type for a custom id token with a free-form type

Additional properties allowed.

  • valuestring required

    Arbitrary value of the IdToken

    min length 0max length 36
  • typestring required

    Custom type of the token

    min length 0max length 50
IdToken object
object

Type for an id token

Additional properties allowed.

  • valuestring required

    Arbitrary value of the IdToken: This has to be printable case insensitive ascii

    min length 0max length 36
  • typestring requiredIdTokenType

    Type of the token

    enumCentraleMAIDMacAddressISO14443ISO15693KeyCodeLocalNoAuthorization
  • additional_infoarray<object>

    A list of additional custom id tokens than can be used for providing additional information for validation

IdTokenType string
string

IdTokenType of the provided token. Required by OCPP2.0.1 to distinguish between different types of tokens.

enumCentraleMAIDMacAddressISO14443ISO15693KeyCodeLocalNoAuthorization
ProvidedIdToken object
object

Type for IdToken provided by auth token providers. Contains additional information about the IdToken like the source and purpose

Additional properties allowed.

  • request_idinteger

    Id of the authorization request of this token. Could be used to put remoteStartId of OCPP2.0.1

  • id_tokenobject requiredIdToken

    IdToken of the provided token

    Definition of IdToken

  • parent_id_tokenobject IdToken

    Parent IdToken of the provided token

    Definition of IdToken

  • authorization_typestring requiredAuthorizationType

    Authorization type of the token.

    enumOCPPRFIDAutochargePlugAndChargeBankCard
    min length 2max length 32
  • connectorsarray<integer>

    A list of connector ids to which the authorization can be assigned

    • itemsinteger
      min 1
  • prevalidatedboolean

    Indicates that the id token is already validated by the provider

  • certificatestring

    The X.509 certificated presented by EV and encoded in PEM format

    max length 5500
  • iso15118CertificateHashDataarray<object>

    Contains the information needed to verify the EV Contract Certificate via OCSP

    min items 1max items 4
TokenValidationStatus string
string

Ongoing token validation status

  • Processing: Validation is in progress
  • Accepted: Token has been accepted
  • Rejected: Token has been rejected
  • TimedOut: Token was authorized but no connector was selected within connection_timeout seconds
  • UsedToStart: Token was used to start a charging session
  • UsedToStop: Token was used to stop a charging session
  • Withdrawn: Authorization was withdrawn
  • UsedToReauthorize: Token (or its parent id token) matched an ongoing transaction, but stopping the transaction on a renewed token presentation is disabled by configuration, so the transaction was not stopped. Can be used e.g. to allow the user to stop the transaction manually via a display.
enumProcessingAcceptedRejectedTimedOutUsedToStartUsedToStopWithdrawnUsedToReauthorize
TokenValidationStatusMessage object
object

The token validation status

Additional properties allowed.

  • tokenobject requiredProvidedIdToken

    The id tag assigned to this transaction

    Definition of ProvidedIdToken

  • statusstring requiredTokenValidationStatus

    Ongoing token validation status

    • Processing: Validation is in progress
    • Accepted: Token has been accepted
    • Rejected: Token has been rejected
    • TimedOut: Token was authorized but no connector was selected within connection_timeout seconds
    • UsedToStart: Token was used to start a charging session
    • UsedToStop: Token was used to stop a charging session
    • Withdrawn: Authorization was withdrawn
    • UsedToReauthorize: Token (or its parent id token) matched an ongoing transaction, but stopping the transaction on a renewed token presentation is disabled by configuration, so the transaction was not stopped. Can be used e.g. to allow the user to stop the transaction manually via a display.
    enumProcessingAcceptedRejectedTimedOutUsedToStartUsedToStopWithdrawnUsedToReauthorize
  • messagesarray<object>

    Optional tariff or pricing messages received with the authorization response.

WithdrawAuthorizationRequest object
object

Request to withdraw granted authorization. If only the evse_id is given, the granted authorization for this EVSE will be withdrawn. If only the id_token is given, the granted authorization for every EVSE where this id_token is placed will be withdrawn If both parameters are given, the granted authorization for the given EVSE will be withdrawn, if the placed id_token matches the given id_token. If no parameter is given, all granted authorizations for all EVSEs will be removed. If a transaction is running on an affected EVSE, it is stopped. A request that is not such an object, or whose evse_id is not an integer, is ignored with a log warning and withdraws nothing.

Additional properties allowed.

  • evse_idinteger

    The evse id to withdraw authorization for.

  • id_tokenobject IdToken

    The id token to withdraw authorization for.

    Definition of IdToken

WithdrawAuthorizationResult string
string

The result of a WithdrawAuthorizationRequest: Accepted in case requested authorization was removed AuthorizationNotFound in case no match for request was found EvseNotFound in case no match for evse_id was found Rejected in case module could not process the request for other reasons

enumAcceptedAuthorizationNotFoundEvseNotFoundRejected
CommunicationCheck boolean
boolean

Send true at least every cfg_communication_check_to_s seconds to signal that the client is alive, otherwise EVerest raises a CommunicationFault, which the next message clears. Send false to stop the check until the module restarts.

HeartBeatId integer
integer

64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached

Schemas from other APIs

MessageContent object defined in display_message_API.yaml ↗
object

Contains message details

Additional properties allowed.

  • formatstring MessageFormat ↗

    Format of the message to be displayed

    enumASCIIHTMLURIUTF8QRCODE
  • languagestring
  • contentstring required