Client-gateway
Client-Gateway
The Client-Gateway is a pre-built Node.js service designed to simplify the On-Demand implementation. It acts as an intermediary between the SDK Client and the client's infrastructure, managing operations like credential creation, import, revoke, and verification.
Prerequisites
On-Demand Configuration:
Access the dashboard of your account on our API platform.
Enable the "On-Demand" mode.
Configure the necessary webhook URLs or set the Client-Gateway mode.
Generate the following keys:
API_KEY
: For secure communication between your infrastructure and our API.CLIENT_SECRET
: For internal authentication within your infrastructure.
Install Docker:
Ensure Docker is installed on the server where the Gateway will run.
How to Get Started
Clone or Download the Client-Gateway:
Clone the repository or download the source code from GitHub:
git clone https://github.com/your-repo/client-gateway.git cd client-gateway
Or Pull the Pre-built Docker Image:
Pull the official Docker image directly from our registry:
docker pull your-registry/client-gateway:latest
Run the Gateway with Docker:
Configure the environment variables and start the container:
docker run -d -p 8080:8080 \ -e API_BASE_URL=https://api.example.com \ -e API_KEY=your-api-key \ -e CLIENT_SECRET=your-client-secret \ your-registry/client-gateway:latest
Test the Gateway:
Once the container is running, test the endpoints:
curl -X POST http://localhost:8080/create \ -H "Authorization: Bearer your-client-secret" \ -H "Content-Type: application/json" \ -d '{"name": "test_credential", "type": "temporary"}'
Available Endpoints
The Client-Gateway exposes the following endpoints:
Endpoint
HTTP Method
Description
/create
POST
Create a new credential.
/importBulk
POST
Import an existing credential.
/revoke
POST
Revoke an existing credential.
/verify
POST
Verify the validity of a credential.
The gateway will also communicate with the central API to log operations and ensure auditability.
Last updated