Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create clients using the CLI #911

Closed
LouisTrezzini opened this issue Jun 24, 2018 · 1 comment
Closed

Can't create clients using the CLI #911

LouisTrezzini opened this issue Jun 24, 2018 · 1 comment

Comments

@LouisTrezzini
Copy link

LouisTrezzini commented Jun 24, 2018

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
Hydra fails to create clients using the CLI

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

docker-compose run --rm hydra clients create \
  --id subjects:security-console-ui \
  --is-public \
  --scope "openid,offline,hydra.*,oathkeeper.rules.*" \
  --response-types id_token,code \
  --grant-types refresh_token,authorization_code \
  --callbacks https://console.ory.am/auth/callback
Command failed because error "Post //%2Fclients/clients: unsupported protocol scheme """ occurred.

Works using the API:

http POST localhost:4444/clients id=test-public-client client_name='Public Test Client' public:='true' scope:='"openid,offline,profile"' grant_types:='["authorization_code","refresh_token"]' response_types:='["token","code","id_token"]' redirect_uris:='["http://127.0.0.1:9010/callback"]'
HTTP/1.1 201 Created
Content-Length: 373
Content-Type: application/json
Date: Sun, 24 Jun 2018 14:22:34 GMT
Location: /clients/test-public-client
Vary: Origin

{
    "client_name": "Public Test Client",
    "client_secret_expires_at": 0,
    "client_uri": "",
    "contacts": null,
    "grant_types": [
        "authorization_code",
        "refresh_token"
    ],
    "id": "test-public-client",
    "logo_uri": "",
    "owner": "",
    "policy_uri": "",
    "public": true,
    "redirect_uris": [
        "http://127.0.0.1:9010/callback"
    ],
    "response_types": [
        "token",
        "code",
        "id_token"
    ],
    "scope": "openid,offline,profile",
    "tos_uri": ""
}

What is the expected behavior?
Should create the client

Which version of the software is affected?
Hydra v1.0.0-beta.4

@aeneasr
Copy link
Member

aeneasr commented Jun 24, 2018

You are missing the --endpoint flag:

hydra help clients create

[...]
    --endpoint string        Set the URL where ORY Hydra is hosted, defaults to environment variable HYDRA_URL
[...]

Should probably throw an error though if it's not defined.

@aeneasr aeneasr closed this as completed Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants