cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1562517 - in /cxf/branches/2.7.x-fixes: ./ rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/
Date Wed, 29 Jan 2014 17:35:23 GMT
Author: sergeyb
Date: Wed Jan 29 17:35:23 2014
New Revision: 1562517

URL: http://svn.apache.org/r1562517
Log:
Merged revisions 1562516 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1562516 | sergeyb | 2014-01-29 17:24:34 +0000 (Wed, 29 Jan 2014) | 1 line
  
  [CXF-5530] Support for providers overriding the error message in case of the missing clients
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
    cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1562516

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java?rev=1562517&r1=1562516&r2=1562517&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractOAuthService.java
Wed Jan 29 17:35:23 2014
@@ -117,6 +117,10 @@ public abstract class AbstractOAuthServi
         reportInvalidRequestError(error, mt);
     }
     
+    protected void reportInvalidRequestError(OAuthError entity) {
+        reportInvalidRequestError(entity, MediaType.APPLICATION_JSON_TYPE);
+    }
+    
     protected void reportInvalidRequestError(OAuthError entity, MediaType mt) {
         ResponseBuilder rb = Response.status(400);
         if (mt != null) {

Modified: cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java?rev=1562517&r1=1562516&r2=1562517&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
Wed Jan 29 17:35:23 2014
@@ -276,7 +276,10 @@ public class AccessTokenService extends 
         try {
             client = getValidClient(clientId);
         } catch (OAuthServiceException ex) {
-            // log it
+            if (ex.getError() != null) {
+                reportInvalidRequestError(ex.getError());
+                return null;
+            }
         }
         if (client == null) {
             reportInvalidRequestError("Client ID is invalid");



Mime
View raw message