Forked from https://github.com/appvia/mock-oidc-user-server
WARNING: DO NOT USE IN PRODUCTION |
---|
A mock user server providing OpenID Connect (OIDC) flows for development and testing.
Uses the excellent node-oidc-provider, which comes with dev interactions/flows out of the box (OIDC compliant). Any username and password combination is permitted for logging in, making this very useful for development and CI.
Using implicit grant flow with "id_token token" request type, and returns a {sub:id, name:id} in the id_token and user_info endpoints.
Example usage via Docker Compose:
version: '3.7'
services:
mock_user_service:
image: gridsuite/gridsuite-oidc-mock-server:v0.0.1
environment:
- PORT=9090
- CLIENT_ID=my-client
- CLIENT_REDIRECT_URI=http://localhost:8080/cb
- CLIENT_LOGOUT_REDIRECT_URI=http://localhost:8080
ports:
- 9090:9090
Behind a reverse proxy at http://myhost/myprefix/.well-known/openid-configuration
- HOST=myhost
- prefix=/myprefix
To add a second redirect_uri (optional), useful for silent renews, use:
- CLIENT_SILENT_REDIRECT_URI=http://localhost:8080/renewcb
To add more clients (optional) use:
- CLIENT_COUNT=2
- CLIENT_ID_2=my-client_2
- CLIENT_REDIRECT_URI_2=http://localhost:8081/cb
- CLIENT_LOGOUT_REDIRECT_URI_2=http://localhost:8081
- CLIENT_SILENT_REDIRECT_URI_2=http://localhost:8081/renewcb
To specify emails domain (optional) use:
Prerequisites:
- NodeJS (v10.15.0+)
- npm
To install dependencies:
npm install
To build the Docker image locally:
docker build -t gridsuite-oidc-mock-server .