cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1362991 - in /cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2: grants/owner/ResourceOwnerGrantHandler.java utils/OAuthConstants.java
Date Wed, 18 Jul 2012 15:53:50 GMT
Author: sergeyb
Date: Wed Jul 18 15:53:50 2012
New Revision: 1362991

URL: http://svn.apache.org/viewvc?rev=1362991&view=rev
Log:
Minor updates to OAuth2 module, with the code to report new invalid_client error condition
to be updated later

Modified:
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/owner/ResourceOwnerGrantHandler.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/owner/ResourceOwnerGrantHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/owner/ResourceOwnerGrantHandler.java?rev=1362991&r1=1362990&r2=1362991&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/owner/ResourceOwnerGrantHandler.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/owner/ResourceOwnerGrantHandler.java
Wed Jul 18 15:53:50 2012
@@ -45,14 +45,14 @@ public class ResourceOwnerGrantHandler e
         String ownerName = params.getFirst(OAuthConstants.RESOURCE_OWNER_NAME);
         String ownerPassword = params.getFirst(OAuthConstants.RESOURCE_OWNER_PASSWORD);
         if (ownerName == null || ownerPassword == null) {
-            throw new OAuthServiceException(OAuthConstants.UNAUTHORIZED_CLIENT);
+            throw new OAuthServiceException(OAuthConstants.INVALID_REQUEST);
         }
         
         UserSubject subject = null;
         try {
             subject = loginHandler.createSubject(ownerName, ownerPassword);
         } catch (Exception ex) { 
-            throw new OAuthServiceException(OAuthConstants.UNAUTHORIZED_CLIENT);
+            throw new OAuthServiceException(OAuthConstants.INVALID_REQUEST);
         }
         
         return doCreateAccessToken(client, 

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java?rev=1362991&r1=1362990&r2=1362991&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthConstants.java
Wed Jul 18 15:53:50 2012
@@ -79,6 +79,7 @@ public final class OAuthConstants {
     public static final String UNSUPPORTED_GRANT_TYPE = "unsupported_grant_type";
     public static final String UNSUPPORTED_RESPONSE_TYPE = "unsupported_response_type";
     public static final String UNAUTHORIZED_CLIENT = "unauthorized_client";
+    public static final String INVALID_CLIENT = "invalid_client";
     public static final String INVALID_SCOPE = "invalid_scope";
     public static final String ACCESS_DENIED = "access_denied";
     



Mime
View raw message