🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

github.com/skiphead/web-token-server

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/skiphead/web-token-server

v0.0.0-20220619182332-cd976df6b13d
Source
Go
Version published
Created
Source

About the Web-token-server

This is a simple microservice for generating tokens and checking their validity.

How to build and run?

cd project folder:

Edited config file ./config/server.json 
(listen port, expired live token (sec), TLS on/off, pki cert and key files )

go build ./cmd/main.go
 
main(windows main.exe) --config-path="/path-config/server.json"
 
default settings http://127.0.0.1:8080, expireted  live after 600 sec

How to use?

Documentation http://localhost:8080/docs

New generate token

  • Request POST: /new

    { "name": string }

  • Response POST:

    { "token": string }

Check valid token

  • Request POST: /check

    { "token": string }

  • Response POST:

    { "valid": bool }

Info token

  • Request POST: /info

    { "token": string }

  • Response POST:

    { "token": string, "name": string }

Upload docker image

 docker pull skiphead/web-token-server:latest

Stable work on GoLang 1.8.3

FAQs

Package last updated on 19 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts