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

ztoken confuses commandline parameters #49

Open
ZroMnc opened this issue Mar 22, 2017 · 0 comments
Open

ztoken confuses commandline parameters #49

ZroMnc opened this issue Mar 22, 2017 · 0 comments

Comments

@ZroMnc
Copy link

ZroMnc commented Mar 22, 2017

Why playing around with the sandbox I notice a bug:

cviola@terminus $ ztoken token -h
Usage: ztoken token [OPTIONS]

  Create a new Platform IAM token or use an existing one.

Options:
  -n, --name TOKEN_NAME           Custom token name (will be stored)
  -a, --authorize-url AUTH_URL    OAuth 2 Authorization Endpoint URL to                                  generate access token
  -c, --client-id CLIENT_ID       Client ID to use
  -p, --business-partner-id PARTNER_ID
                                  Business Partner ID to use
  -r, --refresh                   Force refresh of the access token
  -h, --help                      Show this message and exit.

So I wanted to use a different business partner.

Note the Business Partner parameter is used as client id 😕

cviola@terminus $ ztoken token -n sandbox -a https://sandbox.identity.zalando.com/oauth2/authorize -p foobar
Invalid URL 'client-id': No schema supplied. Perhaps you meant http://client-id?
Your browser has been opened to visit:

        https://sandbox.identity.zalando.com/oauth2/authorize?business_partner_id=<already configured BP is used>&client_id=foobar&redirect_uri=http://localhost:8081&response_type=token

^C
Aborted!

Strangely enough if you use right parameter -c the same thing happens but it runs home to mama and takes the default values from the config.

cviola@terminus $ ztoken token -n sandbox -a https://sandbox.identity.zalando.com/oauth2/authorize -c blahh
Invalid URL 'blahh': No schema supplied. Perhaps you meant http://blahh?
Your browser has been opened to visit:

        https://sandbox.identity.zalando.com/oauth2/authorize?business_partner_id=<already configured BP is used>&client_id=<default>&redirect_uri=http://localhost:8081&response_type=token

^C
Aborted!
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

1 participant