Examples of InMemoryCache


Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return new DummySecurityToken(ownerId, viewerId, appUrl);
  }

  protected static OAuth2Store getDummyStore() throws Exception {
    if (MockUtils.dummyStore == null) {
      final OAuth2Cache cache = new InMemoryCache();
      final OAuth2Persister persister = MockUtils.getDummyPersister();
      MockUtils.dummyStore = MockUtils.getDummyStore(cache, persister, MockUtils.REDIRECT_URI);
    }

    MockUtils.dummyStore.clearCache();
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return accessToken;
  }

  private static BasicOAuth2Accessor getOAuth2AccessorCommon() throws Exception {
    final OAuth2Cache cache = new InMemoryCache();
    final OAuth2Persister persister = MockUtils.getDummyPersister();
    final OAuth2Store store = MockUtils.getDummyStore(cache, persister, MockUtils.REDIRECT_URI);
    final BasicOAuth2Accessor accessor = new BasicOAuth2Accessor(MockUtils.GADGET_URI1,
        MockUtils.SERVICE_NAME, MockUtils.USER, MockUtils.SCOPE, true, store,
        MockUtils.REDIRECT_URI);
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return accessor;
  }

  protected static OAuth2Accessor getOAuth2Accessor_ClientCredentialsRedirecting() throws Exception {
    final OAuth2Cache cache = new InMemoryCache();
    final OAuth2Persister persister = MockUtils.getDummyPersister();
    final OAuth2Store store = MockUtils.getDummyStore(cache, persister, MockUtils.REDIRECT_URI);
    final BasicOAuth2Accessor accessor = new BasicOAuth2Accessor(MockUtils.GADGET_URI1,
        MockUtils.SERVICE_NAME, MockUtils.USER, MockUtils.SCOPE, true, store,
        MockUtils.REDIRECT_URI);
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return new DummySecurityToken(ownerId, viewerId, appUrl);
  }

  protected static OAuth2Store getDummyStore() throws Exception {
    if (MockUtils.dummyStore == null) {
      final OAuth2Cache cache = new InMemoryCache();
      final OAuth2Persister persister = MockUtils.getDummyPersister();
      final OAuth2Encrypter encrypter = MockUtils.getDummyEncrypter();
      final BlobCrypter stateCrypter = MockUtils.getDummyStateCrypter();
      MockUtils.dummyStore = MockUtils.getDummyStore(cache, persister, encrypter,
              MockUtils.REDIRECT_URI, null, null, stateCrypter);
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return accessToken;
  }

  private static BasicOAuth2Accessor getOAuth2AccessorCommon() throws Exception {
    final OAuth2Cache cache = new InMemoryCache();
    final OAuth2Persister persister = MockUtils.getDummyPersister();
    final OAuth2Encrypter encrypter = MockUtils.getDummyEncrypter();
    final OAuth2Store store = MockUtils.getDummyStore(cache, persister, encrypter,
            MockUtils.REDIRECT_URI, null, null, MockUtils.stateCrypter);
    final BasicOAuth2Accessor accessor = new BasicOAuth2Accessor(MockUtils.GADGET_URI1,
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return accessor;
  }

  protected static OAuth2Accessor getOAuth2Accessor_ClientCredentialsRedirecting() throws Exception {
    final OAuth2Cache cache = new InMemoryCache();
    final OAuth2Persister persister = MockUtils.getDummyPersister();
    final OAuth2Encrypter encrypter = MockUtils.getDummyEncrypter();
    final OAuth2Store store = MockUtils.getDummyStore(cache, persister, encrypter,
            MockUtils.REDIRECT_URI, null, null, MockUtils.stateCrypter);
    final BasicOAuth2Accessor accessor = new BasicOAuth2Accessor(MockUtils.GADGET_URI1,
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return new DummySecurityToken(ownerId, viewerId, appUrl);
  }

  protected static OAuth2Store getDummyStore() throws Exception {
    if (MockUtils.dummyStore == null) {
      final OAuth2Cache cache = new InMemoryCache();
      final OAuth2Persister persister = MockUtils.getDummyPersister();
      final OAuth2Encrypter encrypter = MockUtils.getDummyEncrypter();
      final BlobCrypter stateCrypter = MockUtils.getDummyStateCrypter();
      MockUtils.dummyStore = MockUtils.getDummyStore(cache, persister, encrypter,
              MockUtils.REDIRECT_URI, null, null, stateCrypter);
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return accessToken;
  }

  private static BasicOAuth2Accessor getOAuth2AccessorCommon() throws Exception {
    final OAuth2Cache cache = new InMemoryCache();
    final OAuth2Persister persister = MockUtils.getDummyPersister();
    final OAuth2Encrypter encrypter = MockUtils.getDummyEncrypter();
    final OAuth2Store store = MockUtils.getDummyStore(cache, persister, encrypter,
            MockUtils.REDIRECT_URI, null, null, MockUtils.stateCrypter);
    final BasicOAuth2Accessor accessor = new BasicOAuth2Accessor(MockUtils.GADGET_URI1,
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

    return accessor;
  }

  protected static OAuth2Accessor getOAuth2Accessor_ClientCredentialsRedirecting() throws Exception {
    final OAuth2Cache cache = new InMemoryCache();
    final OAuth2Persister persister = MockUtils.getDummyPersister();
    final OAuth2Encrypter encrypter = MockUtils.getDummyEncrypter();
    final OAuth2Store store = MockUtils.getDummyStore(cache, persister, encrypter,
            MockUtils.REDIRECT_URI, null, null, MockUtils.stateCrypter);
    final BasicOAuth2Accessor accessor = new BasicOAuth2Accessor(MockUtils.GADGET_URI1,
View Full Code Here

Examples of org.apache.shindig.gadgets.oauth2.persistence.sample.InMemoryCache

*/
public class BasicOAuth2StoreTest {

  @Test
  public void testSetTokenForSharedClient() throws Exception {
    final OAuth2Cache cache = new InMemoryCache();
    final OAuth2Persister persister = MockUtils.getDummyPersister();
    final OAuth2Encrypter encrypter = MockUtils.getDummyEncrypter();
    final BlobCrypter stateCrypter = MockUtils.getDummyStateCrypter();

    OAuth2Token token = MockUtils.getAccessToken();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.