Package org.apache.wink.json4j

Examples of org.apache.wink.json4j.JSONObject.optString()


        final boolean authorizationHeader = provider.optBoolean(AUTHORIZATION_HEADER, false);

        final boolean urlParameter = provider.optBoolean(URL_PARAMETER, false);

        String authorizationUrl = endpoints.optString(AUTHORIZATION_URL, null);

        if (this.authority != null && authorizationUrl != null) {
          authorizationUrl = authorizationUrl.replace("%authority%", this.authority.getAuthority());
          authorizationUrl = authorizationUrl.replace("%contextRoot%", this.contextRoot);
          authorizationUrl = authorizationUrl.replace("%origin%", this.authority.getOrigin());
View Full Code Here


          authorizationUrl = authorizationUrl.replace("%contextRoot%", this.contextRoot);
          authorizationUrl = authorizationUrl.replace("%origin%", this.authority.getOrigin());
          authorizationUrl = authorizationUrl.replace("%scheme%", this.authority.getScheme());
        }

        String tokenUrl = endpoints.optString(TOKEN_URL, null);
        if (this.authority != null && tokenUrl != null) {
          tokenUrl = tokenUrl.replace("%authority%", this.authority.getAuthority());
          tokenUrl = tokenUrl.replace("%contextRoot%", this.contextRoot);
          tokenUrl = tokenUrl.replace("%origin%", this.authority.getOrigin());
          tokenUrl = tokenUrl.replace("%scheme%", this.authority.getScheme());
View Full Code Here

      Set<String> keys = configJson.keySet();
      for(String key : keys) {
        JSONObject consumerInfo = configJson.getJSONObject(key);
       
        //BEGIN code from org.apache.shindig.gadgets.oauth.BasicOAuthStore.realStoreConsumerInfo
        String callbackUrl = consumerInfo.optString(CALLBACK_URL, null);
        if (callbackUrl != null) {
          callbackUrl = callbackUrl.replaceAll("%origin%", authority.getOrigin())
                                   .replaceAll("%contextRoot%", this.contextRoot);
        }
        String consumerSecret = consumerInfo.getString(CONSUMER_SECRET_KEY);
View Full Code Here

        }
        String consumerSecret = consumerInfo.getString(CONSUMER_SECRET_KEY);
        String consumerKey = consumerInfo.getString(CONSUMER_KEY_KEY);
        String keyTypeStr = consumerInfo.getString(KEY_TYPE_KEY);
        boolean oauthBodyHash = true;
        String oauthBodyHashString = consumerInfo.optString(OAUTH_BODY_HASH_KEY);
        if ("false".equalsIgnoreCase(oauthBodyHashString)) {
          oauthBodyHash = false;
        }
        KeyType keyType = KeyType.HMAC_SYMMETRIC;
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.