Uploaded image for project: 'Openmeetings'
  1. Openmeetings
  2. OPENMEETINGS-2012

Integrate Wso2 Identity Server

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.7
    • 4.0.8
    • OAuth
    • None

    Description

      Wso2 Identity Server in the header value for 'Authorization' does not accept 'bearer'.

      /openmeetings-web/src/main/java/org/apache/openmeetings/web/pages/auth/SignInPage.java

      line #277
         
          private static OAuthUser getAuthParams(String token, String code, OAuthServer server) throws IOException {
              // prepare url
              String requestInfoUrl = server.getRequestInfoUrl();
              requestInfoUrl = prepareUrlParams(requestInfoUrl, server.getClientId(), getRedirectUri(server)
                      , server.getClientSecret(), token, code);
              // send request
              HttpURLConnection connection = (HttpURLConnection) new URL(requestInfoUrl).openConnection();
              if (server.getRequestInfoMethod() == RequestInfoMethod.HEADER) {
                  connection.setRequestProperty("Authorization", String.format("bearer %s", token)); //HERE
              } else

      {             connection.setRequestMethod(server.getRequestInfoMethod().name());         }

              prepareConnection(connection);
              String json = IOUtils.toString(connection.getInputStream(), UTF_8);
              log.debug("User info={}", json);
              // parse json result
              return new OAuthUser(json, server);
          }

      Attachments

        Activity

          People

            solomax Maxim Solodovnik
            avilaatencioa Adrian Avila
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: