Skip to content

Share CLI command - auth

share auth

Login, logout & manage your Vendia account.

Table of Contents

Commands

Manage authorization & set current Vendia user

Usage

Terminal window
share auth <subcommand>
Sub commanddescription
auth loginLogin to Vendia user account
auth logoutLogout of Vendia user account
auth roleManage roles for users
auth role deleteDelete roles for users
auth role getGet role information
auth role listList roles for user
auth role setSet Roles for user
auth switchSwitch active Vendia account
auth whoamiDisplay active Vendia account

Examples

Terminal window
Login to Vendia
share login
# Login to new account
share login --new
# Login programmatically
share login --email your@email.com --password *******
Logout of Vendia
share logout
# Logout of all accounts
share logout --all
Switch user accounts
share auth switch
share auth switch --email xyz@abc.com
Show current user
share auth whoami

auth login

Login to Vendia user account

Usage

Terminal window
share auth login

Flags

  • new (boolean) - Login to new Vendia account
  • email (option) - User email
  • password (option) - User password

Examples

Terminal window
share login
# Login to new account
share login --new
# Login programmatically
share login --email your@email.com --password *******

auth logout

Logout of Vendia user account

Usage

Terminal window
share auth logout

Flags

  • all (boolean) - Logout of all accounts on this machine

Examples

Terminal window
share logout
# Logout of all accounts
share logout --all

auth role

Manage roles for users

See https://docs.vendia.com/rbac

Usage

Terminal window
share auth role <SubCommand>

Examples

Terminal window
List user roles
# Get all roles for current user
share auth role list
# Get all details about user
share auth role list --user email@email.com
# Return role details as json
share auth role list --json
Get user role details
share auth role get <RoleName>
# Return role details as json
share auth role get <RoleName> --json
Set user roles
share auth role set ./policy.json
share auth role set '{ name: "my-role", "capabilities": [...] }'
share auth role set ./policy.json --user email@email.com
share auth role set ./policy.json --user email@email.com --as-role my-admin-role
Delete user roles
share auth role delete <RoleName>
share auth role delete <RoleName> --user email@email.com
share auth role delete <RoleName> --user email@email.com --as-role my-admin-role

auth role delete

Delete roles for users

Usage

Terminal window
share auth role delete

Arguments

  • roleName - undefined

Flags

  • as-role (option) - Role name to use for the operation
  • user (option) - User email

Examples

Terminal window
share auth role delete <RoleName>
share auth role delete <RoleName> --user email@email.com
share auth role delete <RoleName> --user email@email.com --as-role my-admin-role

auth role get

Get role information

Usage

Terminal window
share auth role get

Arguments

  • roleName - undefined

Flags

  • user (option) - User email

Examples

Terminal window
share auth role get <RoleName>
# Return role details as json
share auth role get <RoleName> --json

auth role list

List roles for user

Usage

Terminal window
share auth role list

Flags

  • user (option) - User email

Examples

Terminal window
# Get all roles for current user
share auth role list
# Get all details about user
share auth role list --user email@email.com
# Return role details as json
share auth role list --json

auth role set

Set Roles for user

See https://docs.vendia.com/rbac/ for additional information

Usage

Terminal window
share auth role set

Arguments

  • roleName - undefined

Flags

  • policy (option) - Policy document
  • as-role (option) - Role name to use for the operation
  • user (option) - User email

Examples

Terminal window
share auth role set ./policy.json
share auth role set '{ name: "my-role", "capabilities": [...] }'
share auth role set ./policy.json --user email@email.com
share auth role set ./policy.json --user email@email.com --as-role my-admin-role

auth switch

Switch active Vendia account

Usage

Terminal window
share auth switch

Flags

  • email (option) - User email

Examples

Terminal window
share auth switch
share auth switch --email xyz@abc.com

auth whoami

Display active Vendia account

Usage

Terminal window
share auth whoami

Examples

Terminal window
share auth whoami