开发者

DotNetOpenAuth + MVC2 + Google App Standard

I'm trying to authenticate users to my ASP.Net MVC2 app throw a google apps standard edition account. I could not found examples nor documentation to achieving. I looked into DotNetOpenAuth Samples Solution, but did not found an example according my needs. All the examples were working against google accounts, but no with google apps.

I'm a little confused. For example:

  1. Do开发者_StackOverflow社区 I have to place an xrds document on my site, or I can rely on google account's one (like "https://www.google.com/accounts/o8/.well-known/host-meta?hd=example.com"?)
  2. What about the certificate. Do I have to place it in my site?


Have you looked at the OpenIdRelyingPartyWebForms/loginGoogleApps.aspx sample?


Andrew's example works perfectly and it is using a Discovery Service providing a UseGoogleHostedHostMeta = true to the OpenIdRelyingParty class.

HostMetaDiscoveryService GoogleAppsDiscovery = new HostMetaDiscoveryService { UseGoogleHostedHostMeta = true };
...
relyingParty = new OpenIdRelyingParty();
relyingParty.DiscoveryServices.Insert(0, GoogleAppsDiscovery);

I didn't find a similar behavior in MVC.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