cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6722] Updating OAuthDataProvider and AuthorizationCodeDataProvider to list the existing tokens and grants
Date Mon, 28 Dec 2015 14:55:07 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c4ba8c945 -> 3aa4959dd


[CXF-6722] Updating OAuthDataProvider and AuthorizationCodeDataProvider to list the existing
tokens and grants


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3aa4959d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3aa4959d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3aa4959d

Branch: refs/heads/3.1.x-fixes
Commit: 3aa4959ddbf225a82b597afef828bc21aa87db45
Parents: c4ba8c9
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Dec 28 14:53:46 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Dec 28 14:54:42 2015 +0000

----------------------------------------------------------------------
 .../grants/code/AbstractCodeDataProvider.java   |  3 --
 .../code/AuthorizationCodeDataProvider.java     | 12 ++++++++
 .../provider/AbstractOAuthDataProvider.java     |  2 --
 .../provider/ClientRegistrationProvider.java    | 24 +++++++++++++++-
 .../DefaultEHCacheOAuthDataProvider.java        | 14 +++++++---
 .../DefaultEncryptingOAuthDataProvider.java     | 14 +++++++---
 .../oauth2/provider/OAuthDataProvider.java      | 29 +++++++++++++++++---
 .../services/AbstractAccessTokenValidator.java  |  7 ++++-
 .../oauth2/grants/OAuthDataProviderImpl.java    | 13 +++++++++
 .../crypto/CodeGrantEncryptingDataProvider.java |  8 ++++++
 .../utils/crypto/EncryptingDataProvider.java    | 12 ++++++++
 .../security/oauth2/OAuthDataProviderImpl.java  | 13 +++++++++
 12 files changed, 132 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
index 23fd17e..f6d0cf9 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AbstractCodeDataProvider.java
@@ -18,8 +18,6 @@
  */
 package org.apache.cxf.rs.security.oauth2.grants.code;
 
-import java.util.List;
-
 import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.provider.AbstractOAuthDataProvider;
 import org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException;
@@ -64,5 +62,4 @@ public abstract class AbstractCodeDataProvider extends AbstractOAuthDataProvider
         return grant;
     }
     protected abstract void saveCodeGrant(ServerAuthorizationCodeGrant grant);
-    public abstract List<ServerAuthorizationCodeGrant> getCodeGrants(Client c);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeDataProvider.java
index 925c7a5..de63a39 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeDataProvider.java
@@ -19,6 +19,9 @@
 
 package org.apache.cxf.rs.security.oauth2.grants.code;
 
+import java.util.List;
+
+import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.provider.OAuthDataProvider;
 import org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException;
 
