Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Proper redirect to the oidc openid configuration endpoint #1584

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ object WebFingerRoutes {

class WebFingerRoutes @Inject()(configuration: WebFingerConfiguration) extends JMAPRoutes {
private val ENDPOINT: String = ".well-known/webfinger"
private val OPENID_CONFIGURATION_ENDPOINT = ".well-known/openid-configuration"
private val REL = new URI("http://openid.net/specs/connect/1.0/issuer").toURL

override def routes(): stream.Stream[JMAPRoute] =
Expand All @@ -82,8 +83,8 @@ class WebFingerRoutes @Inject()(configuration: WebFingerConfiguration) extends J
.action((req, res) => this.generate(url)(req, res))
.corsHeaders,
JMAPRoute.builder
.endpoint(Endpoint.ofFixedPath(HttpMethod.GET, "/.well-known/openid-configuration"))
.action(JMAPRoutes.redirectTo(url.toString))
.endpoint(Endpoint.ofFixedPath(HttpMethod.GET, s"/$OPENID_CONFIGURATION_ENDPOINT"))
.action(JMAPRoutes.redirectTo(s"${url.toString}/$OPENID_CONFIGURATION_ENDPOINT"))
.corsHeaders,
oidcCorsEndpoint,
corsEndpoint))
Expand Down