Jordi Torrente created CXF-4429:
-----------------------------------

             Summary: Incorrect response check 
                 Key: CXF-4429
                 URL: https://issues.apache.org/jira/browse/CXF-4429
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS Security
    Affects Versions: 2.7.0
            Reporter: Jordi Torrente


When an access token response is processed inside OAuthClientUtils class 
(method getAccessToken), the code checks if the key "OAuthConstants.ERROR_KEY" 
is present in the returned entity map, but the map's method used is 
"containsValue()" instead of "containsKey()":

source line:
 } else if (400 == response.getStatus() && 
map.containsValue(OAuthConstants.ERROR_KEY)) {

should be:
 } else if (400 == response.getStatus() && 
map.containsKey(OAuthConstants.ERROR_KEY)) {  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to