Fix for #763: fetch ticket and do proxy check before callback.
Merge pull request #768 from serac/authorize-before-proxy

Fix for #763: fetch ticket and do proxy check before callback.