You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/07/17 17:03:56 UTC

[cxf] 02/05: Log the AccessTokenService error

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 91feb64c98ffe1835075e1fa8d782e43e0c785ee
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Tue Jul 17 12:31:50 2018 +0100

    Log the AccessTokenService error
---
 .../apache/cxf/rs/security/oauth2/services/AccessTokenService.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
index 41e608b..fc31db8 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AccessTokenService.java
@@ -65,10 +65,10 @@ public class AccessTokenService extends AbstractTokenService {
     protected void injectContextIntoOAuthProviders() {
         super.injectContextIntoOAuthProviders();
         for (AccessTokenGrantHandler grantHandler : grantHandlers) {
-            OAuthUtils.injectContextIntoOAuthProvider(getMessageContext(), grantHandler);    
+            OAuthUtils.injectContextIntoOAuthProvider(getMessageContext(), grantHandler);
         }
     }
-    
+
     /**
      * Sets a grant handler
      * @param handler the grant handler
@@ -125,6 +125,7 @@ public class AccessTokenService extends AbstractTokenService {
         } catch (WebApplicationException ex) {
             throw ex;
         } catch (RuntimeException ex) {
+            LOG.log(Level.FINE, "Error creating the access token", ex);
             // This is done to bypass a Check-Style
             // restriction on a number of return statements
             OAuthServiceException oauthEx = ex instanceof OAuthServiceException