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

CLI: Login improvements #1884

Open
halender opened this issue Feb 1, 2022 · 2 comments
Open

CLI: Login improvements #1884

halender opened this issue Feb 1, 2022 · 2 comments
Assignees
Milestone

Comments

@halender
Copy link
Contributor

halender commented Feb 1, 2022

Some improvements:

1. Login help menu does not show --password as required

Login --password option is required. Autogenerated CLI check this properly but Login help menu does NOT show --password as an option.

cafetero@swdev:~$ ./opencga-client-2.2.0-SNAPSHOT/bin/opencga.sh users login -u [USER] <<< TO_BE_CHANGED
ERROR: The following option is required: [-p | --password]

Usage:   opencga.sh users login [options]

Options:
            -h, --help		Print this help  [false]
                --host	STRING	Use this server host instead of the default one in the client configuration 
       -L, --log-level	STRING	One of the following: 'error', 'warn', 'info', 'debug', 'trace' [info] 
           --no-header		Not include headers in the output (not applicable to json output-format)
                               [false]
    --out-format, --OF	STRING	Output format. one of {JSON, JSON_PRETTY, TEXT, YAML}  [TEXT]
       --refresh-token	STRING	The body web service refreshToken parameter 
           *-u, --user	STRING	User id, this must be unique in OpenCGA 

2. Login only lets input the password interactively. Does not let redirect with <<< neither with echo

@halender halender added the bug label Feb 1, 2022
@halender halender changed the title CLI: Login help menu does not show --password as required CLI: Login improvements Feb 1, 2022
@halender halender added this to the v2.2.0 milestone Feb 1, 2022
@juanfeSanahuja juanfeSanahuja reopened this Feb 3, 2022
@pamag
Copy link
Member

pamag commented Feb 10, 2022

Reviewed

version: opencga-client-2.2.0-SNAPSHOT_testing2.tar.gz

  • pasword as rediretion <<<'and echo | works!
  • user with hyphen
  • user with -u still does not work
    image

@juanfeSanahuja
Copy link
Member

juanfeSanahuja commented Feb 10, 2022

For user authentication we have two ways to do it:

  • "Users login" which works the same way as the rest of the commands on the CLI.
Usage:   opencga.sh users login [options]

Options:
            -h, --help		Print this help  [false]
                --host	STRING	Use this server host instead of the default one in the client configuration 
       -L, --log-level	STRING	One of the following: 'error', 'warn', 'info', 'debug', 'trace' [info] 
           --no-header		Not include headers in the output (not applicable to json output-format)
                               [false]
    --out-format, --OF	STRING	Output format. one of {JSON, JSON_PRETTY, TEXT, YAML}  [TEXT]
       *-p, --password		User password 
       --refresh-token	STRING	The body web service refreshToken parameter 
           *-u, --user	STRING	User id, this must be unique in OpenCGA 
  • "login" is a shortcut to the users command and requires no options or subcommands. If after login we put the name of the user, it only asks for the password, otherwise it asks for both. No needs -u or -p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants