cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1342188 - /cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
Date Thu, 24 May 2012 10:11:54 GMT
Author: sergeyb
Date: Thu May 24 10:11:53 2012
New Revision: 1342188

URL: http://svn.apache.org/viewvc?rev=1342188&view=rev
Log:
[CXF-4337] Checking the local access token for null, thanks to Jordi Torrente

Modified:
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java?rev=1342188&r1=1342187&r2=1342188&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
Thu May 24 10:11:53 2012
@@ -114,11 +114,14 @@ public abstract class AbstractAccessToke
         if (accessTokenV == null && dataProvider != null && authScheme.equals(DEFAULT_AUTH_SCHEME))
{
             try {
                 localAccessToken = dataProvider.getAccessToken(authSchemeData);
-                accessTokenV = new AccessTokenValidation(localAccessToken);
             } catch (OAuthServiceException ex) {
+                // to be handled next
+            }
+            if (localAccessToken == null) {
                 AuthorizationUtils.throwAuthorizationFailure(
                     Collections.singleton(authScheme));
             }
+            accessTokenV = new AccessTokenValidation(localAccessToken);
         }
         if (accessTokenV == null) {
             AuthorizationUtils.throwAuthorizationFailure(supportedSchemes);



Mime
View raw message