A simple mock OIDC (OpenID Connect) server written in Go. It primarily serves a JWKS (JSON Web Key Set) endpoint and an OpenID configuration endpoint for testing purposes.
-
Clone the repository:
git clone [https://github.com/opengovern/mock-dex.git](https://github.com/opengovern/mock-dex.git) cd mock-dex
-
Build the Docker image:
docker build -t mock-dex .
-
Run the Docker container:
docker run -p 5556:5556 mock-dex
This will start the server and map port 5556 on your local machine to the container's port 5556.
Once the container is running, the following endpoints are available:
-
JWKS Endpoint:
http://localhost:5556/keys
- Provides the public keys used for signing tokens (in JWK Set format).
- Test with:
curl http://localhost:5556/keys
-
OpenID Configuration:
http://localhost:5556/.well-known/openid-configuration
- Provides metadata about the mock OIDC provider, including the JWKS URI.
- Test with:
curl http://localhost:5556/.well-known/openid-configuration
Press Ctrl+C
in the terminal where the docker run
command is executing.