asp.net mvc 3 - MVC3 + WIF - FederationResult missing "wctx" -


i have mvc3 app want implement claims support. goal follows:

  1. provide signin link, when clicked displays popup window username/password , facebook/windowslive/google etc. links

  2. automatically redirect signin page when protected controller accessed e.g. /order/delete

i've set application , providers in appfabriclabs.com , included sts in project. i've created implementation of iauthorizationfilter can mark controllers [wifauth] , onauthorization method called. i've implemented use-case visitor has not been authenticated this:

    private static void authenticateuser(authorizationcontext context)     {         var fam = federatedauthentication.wsfederationauthenticationmodule;         var signin = new signinrequestmessage(new uri(fam.issuer), fam.realm);         context.result = new redirectresult(signin.writequerystring());     } 

and appfabriclabs page identity provider choices (haven't figured out how customise page). when log in returnurl gets called land in controller method /home/federationresult, form posted me contains wa , wresult fields need wctx know send user... haven't been able figure out why.

the wresult xml document contains (amongst bzillion other things) name , e-mail address of user logging in sadly not contain url user headed.

have failed configure or off base? thoughts anyone?

  • e

just specify context signinrequestmessage:

signin.context = httpcontext.current.request.rawurl; 

the wctx parameter included in every request/response , part of form posted site.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -