# Cryptography

## Introduction

This document provides comprehensive guidance on integrating Automate with JWT (JSON Web Token) to facilitate secure data transmission and authentication.

Automate is a versatile hyper-automation platform, empowering users to automate processes seamlessly, whether in the Cloud or On-Premises. By leveraging its extensive library of ready-to-use actions, Automate enables users to streamline workflows and enhance productivity.

## What is JWT?

JWT, or JSON Web Token, is a compact, URL-safe means of representing claims to be transferred between two parties. It is commonly used for authentication and information exchange in web services.

**Key Features:**

* <mark style="color:orange;">Secure data transmission</mark>
* <mark style="color:orange;">Simplified authentication mechanism</mark>
* <mark style="color:orange;">Compact and versatile token format</mark>

## Automate Integration with JWT

**Overview of Integration:** Automate integrates seamlessly with JWT to facilitate secure authentication and data exchange between systems. This integration enhances the reliability and efficiency of data transmission processes.

**Examples of Automated Tasks:**

* User authentication and authorization
* Secure API communication
* Token-based access control

## Using the Integration

### Credentials

**How to Create Credentials:** Establish a secure connection between Automate and JWT by following these steps:

1. Generate a JWT token with the necessary claims.
2. Configure Automate to use the generated token for authentication.
3. Verify the JWT token on the receiving end to ensure secure communication.

### Data Management

**Using Data Manager:** Organize and manage data fields within the Automate-JWT integration through the following steps:

1. Define the data to be included in the JWT payload.
2. Map the data fields between Automate and JWT for seamless integration.
3. Ensure data consistency and integrity during transmission.

## How To Use Action

<figure><img src="/files/5K75au2pTNjFNLAftSdj" alt=""><figcaption></figcaption></figure>

### JWT Encode

{% embed url="<https://drive.google.com/file/d/1ht4SrkmmBi4sa_yim7Y4PEKyFsAMsD9B/view?usp=sharing>" %}

**Description:** JWT Encode action encodes data into a JSON Web Token (JWT) format.

**Purpose:** This action is utilized to securely encode sensitive information for transmission between systems.

**Usage:**

1. Select the desired JWT Algorithm for encoding.
2. Provide the HMAC Secret for encoding.
3. Specify the Payload data to be included in the JWT.
4. Set the expiration time for the token.
5. Assign the generated token to a variable within Automate.

**Inputs:**

* <mark style="color:green;">JWT Algorithm</mark>
* <mark style="color:green;">HMAC Secret</mark>
* <mark style="color:green;">Payload</mark>
* <mark style="color:green;">Expires in</mark>

**Outputs:** Generated JWT token

### JWT Decode

{% embed url="<https://drive.google.com/file/d/1mup0QpXJIssQQjLCCwTMMj6DNCbzuz3Y/view?usp=sharing>" %}

**Description:** JWT Decode action decodes a JSON Web Token (JWT) into its original data format.

**Purpose:** This action is employed to extract and utilize data from a JWT received from external sources.

**Usage:**

1. Choose the JWT Algorithm used for encoding.
2. Provide the HMAC Secret used for encoding.
3. Input the JWT Token for decoding.
4. Assign the decoded value to a variable within Automate.

**Inputs:**

* <mark style="color:green;">JWT Algorithm</mark>
* <mark style="color:green;">HMAC Secret</mark>
* <mark style="color:green;">JWT Token</mark>

**Outputs:** Decoded value from the JWT

***

## Additional Tips

### [**Use Cases**](/userguide/use-cases.md)

### [FAQ](/userguide/faq.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autommate.com/userguide/libraries/transform/cryptography.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
