Authentication commands (Windows)

Use authentication commands to log in to the ASoC service.

appscan api_login

Syntax:

appscan api_login -P <key_secret> -u <key_id> -persist

Description:

Log in to the ASoC service on Cloud Marketplace using a generated API key.

Important: The api_login command is used for logging in from the CLI to the ASoC service on Cloud Marketplace only.

When you log in to the service, an encrypted key file that is named cli.token is saved to the .appscan folder of your home directory. This token file is then referred to by other commands and actions when they interact with the ASoC service. This token file expires 2 hours after it is created. After it expires, you will need to log in to the service again to continue with further commands or actions - or you can include the -persist option when logging in. When this option is used, the Command Line Utility will automatically attempt to reauthenticate to the service when the token expires.

Required options:

  • -P: Specify -P <key_secret>, where <key_secret> is the Key Secret that was created when you generated an API key.
  • -u: Specify -u <key_id>, where <key_id> is the Key Id that was created when you generated an API key.

Optional flags/settings:

  • -persist: Automatically attempt to reauthenticate to the service when the login token file expires.
Tip: For all commands, options can be used in any order.

appscan scx_login

Note: This command is supported, however, it is recommended that you use the appscan api_login command instead.

Syntax:

appscan scx_login -P <password> -u <user_name> -persist

Description:

Log in to the ASoC service on HCL Cloud Marketplace with your ASoC credentials.

Important: The scx_login command is used for logging in from the CLI to the ASoC service on Cloud Marketplace only.

When you log in to the service, an encrypted key file that is named cli.token is saved to the .appscan folder of your home directory. This token file is then referred to by other commands and actions when they interact with the ASoC service. This token file expires 2 hours after it is created. After it expires, you will need to log in to the service again to continue with further commands or actions - or you can include the -persist option when logging in. When this option is used, the Command Line Utility will automatically attempt to reauthenticate to the service when the token expires.

Required options:

  • -P: Specify -P <password>, where <password> is the password that you specified when you registered for the ASoC service.
  • -u: Specify -u <user_name>, where <user_name> is the email address that you specified when you registered for the ASoC service.

Optional flags/settings:

  • -persist: Automatically attempt to reauthenticate to the service when the login token file expires.
Tip: For all commands, options can be used in any order.

appscan login

Syntax:

appscan login -P <password> -u <user_name> -persist

Description:

Log in to the ASoC service on Bluemix®.

Important: The login command is used for logging in from the CLI to the ASoC service on Bluemix® only. To log in to the ASoC service on Cloud Marketplace, use the scx_login or api_login command.

When you log in to the service, an encrypted key file that is named cli.token is saved to the .appscan folder of your home directory. This token file is then referred to by other commands and actions when they interact with the ASoC service. This token file expires 2 hours after it is created. After it expires, you will need to log in to the service again to continue with further commands or actions - or you can include the -persist option when logging in. When this option is used, the Command Line Utility will automatically attempt to reauthenticate to the service when the token expires.

Required options:

  • -P: Specify -P <password>, where <password> is the password indicated in the service credentials.
  • -u: Specify -u <user_name>, where <user_name> is binding ID indicated in the service credentials.

To determine the Bluemix® service credentials, select Service Credentials in the left navigation pane of the service Dashboard.

Optional flags/settings:

  • -persist: Automatically attempt to reauthenticate to the service when the login token file expires.
Tip: For all commands, options can be used in any order.

Examples:

To log in to the cloud with a binding ID of 123-mybindingid-456 with a password of 123-mypassword-456, issue this command:

appscan login -P 123-mypassword-456 -u 123-mybindingid-456