mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
* fix: oidc issuer path and strip path middleware This ensures the server.path requests append the base_url to the oidc well-known issuer information and adjusts server.path configuration to only strip the configured path instead of the first level entirely regardless of its content. * fix: only log the token error and general refactoring * refactor: factorize base_url functions * refactor(server): include all paths in startup logging * refactor: factorize * refactor: GetExternalRootURL -> ExternalRootURL Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package handlers
|
|
|
|
import (
|
|
"github.com/fasthttp/router"
|
|
|
|
"github.com/authelia/authelia/internal/middlewares"
|
|
)
|
|
|
|
// RegisterOIDC registers the handlers with the fasthttp *router.Router. TODO: Add paths for UserInfo, Flush, Logout.
|
|
func RegisterOIDC(router *router.Router, middleware middlewares.RequestHandlerBridge) {
|
|
// TODO: Add OPTIONS handler.
|
|
router.GET(pathOpenIDConnectWellKnown, middleware(oidcWellKnown))
|
|
|
|
router.GET(pathOpenIDConnectConsent, middleware(oidcConsent))
|
|
|
|
router.POST(pathOpenIDConnectConsent, middleware(oidcConsentPOST))
|
|
|
|
router.GET(pathOpenIDConnectJWKs, middleware(oidcJWKs))
|
|
|
|
router.GET(pathOpenIDConnectAuthorization, middleware(middlewares.NewHTTPToAutheliaHandlerAdaptor(oidcAuthorization)))
|
|
|
|
// TODO: Add OPTIONS handler.
|
|
router.POST(pathOpenIDConnectToken, middleware(middlewares.NewHTTPToAutheliaHandlerAdaptor(oidcToken)))
|
|
|
|
router.POST(pathOpenIDConnectIntrospection, middleware(middlewares.NewHTTPToAutheliaHandlerAdaptor(oidcIntrospection)))
|
|
|
|
router.GET(pathOpenIDConnectUserinfo, middleware(middlewares.NewHTTPToAutheliaHandlerAdaptor(oidcUserinfo)))
|
|
router.POST(pathOpenIDConnectUserinfo, middleware(middlewares.NewHTTPToAutheliaHandlerAdaptor(oidcUserinfo)))
|
|
|
|
// TODO: Add OPTIONS handler.
|
|
router.POST(pathOpenIDConnectRevocation, middleware(middlewares.NewHTTPToAutheliaHandlerAdaptor(oidcRevocation)))
|
|
}
|