CLI application that handled federated authentication for Mercurial users
Example implementation that this repository creates. The HTTPS access proxy and the HGWeb setup can be started with
docker compose (make compose-run
)
Make sure you have the access proxy somewhat setup with an OpenID Connect Client, f.e.:
Add a file in docker/local.env
which contain something like:
discovery_url=https://auth.mozilla.auth0.com/.well-known/openid-configuration
client_id=WhSYI0qGKdtrB63gBjsdgN2qy69e79x8
https_redirect=false
backend=http://hgweb:8000
And then:
$ make docker-build
$ make compose-run
By default it will listen on http://localhost:8000, with the port exposed, a default test repo and no SSL (DO NOT USE THIS FOR ANYTHING ELSE THAN LOCAL TESTING)
$ hg clone http://localhost:8000/test
$ cd test
$ touch test
$ hg add test
$ hg commit test
$ hg push http://localhost:8000/test
pushing to http://localhost:8000/test
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files