I would appreciate enough access to this project to supply pull requests and/or directly contribute. I am proposing a change that I've already implemented and tested which is completely backward compatible but makes this library more flexible in that it allows people to use it with other 3rd party middleware chaining libraries like vestigo
My suggestion is that you change samlsp/middleware.go to move the request handling part of the RequireAccount method out into a separate public method attached to the middleware type which can be used a stand alone HTTP RequestHandler. That way the Handler can be used with other middleware chains which provide their own http.Handler wrapper methods.
Like the code in the attached file.
middleware_excerpt.go.txt