You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by "Adrian Avila (JIRA)" <ji...@apache.org> on 2019/02/06 15:30:00 UTC

[jira] [Created] (OPENMEETINGS-2012) Integrate Wso2 Identity Server

Adrian Avila created OPENMEETINGS-2012:
------------------------------------------

             Summary: Integrate Wso2 Identity Server
                 Key: OPENMEETINGS-2012
                 URL: https://issues.apache.org/jira/browse/OPENMEETINGS-2012
             Project: Openmeetings
          Issue Type: Improvement
          Components: OAuth
    Affects Versions: 4.0.7
            Reporter: Adrian Avila
            Assignee: Maxim Solodovnik
             Fix For: 4.0.7


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",{color:#d04437} String.format("bearer %s", token){color}); //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);
    }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)