> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/authentication/signed-jwt-tokens.md).

# Signed JWT Tokens

The response to authentication will be signed JWT tokens. Once you validate and decode them you get data that is shown in the following examples.

### OTP&#x20;

The JWT payload will include the provisioned credential id and session identifier.

```json
{
  "exp": 1703577870,
  "nbf": 1703577570,
  "iat": 1703577570,
  "auth_time": 1703577570,
  "jti": "f4fefc31-6d69-40b8-a0be-683359c9e9d7",
  "iss": "https://{environment-url}/realms/{partner-id}",
  "sub": "10d712a2-66b2-4979-92ba-b09f04d303bd",
  "typ": "Bearer",
  "azp": "api",
  "session_state": "4da1b517-6491-448a-9edf-efe8ad0d1668",
  "scope": "",
  "sid": "4da1b517-6491-448a-9edf-efe8ad0d1668",
  "session_identifier": "WSqNfqbYgTg",
  "type": "otp",
  "credential_id": "64707473-47ff-4dae-977d-0e16eabc2150"
}
```

**Parameters**

* **`sid` :** Transaction ID for the purpose of reconciliation.
* **`session_identifier`**: A unique identifier for this particular session or operation.
* **`type`**: The type of operation performed, which in this context is "otp".
* **`credential_id`**: The credential id provisioned for the user for the future authentications

### Password

```json
{
  "exp": 1703064194,
  "nbf": 1703063894,
  "iat": 1703063894,
  "auth_time": 1703063894,
  "jti": "6873b8fc-4e03-4ad3-9d51-ed33d6360656",
  "iss": "https://keycloak.auth-stage.vida.id/realms/springboot-quickstart",
  "sub": "d2b3b78b-2ba5-4420-a6f8-601a82a4efb4",
  "typ": "Bearer",
  "azp": "api",
  "session_state": "15f241c1-2942-4be7-97ea-ae1e4df58b36",
  "scope": "",
  "sid": "15f241c1-2942-4be7-97ea-ae1e4df58b36",
  "session_identifier": "DYuSX_GjhLs",
  "type": "password",
  "credential_id": "9f954a2b-f010-4aee-8170-388bb30e0e88"
}
```

**Parameters**

* **`sid` :** Transaction ID for the purpose of reconciliation.
* **`session_identifier`**: A unique identifier for this particular session or operation.
* **`type`**: The type of operation performed, which in this context is "password".
* **`credential_id`**: The credential id provisioned for the user for the future authentications

### Face Match&#x20;

The JWT payload is similar to Face Authentication. However, additional attributes like mobile, kyc\_event\_id, and email are not available in Face Match. A session\_identifier attribute is included in the JWT token which can be used to correlate the JWT received as there is no credential ID available in case of Face Match.&#x20;

```json
{
  "exp": 1701321050,
  "nbf": 1701320750,
  "iat": 1701320750,
  "auth_time": 1701320750,
  "jti": "3f6606b5-5816-415f-8ea9-b56818a13b8d",
  "iss": "https://{environment-url}/realms/{partner-id}",
  "sub": "ee5ef62f-fc97-4d2b-be7e-439d6337b876",
  "typ": "Bearer",
  "azp": "api",
  "session_state": "887360ba-8fd8-4c19-b49a-89cf1c3ec8b6",
  "scope": "",
  "sid": "887360ba-8fd8-4c19-b49a-89cf1c3ec8b6",
  "template_url": "https://app-springboot.auth-stage.vida.id/template/download?template=1978937890",
  "faceMatchMessage": "Selfie photo does not match with reference photo",
  "faceMatchScore": "0.9",
  "livelinessScore": "0.94",
  "imgManipulationScore": "0.315634",
  "session_identifier": "j3grnfL8_0g",
  "type": "FaceMatch",
  "livelinessCode": "1043",
  "livelinessMessage": "Selfie photo is a live photo"
}
```

**Parameters**

