IndieAuth #25
|
@ -18,12 +18,12 @@ func Router(repo *owl.Repository) http.Handler {
|
||||||
router.POST("/user/:user/auth/", userAuthProfileHandler(repo))
|
router.POST("/user/:user/auth/", userAuthProfileHandler(repo))
|
||||||
router.POST("/user/:user/auth/verify/", userAuthVerifyHandler(repo))
|
router.POST("/user/:user/auth/verify/", userAuthVerifyHandler(repo))
|
||||||
router.POST("/user/:user/auth/token/", userAuthTokenHandler(repo))
|
router.POST("/user/:user/auth/token/", userAuthTokenHandler(repo))
|
||||||
router.GET("/user/:user/auth/indieauth-metadata", userAuthMetadataHandler(repo))
|
|
||||||
router.GET("/user/:user/media/*filepath", userMediaHandler(repo))
|
router.GET("/user/:user/media/*filepath", userMediaHandler(repo))
|
||||||
router.GET("/user/:user/index.xml", userRSSHandler(repo))
|
router.GET("/user/:user/index.xml", userRSSHandler(repo))
|
||||||
router.GET("/user/:user/posts/:post/", postHandler(repo))
|
router.GET("/user/:user/posts/:post/", postHandler(repo))
|
||||||
router.GET("/user/:user/posts/:post/media/*filepath", postMediaHandler(repo))
|
router.GET("/user/:user/posts/:post/media/*filepath", postMediaHandler(repo))
|
||||||
router.POST("/user/:user/webmention/", userWebmentionHandler(repo))
|
router.POST("/user/:user/webmention/", userWebmentionHandler(repo))
|
||||||
|
router.GET("/user/:user/.well-known/oauth-authorization-server", userAuthMetadataHandler(repo))
|
||||||
router.NotFound = http.HandlerFunc(notFoundHandler(repo))
|
router.NotFound = http.HandlerFunc(notFoundHandler(repo))
|
||||||
return router
|
return router
|
||||||
}
|
}
|
||||||
|
@ -36,12 +36,12 @@ func SingleUserRouter(repo *owl.Repository) http.Handler {
|
||||||
router.POST("/auth/", userAuthProfileHandler(repo))
|
router.POST("/auth/", userAuthProfileHandler(repo))
|
||||||
router.POST("/auth/verify/", userAuthVerifyHandler(repo))
|
router.POST("/auth/verify/", userAuthVerifyHandler(repo))
|
||||||
router.POST("/auth/token/", userAuthTokenHandler(repo))
|
router.POST("/auth/token/", userAuthTokenHandler(repo))
|
||||||
router.GET("/auth/indieauth-metadata", userAuthMetadataHandler(repo))
|
|
||||||
router.GET("/media/*filepath", userMediaHandler(repo))
|
router.GET("/media/*filepath", userMediaHandler(repo))
|
||||||
router.GET("/index.xml", userRSSHandler(repo))
|
router.GET("/index.xml", userRSSHandler(repo))
|
||||||
router.GET("/posts/:post/", postHandler(repo))
|
router.GET("/posts/:post/", postHandler(repo))
|
||||||
router.GET("/posts/:post/media/*filepath", postMediaHandler(repo))
|
router.GET("/posts/:post/media/*filepath", postMediaHandler(repo))
|
||||||
router.POST("/webmention/", userWebmentionHandler(repo))
|
router.POST("/webmention/", userWebmentionHandler(repo))
|
||||||
|
router.GET("/.well-known/oauth-authorization-server", userAuthMetadataHandler(repo))
|
||||||
router.NotFound = http.HandlerFunc(notFoundHandler(repo))
|
router.NotFound = http.HandlerFunc(notFoundHandler(repo))
|
||||||
return router
|
return router
|
||||||
}
|
}
|
||||||
|
|
2
user.go
2
user.go
|
@ -79,7 +79,7 @@ func (user User) TokenUrl() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (user User) IndieauthMetadataUrl() string {
|
func (user User) IndieauthMetadataUrl() string {
|
||||||
url, _ := url.JoinPath(user.AuthUrl(), "indieauth-metadata")
|
url, _ := url.JoinPath(user.FullUrl(), ".well-known/oauth-authorization-server")
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue