auth

Prev Next

Available in Classic and VPC

Output the environment variables used for authentication in a format that can be used directly in the shell.

Syntax

The auth syntax is as follows:

swift auth

Options

auth does not support sub-options; values required for authentication must be specified as common options.
For information about the options common to all swift subcommands, see Archive Storage options.

Examples

If the authentication request is successful, the export command will be displayed, setting the storage URL and authentication token as environment variables.

Command

The command example is as follows:

swift --os-auth-url https://kr.archive.ncloudstorage.com:5000/v3 --auth-version 3 \
    --os-username {access_key_id} --os-password {secret_key} \
    --os-user-domain-id {domain_id} --os-project-id {project_id} \
    auth

Output

The output example is as follows:

export OS_STORAGE_URL=https://kr.archive.ncloudstorage.com/v1/AUTH_a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d
export OS_AUTH_TOKEN=<token-redacted>

Once you run the export command that was displayed, you can use OS_STORAGE_URL and OS_AUTH_TOKEN in subsequent requests without having to re-authenticate.