mirror of https://github.com/jacekkow/keycloak-protocol-cas

Jacek Kowalski
12 hours ago fc40907a5866310f620d22c7f76ba5c148fafc07
integrationTest/suite.sh
@@ -41,6 +41,14 @@
$CURL "${keycloak_cas_url}/validate?service=http://localhost&ticket=$ticket"
echo
echo "Testing CAS 1.0 - ticket issued for another service..."
ticket=$(get_ticket)
if $CURL "${keycloak_cas_url}/validate?service=http://localhost/other&ticket=$ticket"; then
    echo "Ticket was accepted for a different service"
    exit 1
fi
echo
# CAS 2.0
echo "Testing CAS 2.0 - XML..."
ticket=$(get_ticket)
@@ -72,6 +80,20 @@
fi
echo
echo "Testing CAS 2.0 - malformed ticket..."
response=$(curl --silent --write-out '%{http_code}' --output /dev/null "${keycloak_cas_url}/serviceValidate?service=http://localhost&ticket=ST-x--zz--y")
if [ "$response" != "400" ]; then
    echo "Malformed ticket returned HTTP ${response} instead of 400"
    exit 1
fi
echo "Testing CAS 2.0 - proxyValidate without ticket..."
response=$(curl --silent --write-out '%{http_code}' --output /dev/null "${keycloak_cas_url}/proxyValidate?service=http://localhost")
if [ "$response" != "400" ]; then
    echo "Missing ticket returned HTTP ${response} instead of 400"
    exit 1
fi
# SAML 1.1
echo "Testing SAML 1.1..."
ticket=$(get_ticket SAML)