Uploaded image for project: 'OpenId Connect'
  1. OpenId Connect
  2. OIDC-198

userinfo endpoint does not support OPTIONS http requests

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 2.13.0
    • Provider
    • None
    • Unknown

    Description

      Reproduction steps

      1. build an http query to /xwiki/oidc/userinfo in javascript
      2. execute it on a brower sending preflight requests for CORS (e.g., Chrome)

      Expected

      • The server handles the OPTIONS (preflight) request

      Actual

      • oidc does not handle OPTIONS and returns a 500 http error
      java.lang.IllegalArgumentException: No enum constant com.nimbusds.oauth2.sdk.http.HTTPRequest.Method.OPTIONS
      	at java.base/java.lang.Enum.valueOf(Enum.java:273)
      	at com.nimbusds.oauth2.sdk.http.HTTPRequest$Method.valueOf(HTTPRequest.java:81)
      	at com.nimbusds.oauth2.sdk.http.ServletUtils.createHTTPRequest(ServletUtils.java:174)
      	at com.nimbusds.oauth2.sdk.http.ServletUtils.createHTTPRequest(ServletUtils.java:143)
      	at org.xwiki.contrib.oidc.provider.internal.OIDCResourceReferenceHandler.handle(OIDCResourceReferenceHandler.java:126)
      	at org.xwiki.contrib.oidc.provider.internal.OIDCResourceReferenceHandler.handle(OIDCResourceReferenceHandler.java:110)
      	at org.xwiki.resource.internal.DefaultResourceReferenceHandlerChain.handleNext(DefaultResourceReferenceHandlerChain.java:79)
      	at org.xwiki.resource.internal.AbstractResourceReferenceHandlerManager.handle(AbstractResourceReferenceHandlerManager.java:82)
      	at org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.handleResourceReference(ResourceReferenceHandlerServlet.java:159)
      	at org.xwiki.resource.servlet.ResourceReferenceHandlerServlet.service(ResourceReferenceHandlerServlet.java:87)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mleduc Manuel Leduc
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: