jwkserve-cli-0.7.6 is not a library.
JWKServe CLI
A fake authentication service to speed up local development for JWT consumers.
This HTTP server provides several endpoints for JWT development:
GET /- Health check and service statusGET /.well-known/openid-configuration- OpenID Connect discoveryGET /.well-known/jwks.json- JSON Web Key SetPOST /sign- Generate JWT tokens
Also available as sbstjn/jwkserve on DockerHub for easy usage. See jwkserve for the library; contribution is possible via sbstjn/jwkserve on GitHub.
Installation
Quick Start
# Start the service
# In another terminal, test the endpoints
Token Generation
When having jwkserve running, you can generate a JWT with matching signature using curl e.g.
}
Note: If the
issfield is not set in your request, it will be automatically added matching theWEB_ISSUERenvironment variable.
Configuration
You can configure the service using environment variables:
APP_HOST- HTTP listener host (default:0.0.0.0)APP_PORT- HTTP listener port (default:3000)KEY_FILE- Path to existing PKCS8 private key file (optional)WEB_ISSUER- HTTP address for issuer (default:http://${APP_HOST}:${APP_PORT})
On start, the binary will generate a random 2048-bit RSA private key if no KEY_FILE is provided.
# Basic usage
# With custom host and existing key