Skip to content

EgZjaHJvb/Vaultlet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Vaultlet

Solution for your API key needs!
Built in Go, cloud-ready, easy to integrate. Just clone & self-host.


Important

📌 WorkFlow & Much more

Note

⚙️ Populate the .env file with your credentials.


🚀 Installation

Requirements

# Clone into your server or any microservice host
git clone https://github.com/t7abhay/Vaultlet
cd Vaultlet
cp .env_sample .env
# Docker installation
docker build -t vaultlet-app .
docker run --rm --env-file .env -p 9098:9098 vaultlet-app

📘 Documentation

🔑 API Key Generation

POST /api/v1/gen-apikey HTTP/1.1
Content-Type: application/json

{
  "user_id": "some_user_id",     // UUID required
  "duration": 12                 // Optional, in hours. If not set, API key will not expire
}

Response

HTTP/1.1 200 OK
{
  "success": true,
  "message": "API key created",
  "apiKey": "your_generated_api_key"
}

✅ API Key Validation

POST /api/v1/validate-apikey HTTP/1.1
Content-Type: application/json

{
  "user_id": "some_user_id",     // UUID required
  "api_key": "your_api_key"
}

Response

HTTP/1.1 200 OK
{
  "success": true,
  "message": "Valid"
}

📊 Response Code Summary

Code Meaning
201 API key created successfully
200 API key validated
500 Service failed to validate/create API key
401 Invalid API key
402 No API key found
400 Invalid/Malformed request (Bad Request)

About

Simple Api Management micorservice

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors