Created
November 29, 2016 14:19
Revisions
-
novotnyr created this gist
Nov 29, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ #!/bin/sh COMMAND="$1" REDIS_CLI="redis-cli" case "$COMMAND" in list) "$REDIS_CLI" keys 'spring:session:sessions:[a-f0-9][a-f0-9]*' ;; hkeys) if [ -z "$2" ]; then echo "Missing session UUID" exit 1 fi "$REDIS_CLI" hkeys 'spring:session:sessions:'"$2" ;; context) if [ -z "$2" ]; then echo "Missing session UUID" exit 1 fi "$REDIS_CLI" hget 'spring:session:sessions:'"$2" "sessionAttr:SPRING_SECURITY_CONTEXT" ;; esac