dex/examples
Yifan Gu f1fb00efdd Merge pull request #92 from yifan-gu/ssl
dex-worker: add TLS support.
2015-08-31 10:41:13 -07:00
..
app examples: also print raw token in the result. 2015-08-29 01:42:21 -07:00
cli *: move original project to dex 2015-08-18 11:26:57 -07:00
emailtester *: move original project to dex 2015-08-18 11:26:57 -07:00
tls-setup Documentation: add serity_guide.md to show how to establish TLS. 2015-08-29 01:42:21 -07:00
README.md examples/static: various changes to fix examples 2015-08-28 12:43:07 -07:00

Running Examples

The quickest way to start experimenting with dex is to run a single dex-worker locally, with an in-process database, and then interacting with it using the example programs in this directory.

Build Everything and Start dex-worker

This section is required for both the Example App and the Example CLI.

  1. Build everything:

    ./build
    
  2. Copy the various example configurations.

    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
    
  3. Run dex_worker in local mode.

    ./bin/dex-worker --no-db &
    

Example App

  1. Build and run example app webserver, pointing the discovery URL to local Dex, and supplying the client information from ./static/fixtures/clients.json into the flags.

    ./bin/example-app --client-id=XXX --client-secret=secrete --discovery=http://127.0.0.1:5556 &
    
  2. Navigate browser to http://localhost:5555 and click "login" link

  3. Click "Login with Local"

  4. Enter in sample credentials from static/fixtures/connectors.json:

    email: elroy77@example.com
    password: bones
    
  5. Observe user information in example app.

Example CLI

TODO