Skip to content

Commit

Permalink
autogen(docs): generate cli docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ory-bot committed Aug 3, 2023
1 parent 09de179 commit 04cd161
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-create-jwk.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hydra create jwk <set-id> [<key-id>] [flags]
### Examples

```
{{ .CommandPath }} <my-jwk-set> --alg RS256 --use sig
hydra create jwk <my-jwk-set> --alg RS256 --use sig
```

### Options
Expand Down
6 changes: 3 additions & 3 deletions docs/hydra/cli/hydra-create-oauth2-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ the Authorize Code, Implicit, Refresh flow. This command allows settings all fie

To encrypt an auto-generated OAuth2 Client Secret, use flags `--pgp-key`, `--pgp-key-url` or `--keybase` flag, for example:

{{ .CommandPath }} -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
hydra create oauth2-client -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username


```
Expand All @@ -30,11 +30,11 @@ hydra create oauth2-client [flags]
### Examples

```
{{ .CommandPath }} -n "my app" -c http://localhost/cb -g authorization_code -r code -a core,foobar
hydra create oauth2-client -n "my app" -c http://localhost/cb -g authorization_code -r code -a core,foobar
Use the tool jq (or any other JSON tool) to get the OAuth2 Client ID and and Secret:
client=$({{ .CommandPath }} \
client=$(hydra create oauth2-client \
--format json \
...)
echo $client
Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-delete-access-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hydra delete access-tokens <client-id> [flags]
### Examples

```
{{ .CommandPath }} <client-id>
hydra delete access-tokens <client-id>
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-delete-jwk.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ hydra delete jwk <id-1> [<id-2> ...] [flags]
### Examples

```
{{ .CommandPath }} <set-1> <set-2> <set-3>
hydra delete jwk <set-1> <set-2> <set-3>
```

### Options
Expand Down
4 changes: 2 additions & 2 deletions docs/hydra/cli/hydra-delete-oauth2-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ hydra delete oauth2-client <id-1> [<id-2> ...] [flags]
### Examples

```
{{ .CommandPath }} <client-1> <client-2> <client-3>
hydra delete oauth2-client <client-1> <client-2> <client-3>
To delete OAuth 2.0 Clients with the owner of "[email protected]", run:
{{ .CommandPath }} $({{ .Root.Name }} list oauth2-clients --format json | jq -r 'map(select(.contacts[] == "[email protected]")) | .[].client_id')
hydra delete oauth2-client $(hydra list oauth2-clients --format json | jq -r 'map(select(.contacts[] == "[email protected]")) | .[].client_id')
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-get-jwk.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hydra get jwk set-1 [set-2] ... [flags]
```
To get the JSON Web Key Set's secret, run:
{{ .CommandPath }} <set-id> | jq -r '.[].use'
hydra get jwk <set-id> | jq -r '.[].use'
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-get-oauth2-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hydra get oauth2-client <id-1> [<id-2> ...] [flags]
```
To get the OAuth 2.0 Client's secret, run:
{{ .CommandPath }} <your-client-id> --format json | jq -r '.client_secret'
hydra get oauth2-client <your-client-id> --format json | jq -r '.client_secret'
```

### Options
Expand Down
4 changes: 2 additions & 2 deletions docs/hydra/cli/hydra-import-jwk.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ hydra import jwk set-id file-1 [file-2] [file-n] [flags]
### Examples

```
{{ .CommandPath }} my-set ./path/to/jwk.json ./path/to/jwk-2.json --format json
{{ .CommandPath }} my-set ./path/to/rsa.key ./path/to/rsa.pub --use enc
hydra import jwk my-set ./path/to/jwk.json ./path/to/jwk-2.json --format json
hydra import jwk my-set ./path/to/rsa.key ./path/to/rsa.pub --use enc
```

### Options
Expand Down
6 changes: 3 additions & 3 deletions docs/hydra/cli/hydra-import-oauth2-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Import an example OAuth2 Client:
]
EOF
{{ .CommandPath }} file.json
hydra import oauth2-client file.json
Alternatively:
cat file.json | {{ .CommandPath }}
cat file.json | hydra import oauth2-client
To encrypt an auto-generated OAuth2 Client Secret, use flags `--pgp-key`, `--pgp-key-url` or `--keybase` flag, for example:
{{ .CommandPath }} -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
hydra import oauth2-client -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
```

Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-introspect-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hydra introspect token the-token [flags]
### Examples

```
{{ .CommandPath }} AYjcyMzY3ZDhiNmJkNTY --project 32197be3-8e57-4009-becd-9d38dbde129c
hydra introspect token AYjcyMzY3ZDhiNmJkNTY --project 32197be3-8e57-4009-becd-9d38dbde129c
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-list-oauth2-clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ hydra list oauth2-clients [flags]
### Examples

```
{{ .CommandPath }} --page-token eyJwYWdlIjoxfQ --page-size 10
hydra list oauth2-clients --page-token eyJwYWdlIjoxfQ --page-size 10
```

### Options
Expand Down
2 changes: 2 additions & 0 deletions docs/hydra/cli/hydra-migrate-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ hydra migrate status [flags]

```
--block Block until all migrations have been applied
--format string Set the output format. One of table, json, yaml, json-pretty, jsonpath and jsonpointer. (default "default")
-h, --help help for status
-q, --quiet Be quiet with output printing.
-e, --read-from-env If set, reads the database connection string from the environment variable DSN or config file key dsn.
```

Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-perform-authorization-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ hydra perform authorization-code [flags]
### Examples

```
{{ .CommandPath }} --client-id ... --client-secret ...
hydra perform authorization-code --client-id ... --client-secret ...
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-perform-client-credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hydra perform client-credentials [flags]
### Examples

```
{{ .CommandPath }} --client-id ... --client-secret
hydra perform client-credentials --client-id ... --client-secret
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion docs/hydra/cli/hydra-revoke-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hydra revoke token the-token [flags]
### Examples

```
{{ .CommandPath }} --client-id a0184d6c-b313-4e70-a0b9-905b581e9218 --client-secret Hh1BjioNNm ciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNT
hydra revoke token --client-id a0184d6c-b313-4e70-a0b9-905b581e9218 --client-secret Hh1BjioNNm ciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNT
```

### Options
Expand Down
4 changes: 2 additions & 2 deletions docs/hydra/cli/hydra-update-oauth2-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ hydra update oauth2-client [id] [flags]
### Examples

```
{{ .CommandPath }} <client-id-here> -c http://localhost/cb -g authorization_code -r code -a core,foobar
hydra update oauth2-client <client-id-here> -c http://localhost/cb -g authorization_code -r code -a core,foobar
To encrypt an auto-generated OAuth2 Client Secret, use flags `--pgp-key`, `--pgp-key-url` or `--keybase` flag, for example:
{{ .CommandPath }} e6e96aa5-9cd2-4a70-bf56-ad6434c8aaa2 -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
hydra update oauth2-client e6e96aa5-9cd2-4a70-bf56-ad6434c8aaa2 -n "my app" -g client_credentials -r token -a core,foobar --keybase keybase_username
```

Expand Down

0 comments on commit 04cd161

Please sign in to comment.