@@ -49,4 +52,13 @@ public interface AuthorizationCodeDataProvider extends OAuthDataProvider
{
      * @see ServerAuthorizationCodeGrant
      */
     ServerAuthorizationCodeGrant removeCodeGrant(String code) throws OAuthServiceException;
+    
+    /**
+     * Return the list of code grants associated with a given client
+     * @param client the client
+     * @return the list of grants
+     * @throws OAuthServiceException
+     * @see ServerAuthorizationCodeGrant
+     */
+    List<ServerAuthorizationCodeGrant> getCodeGrants(Client c) throws OAuthServiceException;
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index b586a22..367997f 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
@@ -282,8 +282,6 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider,
Cl
     protected abstract void saveAccessToken(ServerAccessToken serverToken);
     protected abstract void saveRefreshToken(ServerAccessToken at, RefreshToken refreshToken);
     protected abstract ServerAccessToken revokeAccessToken(String accessTokenKey);
-    protected abstract List<ServerAccessToken> getAccessTokens(Client c);
-    protected abstract List<RefreshToken> getRefreshTokens(Client c);
     protected abstract RefreshToken revokeRefreshToken(String refreshTokenKey);
     protected abstract RefreshToken getRefreshToken(String refreshTokenKey);
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/ClientRegistrationProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/ClientRegistrationProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/ClientRegistrationProvider.java
index d1010b9..02f48ee 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/ClientRegistrationProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/ClientRegistrationProvider.java
@@ -21,10 +21,32 @@ package org.apache.cxf.rs.security.oauth2.provider;
 import java.util.List;
 
 import org.apache.cxf.rs.security.oauth2.common.Client;
+import org.apache.cxf.rs.security.oauth2.common.UserSubject;
 
 public interface ClientRegistrationProvider {
+    /**
+     * Get a Client with the given id
+     * @param clientId the client id
+     * @return Client
+     */
     Client getClient(String clientId);
+    /**
+     * Set a Client
+     * @param client the client
+     */
     void setClient(Client client);
+    /**
+     * Remove a Client with the given id
+     * @param clientId the client id
+     * @return Client
+     */
     Client removeClient(String clientId);
-    List<Client> getClients();
+    
+    /**
+     * Get a list of clients registered by a resource owner.
+     *  
+     * @param resourceOwner the resource owner, can be null
+     * @return the list of clients
+     */
+    List<Client> getClients(UserSubject resourceOwner);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
index b87a7f5..7d8a556 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
@@ -38,6 +38,7 @@ import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.common.ServerAccessToken;
+import org.apache.cxf.rs.security.oauth2.common.UserSubject;
 import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 import org.apache.cxf.rs.security.oauth2.utils.EHCacheUtil;
 
@@ -88,17 +89,22 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider
{
     }
 
     @Override
-    public List<Client> getClients() {
+    public List<Client> getClients(UserSubject resourceOwner) {
         List<String> keys = CastUtils.cast(clientCache.getKeys());
         List<Client> clients = new ArrayList<Client>(keys.size());
         for (String key : keys) {
-            clients.add(getClient(key));
+            Client c = getClient(key);
+            if (resourceOwner == null 
+                || c.getResourceOwnerSubject() != null 
+                   && c.getResourceOwnerSubject().getLogin().equals(resourceOwner.getLogin()))
{
+                clients.add(c);
+            }
         }
         return clients;
     }
 
     @Override
-    protected List<ServerAccessToken> getAccessTokens(Client c) {
+    public List<ServerAccessToken> getAccessTokens(Client c) {
         List<String> keys = CastUtils.cast(accessTokenCache.getKeys());
         List<ServerAccessToken> tokens = new ArrayList<ServerAccessToken>(keys.size());
         for (String key : keys) {
@@ -111,7 +117,7 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider
{
     }
 
     @Override
-    protected List<RefreshToken> getRefreshTokens(Client c) {
+    public List<RefreshToken> getRefreshTokens(Client c) {
         List<String> keys = CastUtils.cast(refreshTokenCache.getKeys());
         List<RefreshToken> tokens = new ArrayList<RefreshToken>(keys.size());
         for (String key : keys) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
index dd7dffb..7b4f88f 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
@@ -29,6 +29,7 @@ import javax.crypto.SecretKey;
 
 import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.common.ServerAccessToken;
+import org.apache.cxf.rs.security.oauth2.common.UserSubject;
 import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 import org.apache.cxf.rs.security.oauth2.utils.crypto.ModelEncryptionSupport;
@@ -68,15 +69,20 @@ public class DefaultEncryptingOAuthDataProvider extends AbstractOAuthDataProvide
         return client;
     }
     @Override
-    public List<Client> getClients() {
+    public List<Client> getClients(UserSubject resourceOwner) {
         List<Client> clients = new ArrayList<Client>(clientsMap.size());
         for (String clientKey : clientsMap.keySet()) {
-            clients.add(getClient(clientKey));
+            Client c = getClient(clientKey);
+            if (resourceOwner == null 
+                || c.getResourceOwnerSubject() != null 
+                   && c.getResourceOwnerSubject().getLogin().equals(resourceOwner.getLogin()))
{
+                clients.add(c);
+            }
         }
         return clients;
     }
     @Override
-    protected List<ServerAccessToken> getAccessTokens(Client c) {
+    public List<ServerAccessToken> getAccessTokens(Client c) {
         List<ServerAccessToken> list = new ArrayList<ServerAccessToken>(tokens.size());
         for (String tokenKey : tokens) {
             ServerAccessToken token = getAccessToken(tokenKey);
@@ -87,7 +93,7 @@ public class DefaultEncryptingOAuthDataProvider extends AbstractOAuthDataProvide
         return list;
     }
     @Override
-    protected List<RefreshToken> getRefreshTokens(Client c) {
+    public List<RefreshToken> getRefreshTokens(Client c) {
         List<RefreshToken> list = new ArrayList<RefreshToken>(refreshTokens.size());
         for (String tokenKey : tokens) {
             RefreshToken token = getRefreshToken(tokenKey);

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthDataProvider.java
index 8223e9a..d46e6da 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/OAuthDataProvider.java
@@ -26,6 +26,7 @@ import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.common.OAuthPermission;
 import org.apache.cxf.rs.security.oauth2.common.ServerAccessToken;
 import org.apache.cxf.rs.security.oauth2.common.UserSubject;
+import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 
 /**
  * OAuth provider responsible for persisting the information about 
@@ -91,19 +92,39 @@ public interface OAuthDataProvider {
      * @param accessToken the token
      * @throws OAuthServiceException
      */
+    @Deprecated
     void removeAccessToken(ServerAccessToken accessToken) throws OAuthServiceException;
     
     /**
+     * Return all access tokens associated with a given client
+     * @param client the client
+     * @return list of access tokens
+     * @throws OAuthServiceException
+     */
+    List<ServerAccessToken> getAccessTokens(Client client) throws OAuthServiceException;
+    
+    /**
+     * Return all refresh tokens associated with a given client
+     * @param client the client
+     * @return list of refresh tokens
+     * @throws OAuthServiceException
+     */
+    List<RefreshToken> getRefreshTokens(Client client) throws OAuthServiceException;
+    
+    /**
      * Revokes a refresh or access token
      * @param token token identifier
-     * @param tokenTypeHint 
+     * @param tokenTypeHint can be access_token or refresh_token or null
      * @throws OAuthServiceException
      */
-    void revokeToken(Client client, String token, String tokenTypeHint) throws OAuthServiceException;
+    void revokeToken(Client client, String tokenId, String tokenTypeHint) throws OAuthServiceException;
 
     /**
-     * Converts the requested scope to the list of permissions  
-     * @param requestedScopes
+     * Converts the requested scopes to the list of permissions.
+     * The scopes are extracted from OAuth2 'scope' property which
+     * if set may contain one or more space separated scope values
+     *   
+     * @param requestedScopes the scopes
      * @return list of permissions
      */
     List<OAuthPermission> convertScopeToPermissions(Client client,

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
index 713318a..666e7e4 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
@@ -131,7 +131,7 @@ public abstract class AbstractAccessTokenValidator {
         // Check if token is still valid
         if (OAuthUtils.isExpired(accessTokenV.getTokenIssuedAt(), accessTokenV.getTokenLifetime()))
{
             if (localAccessToken != null) {
-                dataProvider.removeAccessToken(localAccessToken);
+                removeAccessToken(localAccessToken);
             }
             AuthorizationUtils.throwAuthorizationFailure(supportedSchemes, realm);
         }
@@ -144,6 +144,11 @@ public abstract class AbstractAccessTokenValidator {
         return accessTokenV;
     }
 
+    @SuppressWarnings("deprecation")
+    protected void removeAccessToken(ServerAccessToken localAccessToken) {
+        dataProvider.removeAccessToken(localAccessToken);
+    }
+
     protected boolean validateAudience(String audience) {
         return OAuthUtils.validateAudience(audience, audiences);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/OAuthDataProviderImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/OAuthDataProviderImpl.java
b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/OAuthDataProviderImpl.java
index 4565d0f..99143c0 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/OAuthDataProviderImpl.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/grants/OAuthDataProviderImpl.java
@@ -28,6 +28,7 @@ import org.apache.cxf.rs.security.oauth2.common.UserSubject;
 import org.apache.cxf.rs.security.oauth2.provider.OAuthDataProvider;
 import org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException;
 import org.apache.cxf.rs.security.oauth2.tokens.bearer.BearerAccessToken;
+import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 
 
 public class OAuthDataProviderImpl implements OAuthDataProvider {
@@ -82,4 +83,16 @@ public class OAuthDataProviderImpl implements OAuthDataProvider {
         
     }
 
+    @Override
+    public List<ServerAccessToken> getAccessTokens(Client client) throws OAuthServiceException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public List<RefreshToken> getRefreshTokens(Client client) throws OAuthServiceException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
index 04056bf..3f4d7da 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
@@ -19,8 +19,10 @@
 package org.apache.cxf.rs.security.oauth2.utils.crypto;
 
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 
+import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeDataProvider;
 import org.apache.cxf.rs.security.oauth2.grants.code.AuthorizationCodeRegistration;
 import org.apache.cxf.rs.security.oauth2.grants.code.ServerAuthorizationCodeGrant;
@@ -52,4 +54,10 @@ public class CodeGrantEncryptingDataProvider extends EncryptingDataProvider
         grants.remove(code);
         return ModelEncryptionSupport.decryptCodeGrant(this, code, key);
     }
+
+    @Override
+    public List<ServerAuthorizationCodeGrant> getCodeGrants(Client c) throws OAuthServiceException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
index 0fd6179..e2e7b3e 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
@@ -147,4 +147,16 @@ public class EncryptingDataProvider implements OAuthDataProvider {
         String encryptedRefreshToken = ModelEncryptionSupport.encryptRefreshToken(refreshToken,
key);
         token.setRefreshToken(encryptedRefreshToken);
     }
+
+    @Override
+    public List<ServerAccessToken> getAccessTokens(Client client) throws OAuthServiceException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public List<RefreshToken> getRefreshTokens(Client client) throws OAuthServiceException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3aa4959d/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/OAuthDataProviderImpl.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/OAuthDataProviderImpl.java
b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/OAuthDataProviderImpl.java
index b1472e5..47b2fce 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/OAuthDataProviderImpl.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/oauth2/OAuthDataProviderImpl.java
@@ -35,6 +35,7 @@ import org.apache.cxf.rs.security.oauth2.provider.OAuthDataProvider;
 import org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException;
 import org.apache.cxf.rs.security.oauth2.saml.Constants;
 import org.apache.cxf.rs.security.oauth2.tokens.bearer.BearerAccessToken;
+import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 
 
@@ -118,4 +119,16 @@ public class OAuthDataProviderImpl implements OAuthDataProvider {
         
     }
 
+    @Override
+    public List<ServerAccessToken> getAccessTokens(Client client) throws OAuthServiceException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public List<RefreshToken> getRefreshTokens(Client client) throws OAuthServiceException
{
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }


Mime
View raw message