Skip to content

Commit

Permalink
Fix kcadm-wrapper to check proper value for credential expiration (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock authored Nov 20, 2024
1 parent 46e5a0d commit b4f3c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/kcadm-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# shellcheck source=/dev/null
. /opt/keycloak/conf/kcadm-wrapper.conf

EXPIRES=$(/usr/bin/sed -n -r 's|.*"refreshExpiresAt" : ([0-9]*).*|\1|p' "$CONFIG" 2>/dev/null || echo "0")
EXPIRES=$(/usr/bin/sed -n -r 's|.*"expiresAt" : ([0-9]*).*|\1|p' "$CONFIG" 2>/dev/null || echo "0")
NOW=$(/usr/bin/date +%s%3N)

if [ ! -f "$CONFIG" ] || [ "$EXPIRES" -lt "$NOW" ]; then
Expand Down

0 comments on commit b4f3c6e

Please sign in to comment.