> On 2011-07-08 14:25:14, Henry Saputra wrote: > > Isnt this fix reverse the change for > > https://issues.apache.org/jira/browse/SHINDIG-1503? > > Ryan Baxter wrote: > I don't think so....looks like that patch added > CommonContainerSecurityTokenCodec, if I am reading the patch file from that > issue correctly.... > > Henry Saputra wrote: > basically the CommonContainerSecurityTokenCodec just copy from > DefaultSecurityTokenCodec for basic with this change: > > public SecurityToken createToken(Map<String, String> tokenParameters) > throws SecurityTokenException { > TestSecurityTokenCodec testSecurityToken = new > TestSecurityTokenCodec(); > return testSecurityToken; > } > > so it returns TestSecurityTokenCodec (should have been called > TestSecurityToken) instead of st from basic or blob codec. > > by changing it to "return codec.createToken(tokenParameters);" it now > behaves the same with DefaultSecurityTokenCodec. > > Ryan Baxter wrote: > Ah ok I didn't look at the super class....sounds like your right. If > thats the case then we shouldn't be able to render gadgets in the common > container with this patch. I know Han was getting an error before she made > this change. > > Sumedha, did you try rendering some gadgets in the common container with > this patch applied? > > Sumedha Kodithuwakku wrote: > Yes. They are not rendering in the common container. If > TestSecurityTokenCodec is used oauth gadgets are not working but normal > gadgets are working. I'm looking into this problem. > > Henry Saputra wrote: > Could you try this: > 1. Remove the common container module from web.xml: > > Index: java/server/src/main/webapp/WEB-INF/web.xml > =================================================================== > --- java/server/src/main/webapp/WEB-INF/web.xml (revision 1144175) > +++ java/server/src/main/webapp/WEB-INF/web.xml (working copy) > @@ -38,8 +38,7 @@ > org.apache.shindig.common.cache.ehcache.EhCacheModule: > org.apache.shindig.sample.shiro.ShiroGuiceModule: > org.apache.shindig.sample.container.SampleContainerGuiceModule: > - org.apache.shindig.extras.ShindigExtrasGuiceModule: > - > org.apache.shindig.sample.commoncontainer.auth.CommonContainerAuthGuiceModule > + org.apache.shindig.extras.ShindigExtrasGuiceModule > </param-value> > > 2. Add setting sample ST for common container assembler.js to override > the one from ShindigAuthConfigContributor: > > Index: content/samplecontainer/examples/commoncontainer/assembler.js > =================================================================== > --- content/samplecontainer/examples/commoncontainer/assembler.js > (revision 1144175) > +++ content/samplecontainer/examples/commoncontainer/assembler.js > (working copy) > @@ -28,6 +28,9 @@ > // Create the new CommonContainer > var CommonContainer = new osapi.container.Container(testConfig); > > +//Default the security token for testing. > > +shindig.auth.updateSecurityToken('john.doe:john.doe:appid:cont:url:0:default'); > + > // Need to pull these from values supplied in the dialog > CommonContainer.init = function() { > //Create my new managed hub > > This will allow OAuthRequest to use DefaultSecurityTokenCodec and request > for gadget metadata to work with sample ST.
I tried this and It's successful. Now all the things work fine. I tested with both sample container and common container. Also there are no problems with normal gadgets too. - Sumedha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1029/#review1005 ----------------------------------------------------------- On 2011-07-08 05:29:55, Sumedha Kodithuwakku wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/1029/ > ----------------------------------------------------------- > > (Updated 2011-07-08 05:29:55) > > > Review request for shindig, Ryan Baxter and Agustin Casiva. > > > Summary > ------- > > Although the OAuth consumer details are properly inserted into the oauth.json > file, when running an example OAuth gadget in the sample container the > following error comes out. This is happening in the current trunk revision > and it works fine with 2.0.0 release. > > "Something went wrong: Could not fetch gadget spec ==== Original request: GET > /m8/feeds/contacts/default/base?alt=json Host: www.google.com > X-Shindig-AuthType: oauth X-Forwarded-For: 0:0:0:0:0:0:0:1 X-shindig-dos: on > ====" > > Modified the createToken() method in CommonContainerSecurityTokenCodec to use > the codec which has been created already. > > Link to JIRA Issue : https://issues.apache.org/jira/browse/SHINDIG-1556 > > > Diffs > ----- > > > http://svn.apache.org/repos/asf/shindig/trunk/java/server/src/main/java/org/apache/shindig/sample/commoncontainer/auth/CommonContainerSecurityTokenCodec.java > 1142914 > > Diff: https://reviews.apache.org/r/1029/diff > > > Testing > ------- > > Tested with two OAuth gadgets. Need more testing. > > > Thanks, > > Sumedha > >
