Examples of OAuth2GadgetBinding


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

        final String gadgetServiceName = (String) i.next();
        final JSONObject settings = bindings.getJSONObject(gadgetServiceName);
        final String clientName = settings.getString(CLIENT_NAME);
        final boolean allowOverride = settings
                .getBoolean(ALLOW_MODULE_OVERRIDE);
        final OAuth2GadgetBinding gadgetBinding = new OAuth2GadgetBinding(null,
                gadgetServiceName, clientName, allowOverride);

        ret.put(gadgetBinding.getGadgetServiceName(), gadgetBinding);
      }


    } catch (final JSONException e) {
      LOG.logp(Level.WARNING, CLAZZ, method, "Exception while loading gadget bindings.", e);
View Full Code Here

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

  }

  @Test
  public void testLoadGadgetBindings() throws OAuth2PersistenceException {
    Map<String, OAuth2GadgetBinding> bindings = this.persister.loadGadgetBindings();
    assertEquals(new OAuth2GadgetBinding(null, "binding1", "name1", true), bindings.get("binding1"));
    assertEquals(new OAuth2GadgetBinding(null, "binding2", "name2", false), bindings.get("binding2"));
    assertNull(bindings.get("binding3"));
  }
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.