You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2020/10/19 01:18:12 UTC

[GitHub] [james-project] antonok-edm commented on a change in pull request #254: Redirect to JMAP session resource from /.well-known/jmap

antonok-edm commented on a change in pull request #254:
URL: https://github.com/apache/james-project/pull/254#discussion_r507315721



##########
File path: server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/http/SessionRoutes.scala
##########
@@ -58,12 +59,18 @@ class SessionRoutes @Inject() (@Named(InjectionKeys.RFC_8621) val authenticator:
       .subscribeOn(Schedulers.elastic())
       .asJava()
 
+  private val redirectToSession: JMAPRoute.Action = JMAPRoutes.redirectTo(JMAP_SESSION)
+
   override def routes: Stream[JMAPRoute] =
     Stream.of(
       JMAPRoute.builder()
         .endpoint(new Endpoint(HttpMethod.GET, JMAP_SESSION))
         .action(generateSession)
         .corsHeaders,
+      JMAPRoute.builder()
+        .endpoint(new Endpoint(HttpMethod.GET, WELL_KNOWN_JMAP))
+        .action(redirectToSession)
+        .corsHeaders,
       JMAPRoute.builder()
         .endpoint(new Endpoint(HttpMethod.OPTIONS, AUTHENTICATION))

Review comment:
       @chibenwa is `AUTHENTICATION` here an error? this should be `JMAP_SESSION` instead?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org