cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jordi Torrente (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-4429) Incorrect response check
Date Tue, 17 Jul 2012 13:06:35 GMT

     [ https://issues.apache.org/jira/browse/CXF-4429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jordi Torrente updated CXF-4429:
--------------------------------

    Description: 
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))
{



  was:
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))
{  

    
> 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
>              Labels: oauth2
>
> 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

        

Mime
View raw message