Using Claims in your Web App is Easier with the new OWIN Security Components
There's a good reference to OWIN in the above.
WS-Federation in Microsoft OWIN Components–a quick start
But what the article doesn't show is how to display the claims.
Dominick blogged on this:
Test driving the WS-Federation Authentication Middleware for Katana
Horrible hack below - yeah I know! - I put it in the About page in the HomeController ...
public ActionResult About()
{
ViewBag.Message = "Your application description page.";
var ctx = Request.GetOwinContext();
var user = ctx.Authentication.User;
var response = ctx.Response;
response.ContentType = "text/html";
if (user.Identity.IsAuthenticated)
{
... code as above
}
Enjoy!
No comments:
Post a Comment