Generate a basic authentication token to connect to the WNC.
- Generates Base64-encoded Basic Authentication tokens
- Secure password handling
- Compatible with all
wnc showcommands
wnc generate token [options...]| Flag | Alias | Type | Description | Required |
|---|---|---|---|---|
--username |
-u |
string | Username to generate Basic Authentication header | Yes |
--password |
-p |
string | Password to generate Basic Authentication header | Yes |
# Basic token generation
wnc generate token --username admin --password mypassword
# Store token in variable
TOKEN=$(wnc generate token --username admin --password mypassword)
echo "Generated token: $TOKEN"
# Use with abbreviated flags
wnc generate token -u admin -p mypassword❯ ./wnc generate token --username admin --password mypassword
YWRtaW46bXlwYXNzd29yZA==