docs.rs failed to build jwkserve-cli-0.6.8
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
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 SetGET /protocol/openid-connect/certs- 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_ISSUERenvionment 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