We're moving "shindig.signing.global-callback-uri" into container.js as
part of context root patch. We found there's already a similar property in
container.js called "gadgets.uri.oauth.callbackTemplate". The value of
these two property is the same. Is there any reason we can't use
gadgets.uri.oauth.callbackTemplate to replace
"shindig.signing.global-callback-uri"?
Here's the current usage about these two properties:
1. DefaultOauthUriManager -- use gadgets.uri.oauth.callbackTemplate
public Uri makeOAuthCallbackUri(String container, String host) {
String callback = config.getString(container,
OAUTH_GADGET_CALLBACK_URI_PARAM);
if (callback == null) {
return null;
}
return Uri.parse(callback.replace("%host%", host));
}
2. OAuthModule - use "shindig.signing.global-callback-uri"
public OAuthStoreProvider(
@Named(OAUTH_SIGNING_KEY_FILE) String signingKeyFile,
@Named(OAUTH_SIGNING_KEY_NAME) String signingKeyName,
ContainerConfig config) {
store = new BasicOAuthStore();
loadDefaultKey(signingKeyFile, signingKeyName);
store.setDefaultCallbackUrl(config.getString(ContainerConfig.
DEFAULT_CONTAINER, "shindig.signing.global-callback-url"));
loadConsumers();
this.config = config;
}
Thanks,
li