* **`sid` :** Transaction ID for the purpose of reconciliation.
* **`template_url`**: A URL to a the image generated by partner for face match.
* **`faceMatchMessage`**: A message describing the result of a face match operation, in this case indicating that a selfie photo does not match the reference photo.
* **`faceMatchScore`**: A score representing the result of the face match.
* **`livelinessScore`**: A score representing the result of a liveliness detection operation, assessing if a selfie photo is of a live person.
* **`session_identifier`**: A unique identifier for this particular session or operation.
* **`type`**: The type of operation performed, which in this context is "FaceMatch".
* **`livelinessCode`**`:` The liveness code `1043` denotes the selfie is live and genuine.
* **`livelinessMessage`**: A message indicating the result of the liveliness check.
* **`imgManipulationScore`**: Image Manipulation score will be on the basis of image manipulation detection. This is an optional feature and the parameter will be in the response only if it's enabled for the partner.

### Selfie ID&#x20;

The JWT payload includes attributes like kyc\_event\_id, livelinessTranscationId and verification scores. A session\_identifier attribute is included in the JWT token which can be used to correlate the JWT received as there is no credential ID available in case of Selfie ID.&#x20;

```json
{
  "exp": 1703581975,
  "nbf": 1703581675,
  "iat": 1703581675,
  "auth_time": 1703581675,
  "jti": "40873836-dd40-4245-b760-48f81a4f388f",
  "iss": "https://{environment-url}/realms/{partner-id}",
  "sub": "ecabc23a-ba8e-47de-b7a7-bd9ddf3e0171",
  "typ": "Bearer",
  "azp": "api",
  "session_state": "efc6c88b-a22d-4eaf-82cc-9840ebc3e004",
  "scope": "",
  "sid": "efc6c88b-a22d-4eaf-82cc-9840ebc3e004",
  "kyc_event_id": "829c837f-5bac-48af-a5bd-349951cc3648",
  "livelinessTranscationId": "20200694-3bc8-4889-9123-c6926d090daa",
  "faceMatchMessage": "Selfie photo matches with reference photo",
  "faceMatchScore": "1.0",
  "livelinessScore": "0.006376",
  "imgManipulationScore": "0.315634",
  "mobile": "829c837f-5bac-48af-a5bd-349951cc3648",
  "session_identifier": "IbgpbGi-wic",
  "type": "FaceID",
  "livelinessCode": "1043",
  "livelinessMessage": "Selfie photo is a live photo",
  "faceMatchTranscationId": "d14b1e71-457c-497c-8011-7400fbf15b5c",
  "credential_id": "bbdcb284-a64c-4c0c-889c-c100e0956fff"
}
```

**Parameters**

* **`sid` :** Transaction ID for the purpose of reconciliation.
* **`faceMatchMessage`:** Result message of the face match operation, indicating if the selfie matches the reference photo.
* **`faceMatchScore`:** Score representing the result of the face match operation (1.0 indicates a perfect match).
* **`livelinessScore`:** Score representing the result of liveliness detection, assessing if the selfie is of a live person.
* **`session_identifier`:** Unique identifier for the session or operation.
* **`type`:** Type of operation performed, here it is "FaceID."
* **`livelinessCode`:** Liveness code (1043 denotes a live and genuine selfie).
* **`livelinessMessage`:** Message indicating the result of the liveliness check (e.g., "Selfie photo is a live photo").
* **`kyc_event_id`:** KYC event ID associated with the transaction.
* **`livelinessTranscationId`:** Transaction ID specific to the liveliness detection.
* **`mobile`:** Mobile number associated with the KYC event.
* **`faceMatchTranscationId`:** Transaction ID specific to the face match operation.
* **`credential_id`:** Credential ID associated with the transaction.
* **`imgManipulationScore`**: Image Manipulation score will be on the basis of image manipulation detection. This is an optional feature and the parameter will be in the response only if it's enabled for the partner.
