views:

164

answers:

2

Hi,

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 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?

Any help would be appreciated

Ariel

A: 

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

Andrew Arnott
A: 

Yes Andrew. That example works perfect, 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 did't find a similar behevior in MVC.

Thanks you a lot!

Ariel

Ariel Szk
Did you translate the webforms sample to MVC? Mind posting the code? Thanks.
Roberto Bonini