A dummy OIDC Provider for development / test purposes.
1.6K
A dummy OIDC Provider which simply logs in the user and provides the configured claims on the resulting token for development / test purposes.
docker run -p 3000:3000 \
-e CLIENT_ID=your-client-id \
-e CLIENT_SECRET=your-client-secret \
-e REDIRECT_URIS=http://localhost:8080/callback \
iammind/dummy-oidc-provider
All configuration is done via environment variables. See .env.example for all available options.
| Variable | Description | Default |
|---|---|---|
PORT | Server port | 3000 |
ISSUER | OIDC issuer URL | http://localhost:3000 |
CLIENT_ID | OAuth client ID | dummy-client |
CLIENT_SECRET | OAuth client secret | dummy-secret |
REDIRECT_URIS | Comma-separated redirect URIs | http://localhost:3000/callback |
| Variable | Description | Default |
|---|---|---|
DEFAULT_USER_SUB | Default user subject ID | test-user-123 |
DEFAULT_USER_EMAIL | Default user email | [email protected] |
DEFAULT_USER_NAME | Default user name | Test User |
JWKS | Static JWKS JSON string | Auto-generated |
GET /health
Returns the health status of the service.
Response:
{
"status": "ok",
"timestamp": "2024-01-01T00:00:00.000Z",
"service": "dummy-oidc-provider"
}
POST /_setup/user
Content-Type: application/json
{
"sub": "test-user-456",
"email": "[email protected]",
"email_verified": true,
"name": "New Test User",
"custom_claim": "custom_value"
}
Updates the test user claims that will be returned in ID tokens. The sub claim is required.
Response:
{
"success": true,
"user": {
"sub": "test-user-456",
"email": "[email protected]",
"email_verified": true,
"name": "New Test User",
"custom_claim": "custom_value"
}
}
Standard OIDC endpoints are available:
GET /.well-known/openid-configuration - Discovery documentGET /jwks - JSON Web Key SetGET /auth - Authorization endpointPOST /token - Token endpointPOST /introspection - Token introspectionPOST /revocation - Token revocationSet up your OIDC client with:
http://localhost:3000CLIENT_ID env varCLIENT_SECRET env varREDIRECT_URIS env varBefore testing, you can update the test user claims:
curl -X POST http://localhost:3000/_setup/user \
-H "Content-Type: application/json" \
-d '{
"sub": "user-123",
"email": "[email protected]",
"name": "Test User",
"roles": ["admin", "user"]
}'
Redirect users to the authorization endpoint. The provider will automatically authenticate them with the configured test user.
Content type
Image
Digest
sha256:59bfe03b8…
Size
57.4 MB
Last updated
5 months ago
docker pull iammind/dummy-oidc-provider