shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbaxte...@apache.org
Subject svn commit: r1352375 - in /shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2: BasicOAuth2Store.java OAuth2Store.java
Date Thu, 21 Jun 2012 00:28:47 GMT
Author: rbaxter85
Date: Thu Jun 21 00:28:46 2012
New Revision: 1352375

URL: http://svn.apache.org/viewvc?rev=1352375&view=rev
Log:
SHINDIG-1793
Committed for Adam Clarke
expose OAuth2 client invalidation on OAuth2Store

Modified:
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Store.java
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/OAuth2Store.java

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Store.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Store.java?rev=1352375&r1=1352374&r2=1352375&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Store.java
(original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Store.java
Thu Jun 21 00:28:46 2012
@@ -458,4 +458,12 @@ public class BasicOAuth2Store implements
   public BlobCrypter getStateCrypter() {
     return this.stateCrypter;
   }
+
+  public OAuth2Client invalidateClient(final OAuth2Client client) {
+    return this.cache.removeClient(client);
+  }
+
+  public OAuth2Token invalidateToken(final OAuth2Token token) {
+    return this.cache.removeToken(token);
+  }
 }

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/OAuth2Store.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/OAuth2Store.java?rev=1352375&r1=1352374&r2=1352375&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/OAuth2Store.java
(original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/OAuth2Store.java
Thu Jun 21 00:28:46 2012
@@ -20,6 +20,7 @@ package org.apache.shindig.gadgets.oauth
 
 import org.apache.shindig.common.crypto.BlobCrypter;
 import org.apache.shindig.gadgets.GadgetException;
+import org.apache.shindig.gadgets.oauth2.persistence.OAuth2Client;
 import org.apache.shindig.gadgets.servlet.OAuth2CallbackServlet;
 
 /**
@@ -158,4 +159,24 @@ public interface OAuth2Store {
    *          to store
    */
   void storeOAuth2Accessor(OAuth2Accessor accessor);
+
+  /**
+   * Invalidate a cached client and force it to be reloaded from persistence.
+   *
+   * @param client
+   *          to be invalidated
+   *
+   * @return the client that was invalidated, or <code>null></code> if client
could not be found
+   */
+  OAuth2Client invalidateClient(OAuth2Client client);
+
+  /**
+   * Invalidate a cached token and force it to be reloaded from persistence.
+   *
+   * @param token
+   *          to be invalidated
+   *
+   * @return the token that was invalidated, or <code>null</code> if token could
not be found
+   */
+  OAuth2Token invalidateToken(OAuth2Token token);
 }



Mime
View raw message