func (this *StateHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler) { mux.Get("/api/state", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Get), )) mux.Post("/api/state", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Post), )) }
func (this *MiddlewareHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler) { mux.Get("/api/middleware", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Redirect), )) mux.Post("/api/middleware", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Redirect), )) }
func (this *TemplatesHandler) RegisterRoutes(mux *bone.Mux, am *handlers.AuthHandler) { mux.Get("/api/templates", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Get), )) mux.Delete("/api/templates", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Delete), )) mux.Post("/api/templates", negroni.New( negroni.HandlerFunc(am.RequireTokenAuthentication), negroni.HandlerFunc(this.Post), )) }
func (this *AuthHandler) RegisterRoutes(mux *bone.Mux) { mux.Post("/api/token-auth", http.HandlerFunc(this.Login)) mux.Get("/api/refresh-token-auth", negroni.New( negroni.HandlerFunc(this.RequireTokenAuthentication), negroni.HandlerFunc(this.RefreshToken), )) mux.Get("/api/logout", negroni.New( negroni.HandlerFunc(this.RequireTokenAuthentication), negroni.HandlerFunc(this.Logout), )) mux.Get("/api/users", negroni.New( negroni.HandlerFunc(this.RequireTokenAuthentication), negroni.HandlerFunc(this.GetAllUsersHandler), )) }