Skip to content

Authorization Docs CLI

Allan Kerr edited this page Feb 4, 2018 · 2 revisions

Command Line Interface

The authorization and identity service provides a private developer command line interface. This allows developers to:

  • Create new OAuth2 clients
  • Add scopes to existing OAuth2 clients
  • Add scopes to existing users

Commands

After installing Express on a Kubernetes client, the command line interface can be accessed using the authorization-cli.sh script in the /bin directory.

1. Create Client

New clients can be created using the client create command. The only required arguments are the client identifier and client secret. An optional flag may be added to make the client public.

Example:
  ./authorization-cli.sh client create test_id test_secret --public

Usage:
  client create <id> <secret> [flags]

Flags:
      --public   Add to create a public client

2. Client Add Scope

Scopes can be added to clients using the client scope add command. This command requires the client identifier and the scope to be added. For a scope to be granted when a token is requested both the client and user must possess the scope.

Example:
  ./authorization-cli.sh client scope add test_id admin

Usage:
  client scope add <id> <scope>

3. User Add Scope

Scopes can be added to users using the user scope add command. This command requires the username and the scope to be added. User accounts must first be created using the registration HTTP endpoint. For a scope to be granted when a token is requested both the client and user must possess the scope.

Example:
  ./authorization-cli.sh user scope add admin_username admin

Usage:
  user scope add <username> <scope>

Clone this wiki locally