From dec5d906578ca2544b7f201c9e96236459490a96 Mon Sep 17 00:00:00 2001 From: Pavel Strashkin Date: Wed, 18 May 2016 18:18:20 -0700 Subject: [PATCH] examples: add sample for clients Adds consistency to existing samples for users, connectors, etc., as well as protects users from accidental changes to files under Git, which is why there are samples after all. --- .gitignore | 1 + Documentation/dev-guide.md | 3 ++- examples/README.md | 3 ++- static/fixtures/{clients.json => clients.json.sample} | 0 4 files changed, 5 insertions(+), 2 deletions(-) rename static/fixtures/{clients.json => clients.json.sample} (100%) diff --git a/.gitignore b/.gitignore index bd233269..cd79d1cd 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ coverage/ deploy/ Godeps/_workspace/src/github.com/coreos/dex static/fixtures/env.txt +static/fixtures/clients.json static/fixtures/connectors.json static/fixtures/users.json static/fixtures/emailer.json diff --git a/Documentation/dev-guide.md b/Documentation/dev-guide.md index 73bef095..9ae0213a 100644 --- a/Documentation/dev-guide.md +++ b/Documentation/dev-guide.md @@ -4,11 +4,12 @@ When you are working on dex it's convenient to use the `--no-db` flag. This starts up dex in a mode which uses an in-memory datastore for persistence. It also does not rotate keys, so no overlord is required. -In this mode you provide the binary with paths to files for connectors, users, and emailer. There are example files you can use inside of `static/fixtures` named *"connectors.json.sample"*, *"users.json.sample"*, and *"emailer.json.sample"*, respectively. +In this mode you provide the binary with paths to files for clients, connectors, users, and emailer. There are example files you can use inside of `static/fixtures` named *"clients.json.sample"*, *"connectors.json.sample"*, *"users.json.sample"*, and *"emailer.json.sample"*, respectively. You can rename these to the equivalent without the *".sample"* suffix since the defaults point to those locations: ```console +cp static/fixtures/clients.json.sample static/fixtures/clients.json cp static/fixtures/connectors.json.sample static/fixtures/connectors.json cp static/fixtures/users.json.sample static/fixtures/users.json cp static/fixtures/emailer.json.sample static/fixtures/emailer.json diff --git a/examples/README.md b/examples/README.md index 467804ba..947ec5b6 100644 --- a/examples/README.md +++ b/examples/README.md @@ -14,6 +14,7 @@ Now copy the example configurations into place to get dex configured. You can customize these later but the defaults should work fine. ```console +cp static/fixtures/clients.json.sample static/fixtures/clients.json cp static/fixtures/connectors.json.sample static/fixtures/connectors.json cp static/fixtures/users.json.sample static/fixtures/users.json cp static/fixtures/emailer.json.sample static/fixtures/emailer.json @@ -27,7 +28,7 @@ With `dex-worker` configuration in place we can start dex in local mode. ## Example Webapp Client -Build and run the example app webserver by pointing the discovery URL to local Dex, and +Build and run the example app webserver by pointing the discovery URL to local Dex, and supplying the client information from `./static/fixtures/clients.json` into the flags. ```console diff --git a/static/fixtures/clients.json b/static/fixtures/clients.json.sample similarity index 100% rename from static/fixtures/clients.json rename to static/fixtures/clients.json.sample