Skip to content

Instantly share code, notes, and snippets.

@liemle3893
Last active July 21, 2021 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liemle3893/7516055b005a668862ce198ea8e5d557 to your computer and use it in GitHub Desktop.
Save liemle3893/7516055b005a668862ce198ea8e5d557 to your computer and use it in GitHub Desktop.
Ory hydra common client's commands

Hydra

Version: v1.10.2

Create

hydra clients create   \
 --endpoint http://127.0.0.1:4445     \
 --id 111111    \
 --secret 123456    \
 --grant-types authorization_code,refresh_token    \
 --response-types code,id_token    \
 --logo-uri https://i.picsum.photos/id/870/64/64.jpg?grayscale&hmac=IqMDNJ2b6ofqN_tyBH3QUQcEjkM8ALmuRkHWHVNUz4c    \
 --name “Hello there”     \
 --scope openid    \
 --callbacks http://127.0.0.1:5555/callback   \
 --token-endpoint-auth-method none

Patch a client

curl -s -XPATCH http://127.0.0.1:4445/clients/111111 \
-H 'Content-type: application/json' \
-d '[{"from":"","op":"replace","path":"/client_name","value":"A new name"}]'

Update a client

hydra clients update 111111 \
--endpoint http://127.0.0.1:4445     \
--grant-types authorization_code,refresh_token    \
--response-types code,id_token    \
--logo-uri https://i.picsum.photos/id/1048/54/54.jpg?hmac=oGKNUoPwpz9dATLwAy5Np0pr3XiEmJ9uPujSl6MJ4LM    \
--name "Name version 3"    \
--scope openid,offline    \
--callbacks http://127.0.0.1:5555/callback,http://127.0.0.1:5556/callback    \
--token-endpoint-auth-method none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment