func (h *Handler) SetRoutes(r *mux.Router) { h.server = osin.NewServer(h.OAuthConfig, h.OAuthStore) h.server.AccessTokenGen = h.JWT r.HandleFunc("/oauth2/auth", h.AuthorizeHandler) r.HandleFunc("/oauth2/token", h.TokenHandler) r.HandleFunc("/oauth2/info", h.InfoHandler) r.HandleFunc("/oauth2/introspect", h.IntrospectHandler) }