try config handling

This commit is contained in:
Livio Amstutz 2019-11-21 13:56:03 +01:00
parent 7e1d2f0b13
commit 8b0f4438fb
7 changed files with 171 additions and 35 deletions

View file

@ -23,9 +23,9 @@ type Handler interface {
func CreateRouter(h Handler) *mux.Router {
router := mux.NewRouter()
router.HandleFunc(oidc.DiscoveryEndpoint, h.HandleDiscovery)
router.HandleFunc(h.AuthorizationEndpoint(), h.HandleAuthorize)
router.HandleFunc(h.TokenEndpoint(), h.HandleExchange)
router.HandleFunc(h.UserinfoEndpoint(), h.HandleUserinfo)
router.HandleFunc(h.AuthorizationEndpoint().Relative(), h.HandleAuthorize)
router.HandleFunc(h.TokenEndpoint().Relative(), h.HandleExchange)
router.HandleFunc(h.UserinfoEndpoint().Relative(), h.HandleUserinfo)
return router
}