https://github.com/lumarans30/astralsafeserver
AstralSafe server with Node.js
https://github.com/lumarans30/astralsafeserver
aes cryptography expressjs nodejs quantum-randomness
Last synced: about 2 months ago
JSON representation
AstralSafe server with Node.js
- Host: GitHub
- URL: https://github.com/lumarans30/astralsafeserver
- Owner: LuMarans30
- License: mit
- Created: 2023-01-27T13:36:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-15T14:07:48.000Z (over 3 years ago)
- Last Synced: 2025-03-18T01:16:06.689Z (over 1 year ago)
- Topics: aes, cryptography, expressjs, nodejs, quantum-randomness
- Language: JavaScript
- Homepage: https://lumarans30.github.io/AstralSafeServer/
- Size: 34.2 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# AstralSafeServer






A basic web server for AstralSafe license generation and validation using Node.js and Express.js.
The license is generated using AES and a quantum random key.
A simple client made with .NET MAUI can be found [here](https://www.github.com/LuMarans30/AstralSafeClient/)
## Docs
A better version of the API documentation using [Swagger](https://swagger.io/) is available at https://lumarans30.github.io/AstralSafeServer/ or at http://localhost:8080/docs.
By running the server locally, you can test API requests with custom attributes via Swagger.
## Usage
You can send a POST HTTP request to the following endpoints of http://localhost:8080 with the params:
{"uid": ""} or {"uid": "", "license": ""}.
- /api/keygen
- /api/validate-license
## Example
curl -X POST -d '{""uid"": ""xxxx-xxxx-xxxx-xxxx""}' -H "Content-Type: application/json" http://localhost:8080/api/keygen
output: {"key": "string", "license":"string"}
curl -X POST -d '{""uid"": ""xxxx-xxxx-xxxx-xxxx"", ""license"": ""string""}' -H "Content-Type: application/json" http://localhost:8080/api/validate-license
if the license is valid, the output will be: {"key": "string"}
else the output will be: {"valid": "false"}
## Website
To check if the server is running, you can go to http://localhost:8080/.
## Client generation
Using the OpenApi documents in the swagger.yaml file in the dist directory, it is possible to automatically generate a client or server for different programming languages by importing the file into the [Swagger Editor](https://editor.swagger.io/).