Hi mate, good thoughts, It makes a lot of sense!
I am totally +1 to your idea! Best, -Simo http://people.apache.org/~simonetripodi/ http://simonetripodi.livejournal.com/ http://twitter.com/simonetripodi http://www.99soft.org/ On Mon, Apr 8, 2013 at 9:56 AM, Antonio Sanso <[email protected]> wrote: > Hi Simone > > On Apr 8, 2013, at 9:52 AM, Simone Tripodi wrote: > > > Hi mate, > > > > thanks a lot for putting efforts on OpenID Connect - you rock!!! :) > > > > I just noticed that there is a build circular dependency across modules: > > org.apache.oltu.openidconnect.client depends by > > org.apache.oltu.oauth2.client, org.apache.oltu.oauth2.client-demo depends > > by org.apache.oltu.openidconnect.common... > > > > which reactor to invoke first? I think we are in the chicken-egg > problem... > > what about creating a proper demo in the OpenID Connect space? > > That would be easier also for users looking for a proper OpenID-Connect > > guideline/sample... > > WDYT? > > I thought the same actually. But rather to create two different demos: one > for OAuth 2 and one for OpenId Connect I would rather create a single one > that contains both use cases but outside the oauth2 modules. > > WDYT? > > Regards > > Antonio > > > > > All the best, have a nice day! > > -Simo > > > > http://people.apache.org/~simonetripodi/ > > http://simonetripodi.livejournal.com/ > > http://twitter.com/simonetripodi > > http://www.99soft.org/ > > > > > > On Sun, Apr 7, 2013 at 6:36 PM, <[email protected]> wrote: > > > >> Author: asanso > >> Date: Sun Apr 7 16:36:37 2013 > >> New Revision: 1465421 > >> > >> URL: http://svn.apache.org/r1465421 > >> Log: > >> OLTU-93 - Add OpenIdConnect flow to client demo > >> > >> Modified: > >> oltu/trunk/oauth-2.0/client-demo/pom.xml > >> > >> > oltu/trunk/oauth-2.0/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java > >> > >> Modified: oltu/trunk/oauth-2.0/client-demo/pom.xml > >> URL: > >> > http://svn.apache.org/viewvc/oltu/trunk/oauth-2.0/client-demo/pom.xml?rev=1465421&r1=1465420&r2=1465421&view=diff > >> > >> > ============================================================================== > >> --- oltu/trunk/oauth-2.0/client-demo/pom.xml (original) > >> +++ oltu/trunk/oauth-2.0/client-demo/pom.xml Sun Apr 7 16:36:37 2013 > >> @@ -48,6 +48,19 @@ > >> <artifactId>org.apache.oltu.oauth2.client</artifactId> > >> <version>${project.version}</version> > >> </dependency> > >> + > >> + <!-- OpenId Connect Dependency --> > >> + <dependency> > >> + <groupId>org.apache.oltu.openidconnect</groupId> > >> + <artifactId>org.apache.oltu.openidconnect.common</artifactId> > >> + <version>0.1-SNAPSHOT</version> > >> + </dependency> > >> + > >> + <dependency> > >> + <groupId>org.apache.oltu.openidconnect</groupId> > >> + <artifactId>org.apache.oltu.openidconnect.client</artifactId> > >> + <version>0.1-SNAPSHOT</version> > >> + </dependency> > >> > >> <!-- OAuth Dynamic Registration Dependency --> > >> > >> > >> Modified: > >> > oltu/trunk/oauth-2.0/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java > >> URL: > >> > http://svn.apache.org/viewvc/oltu/trunk/oauth-2.0/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java?rev=1465421&r1=1465420&r2=1465421&view=diff > >> > >> > ============================================================================== > >> --- > >> > oltu/trunk/oauth-2.0/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java > >> (original) > >> +++ > >> > oltu/trunk/oauth-2.0/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/TokenController.java > >> Sun Apr 7 16:36:37 2013 > >> @@ -37,6 +37,7 @@ import org.apache.oltu.oauth2.client.res > >> import org.apache.oltu.oauth2.common.exception.OAuthProblemException; > >> import org.apache.oltu.oauth2.common.exception.OAuthSystemException; > >> import org.apache.oltu.oauth2.common.message.types.GrantType; > >> +import > >> org.apache.oltu.openidconnect.client.response.OpenIdConnectResponse; > >> import org.springframework.stereotype.Controller; > >> import org.springframework.web.bind.annotation.ModelAttribute; > >> import org.springframework.web.bind.annotation.RequestMapping; > >> @@ -79,6 +80,8 @@ public class TokenController { > >> cl = GitHubTokenResponse.class; > >> } else if (Utils.GITHUB.equals(app)) { > >> cl = GitHubTokenResponse.class; > >> + }else if (Utils.GOOGLE.equals(app)){ > >> + cl = OpenIdConnectResponse.class; > >> } > >> > >> oauthResponse = client.accessToken(request, cl); > >> @@ -86,6 +89,10 @@ public class TokenController { > >> oauthParams.setAccessToken(oauthResponse.getAccessToken()); > >> oauthParams.setExpiresIn(oauthResponse.getExpiresIn()); > >> > >> > oauthParams.setRefreshToken(Utils.isIssued(oauthResponse.getRefreshToken())); > >> + > >> + if (Utils.GOOGLE.equals(app)){ > >> + > >> > oauthParams.setIdToken(((OpenIdConnectResponse)oauthResponse).getIdToken()); > >> + } > >> > >> return new ModelAndView("get_resource"); > >> > >> > >> > >> > >
