Skip to content

Instantly share code, notes, and snippets.

@steffentchr
steffentchr / README.md
Last active July 5, 2018 15:17
An example of how to verify SAML/XML signatures, execute in Ruby. Adapted from https://github.com/zendesk/samlr/.

It's hard to find a good example of how to verify SAML signatures online. There are plenty magic that "just calls a Java method" -- but few clear step-by-step guide.

This gist covers the signature check of a SAML response in Ruby, and as such it's also an example of how to verify an XML Secure.

The code here is lifted entirely from Morten Primdahls and Zendesks awesome SAMLR library.