Files
threshold/internal/tests/cli/boundary/_auth_tokens.bash
T
429247f407 [COMPLIANCE] Update Copyright Headers (#6282)
* [COMPLIANCE] Update Copyright and License Headers

* chore: make gen to generate files with copyright headers

* chore: update missed copyright headers

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Justin Nguyen <justin.nguyen@hashicorp.com>
2026-01-28 11:05:07 -06:00

42 lines
727 B
Bash

# Copyright IBM Corp. 2020, 2025
# SPDX-License-Identifier: BUSL-1.1
function read_token() {
if [[ "x$1" == "x" ]]
then
echo "y" | boundary auth-tokens read
else
boundary auth-tokens read -id $1 -format json
fi
}
function delete_token() {
if [[ "x$1" == "x" ]]
then
echo "y" | boundary auth-tokens delete
else
boundary auth-tokens delete -id $1
fi
}
function token_id() {
local tid=$1
strip $(read_token $tid | jq '.item.id')
}
function logout_cmd() {
boundary logout
}
function get_token() {
boundary config get-token
}
function read_token_no_keyring() {
boundary auth-tokens read -keyring-type=none -id $1
}
function list_tokens() {
boundary auth-tokens list -format json
}