Skip to content

divbase-cli auth

Login/logout of DivBase server. To register, visit https://divbase.scilifelab-2-prod.sys.kth.se.

Usage:

$ divbase-cli auth [OPTIONS] COMMAND [ARGS]...

Options:

  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • login: Log in to the DivBase server.
  • logout: Log out of the DivBase server.
  • add-pat: Add a personal access token (PAT) to your...
  • rm-pat: Remove the stored personal access token...
  • pat-info: Display information about the personal...
  • whoami: Return information about the currently...

divbase-cli auth login

Log in to the DivBase server.

You'll be prompted for your password after running the command.

Usage:

$ divbase-cli auth login [OPTIONS] EMAIL

Arguments:

  • EMAIL: [required]

Options:

  • --divbase-url TEXT: DivBase server URL to connect to. [default: https://divbase.scilifelab-2-prod.sys.kth.se/api]
  • -f, --force: Force login again even if already logged in
  • --help: Show this message and exit.

divbase-cli auth logout

Log out of the DivBase server.

Removes your locally stored credentials and invalidates the server-side refresh token.

Usage:

$ divbase-cli auth logout [OPTIONS]

Options:

  • --help: Show this message and exit.

divbase-cli auth add-pat

Add a personal access token (PAT) to your device for authentication with DivBase.

PATs are used for authenticating with the DivBase API instead of using your password, and are recommended for use in scripts and pipelines. See https://scilifelabdatacentre.github.io/divbase/user-guides/using-divbase-programmatically/ for more details on how to create a personal access token. You can only store one personal access token at a time.

Usage:

$ divbase-cli auth add-pat [OPTIONS] NAME

Arguments:

  • NAME: Name of the personal access token (PAT). E.g. 'work-laptop-pat' [required]

Options:

  • -e, --expires INTEGER RANGE: When the personal access token (PAT) expires (if it does), as a unix timestamp. [x>=1]
  • -o, --overwrite-existing: Overwrite the existing stored PAT if one already exists.
  • --help: Show this message and exit.

divbase-cli auth rm-pat

Remove the stored personal access token from your device.

If no such token exists the command will still succeed.

Usage:

$ divbase-cli auth rm-pat [OPTIONS]

Options:

  • --help: Show this message and exit.

divbase-cli auth pat-info

Display information about the personal access token stored on this device, if any.

The token will not be displayed for security reasons, but the name and expiry time will be shown.

Usage:

$ divbase-cli auth pat-info [OPTIONS]

Options:

  • --help: Show this message and exit.

divbase-cli auth whoami

Return information about the currently logged-in user.

Usage:

$ divbase-cli auth whoami [OPTIONS]

Options:

  • --help: Show this message and exit.