From 06e8e0008b623de03b0fb858605de383aea0551f Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 May 2026 10:28:29 +0800 Subject: [PATCH 1/2] docs: add ac whoami command reference --- .../ac/developer-command-reference.md | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/en/ui/cli_tools/ac/developer-command-reference.md b/docs/en/ui/cli_tools/ac/developer-command-reference.md index a83251b8b..6ab426e42 100644 --- a/docs/en/ui/cli_tools/ac/developer-command-reference.md +++ b/docs/en/ui/cli_tools/ac/developer-command-reference.md @@ -2000,4 +2000,24 @@ ac wait --for=create secret/busybox1 --timeout=30s # Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command ac delete pod/busybox1 ac wait --for=delete pod/busybox1 --timeout=60s -``` \ No newline at end of file +``` + +## ac whoami + +Show information about the current session + +### Example usage + +```bash +# Display the currently authenticated user +ac whoami + +# Print the current user context name +ac whoami -c + +# Print the current server's REST API URL +ac whoami --show-server + +# Print the token the current session is using +ac whoami -t +``` From b3e2345ec6c5b34c6aae8e5cb9b9c1dea8aeedc1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 May 2026 10:42:53 +0800 Subject: [PATCH 2/2] docs: add token sensitivity caution for ac whoami --- docs/en/ui/cli_tools/ac/developer-command-reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/ui/cli_tools/ac/developer-command-reference.md b/docs/en/ui/cli_tools/ac/developer-command-reference.md index 6ab426e42..8d0b4ff5b 100644 --- a/docs/en/ui/cli_tools/ac/developer-command-reference.md +++ b/docs/en/ui/cli_tools/ac/developer-command-reference.md @@ -2020,4 +2020,5 @@ ac whoami --show-server # Print the token the current session is using ac whoami -t +# Caution: the token printed by ac whoami -t is sensitive; do not expose it in logs, shell history, screenshots, or shared output. ```