Conversation
|
I'm a big fan of packages working against the default handler interfaces when possible. It may be that if something doesn't work with those then it might be better to just re-implement the handlers which aren't really that large but let me have a look at it and a think. I only added the server to this package because I ended up with almost the same code in the example as well as a couple of projects I was using it with so wanted to be lazy and avoid some repetition. |
|
If someone is using something like I think the better solution would be converting |
auth.Server()method is creating a newServeMuxand setting the handlers for generate and verify handlers. This is useful when you are usinghttp.Handlerorhttp.HadleFuncwith defaultServeMux. However, this is makingauth.Server()unusable with something likegorilla/mux.This pull request allows user to pass the default or any custom
ServeMuxintoauth.Server(), so it can be used along withgorilla/muxor any similar packages.Example:
auth.Server()creates a newServeMuxif nothing is passed.