Created
January 28, 2021 07:46
-
-
Save vjrj/3b9c0a3cf36b9c37db71609f5eac5203 to your computer and use it in GitHub Desktop.
CAS keys generator for LA inventories
This file contains 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 characters
#!/bin/bash | |
# Dependencies: java 8 and curl | |
DEST=. | |
if [[ ! -f $DEST/jwk-gen.jar ]]; then | |
curl -s -o $DEST/jwk-gen.jar --location --remote-header-name --remote-name https://raw.githubusercontent.com/apereo/cas/master/etc/jwk-gen.jar | |
fi | |
function gen { | |
java -jar $DEST/jwk-gen.jar -t oct -s "$1" | grep -v "Full" | jq '.k' | sed 's/^"//' | sed 's/"$//g' | |
} | |
echo pac4j_cookie_signing_key="$(gen 512)" | |
echo pac4j_cookie_encryption_key="$(gen 256)" | |
echo cas_webflow_signing_key="$(gen 512)" | |
echo cas_webflow_encryption_key="$(gen 128)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment