dexctl - a Command Line Interface for Dex
dexctl
can be used both to perform CRUD operations on Dex
resources and to test the sign-on process and verify tokens and passwords.
git clone https://github.com/twoojoo/dexctl.git
cd dexctl
make install
A Dex
instance must be running. Dex
defaults match dexctl
ones:
- host: 127.0.0.1 (won't match "localhost")
- App port: 5555
- Dex web port: 5556
- Dex grpc port: 5557
help
flag available for every command
dexctl --help
dexctl version [--grpc-url <host:port>]
# gets Dex server version
dexctl signon <client_id> -s <client_secret> [--scope <scope1> --scope <scope2> --offine-access --browser <browser>]
# will open up a browser window (default browser is autodetected in X11)
dexctl token verify <client_id> <token>
dexctl client create <id> --name <name> [--secret <secret> --redirect-uri <uri> --grpc-url <host:port>]
dexctl client update <id> [--name <new-name> --grpc-url <host:port>]
dexctl client delete <id> [--grpc-url <host:port>]
dexctl password get <id> [--grpc-url <host:port>]
dexctl password list [--grpc-url <host:port>]
dexctl password create --email <email> --username <username> --hash <hash> [--grpc-url <host:port>]
dexctl password update <email> [--username <new-username> --hash <new-hash> --grpc-url <host:port>]
dexctl password delete <email> [--grpc-url <host:port>]
dexctl password verify <email> <password> [--grpc-url <host:port>]