Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Homogeneize script alignment (#327)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
  • Loading branch information
sarroutbi authored Jul 23, 2024
1 parent 63e3c00 commit b3e2d53
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tools/api_tools/show_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,22 @@ test -z "${oc_client}" && oc_client="oc"
getAdvURL() {
if [ "${using_minikube}" != "yes" ];
then
"${oc_client}" -n "${namespace}" get tangservers.daemons.redhat.com -o json | jq '.items[0].status.serviceExternalURL' | tr -d '"'
"${oc_client}" -n "${namespace}" get tangservers.daemons.redhat.com -o json | \
jq '.items[0].status.serviceExternalURL' | tr -d '"'
else
port=$("${oc_client}" -n "${namespace}" get service -o json | jq '.items[0].spec.ports[0].nodePort')
echo "http://$(minikube ip):${port}/adv"
port=$("${oc_client}" -n "${namespace}" get service -o json | jq '.items[0].spec.ports[0].nodePort')
echo "http://$(minikube ip):${port}/adv"
fi
}

adv_url=$(getAdvURL)
adv=$(wget -O - "${adv_url}" -o /dev/null)

dumpFromAdvWithHash() {
local adv="$1"
local hash="$2"
jose fmt --json "${adv}" -g payload -y -o- | jose jwk use -i- -r -u verify -o- \
| jose jwk thp -i- -a "${hash}"
local adv="$1"
local hash="$2"
jose fmt --json "${adv}" -g payload -y -o- | jose jwk use -i- -r -u verify -o- \
| jose jwk thp -i- -a "${hash}"
}

echo "===ADV (URL:${adv_url})==="
Expand Down

0 comments on commit b3e2d53

Please sign in to comment.