WP7 OpenID

Topics: General
Dec 26, 2010 at 6:26 PM

Got WP7 OpenID Sample code below.

http://phone7.wordpress.com/2010/07/30/sevenauth-openid-for-wp7-devs-source-code/

I am able to get the OpenID from Phone App.

How should i pass data to webservice to create a session using community openid?

Should i pass an OpenID object?

The OpenIDFacade has a HandleSuccessfulSignIn sub routine but not accessible from external.

I guess i can implement my own however i would like to wire it to a Community.OpenID object for further use.

Any insight would be greatful.

Thanks

Minh

Dec 27, 2010 at 6:42 PM

I am trying to implement HandleSuccessfulSignIn in webservice.

getting error when i try to search for the data

OpenIDs ds = Queryable.Where<OpenIDs>(DataFacade.GetData<OpenIDs>(), Expression.Lambda<Func<OpenIDs, bool>>(Expression.Equal(Expression.Property(expression = Expression.Parameter(typeof(OpenIDs), "o"), (MethodInfo)methodof(OpenIDs.get_Url)), Expression.Constant(claimedIdentifier), false, (MethodInfo)methodof(string.op_Equality)), new ParameterExpression[] { expression })).FirstOrDefault<OpenIDs>();

Error : the name methodof does not exists in the current context

googleling methodof

http://stackoverflow.com/questions/3858247/why-cant-i-create-the-same-expression-tree-manually-that-my-straight-lambda-prod

"methodof is not an actual operator"

Am i missing somehing.

Should i try to implement methodof.

Minh

Coordinator
Dec 27, 2010 at 9:34 PM

Hi

I'm not familiar with OpenID functionality, but I can help with the last question


It looks like you're using .NET Reflector to get the sources. The methodof() construction isn't a part of C#, it is rather the way Reflector tries to show disassembled lambda expressions.

What you should do in this case is try to guess what the original lambda expression looked like.


In this case it was something like:
OpenIDs ds = DataFacade.GetData<OpenIDs>().Where(o => o.Url == claimedIdentifier).FirstOrDefault();

Dec 28, 2010 at 2:50 PM

Thank you for your quick reply.

Looks like i need to read up on reflection.

Great platform C1 is. Can't wait to see it on SQL Server.

Looking forward to demo it at work.

Thanks again.

Minh

Dec 28, 2010 at 3:46 PM
Edited Dec 28, 2010 at 3:49 PM

Despite its similarity in names, Reflector is not using reflection to show you a glimpse of the original code of a .Net assembly. Its creating the c#/vb.net,f#,mc++ etc. representation out of pure IL, which is why you can get pretty far by obfuscation, which will screw up the IL in a way that Reflector has a hard time decompiling it.

Reflection works on the metadata information which is present in every assembly and doesn't get affected by obfuscation.

Aug 5, 2011 at 12:30 AM

did you get your OpenID implementation working using the library?

Aug 5, 2011 at 2:25 PM

I got it to work.

Unfortunately it returns a different id from the one that is created at the cms.

http://www.k2em.com/content/common/openid.zip

Perhaps you can figure out why.

I have not had the time since trying to port over a social network to c1 mvc application.

If you like more info here is my lastest issue on mvc i am running into.

http://compositec1.codeplex.com/discussions/267471

Minh