diff --git a/test/saml20_clj/test.clj b/test/saml20_clj/test.clj index c784420..8d486d2 100644 --- a/test/saml20_clj/test.clj +++ b/test/saml20_clj/test.clj @@ -71,6 +71,10 @@ [_] (sample-file "response-with-signed-message-and-assertion.xml")) +(defmethod response {:message-encrypted? true :assertion-signed? true} + [_] + (sample-file "response-with-encrypted-message-and-signed-assertion.xml")) + (defmethod response {:assertion-encrypted? true} [_] (sample-file "response-with-encrypted-assertion.xml")) @@ -95,6 +99,9 @@ (for [[dispatch-value f] (methods response)] (assoc dispatch-value :response (f dispatch-value)))) +(defn encrypted? [response-map] + ((some-fn :message-encrypted?) response-map)) + (defn signed? [response-map] ((some-fn :message-signed? :assertion-signed?) response-map)) diff --git a/test/saml20_clj/test/response-with-encrypted-message-and-signed-assertion.xml b/test/saml20_clj/test/response-with-encrypted-message-and-signed-assertion.xml new file mode 100644 index 0000000..6bc042c --- /dev/null +++ b/test/saml20_clj/test/response-with-encrypted-message-and-signed-assertion.xml @@ -0,0 +1,5 @@ +OBOiXneHbNdjf1MPKdO7LGEg5o2lz8WVVfKJv28M7ZaFITtEHMWKIks6XjDYtul76IGqUTaGeBzS+3KYjcTReIpAPme5pHZ7GwXrf6dByP/78QPCkw0W+33bbDPBSemlqD/L8x6Buvv3WMv9YC14jzISeUFsfbrMJJNWbHUIZEo= + + FqnOpIMPGQjEm8zwVUGc2paYoWSbVWaYqOftSGCxanJO88RfBQxJehTC3Mv//LxbupjftxDcBJ08SwaE831tS9PmLQZpk9diGU5oSyi1ayAJBq93qHabzt5jvzuxClSB1JMTGG7ncF6XlWwMxnGIRhzoUK+2rKa7C8Mcy7INAKVJ2sdUri17pXM6oQiWutqOb4vUzbo0s4F4FluX2Bjgnhb6ZJC9e1GwCiWRlTwmdKJug9xX4+crCrw90V5USUtQDQ2R+PDr02z7SAlVncnTPGvs2LUi6aW7c9svrrkt59oaWAtDhlxCgbZ58z8almNd1OGSLgiLMJrIzbqQXsfx4ivYUlrfai9RANMH2RixdxVL1V8K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