Hello
May you please look at the issue:
You may test Yahoo sreg at "https://test-id.org/OP/Sreg.aspx"
ID : "https://me.yahoo.com/" username: [email protected] password: paranoid
Now the problem
This code work with Google but not with Yahoo sreg, becase response.GetUntrustedExtension() alwase returns null values for properties for Yahoo
var opUrl = LoginCore.GetProviderUrl(provider, openId);
var openIdRelyingParty = new OpenIdRelyingParty(null);
var response = openIdRelyingParty.GetResponse();
Identifier id;
if (response == null)
{
if (Identifier.TryParse(opUrl, out id))
{
try
{
var claim = new ClaimsRequest();
claim.Email = DemandLevel.Require;
claim.FullName = DemandLevel.Request;
claim.Gender = DemandLevel.Request;
claim.Nickname = DemandLevel.Require;
var request = openIdRelyingParty.CreateRequest(opUrl);
request.AddExtension(claim);
return request.RedirectingResponse.AsActionResult();
}
catch (Exception ex)
{
}
}
else
{
Model.Errors.Add(GeneralErrors.Unexpected());
return View("SignupUnTrustedOpenId");
}
}
else
{
switch (response.Status)
{
case AuthenticationStatus.Authenticated:
var claimsData = response.GetUntrustedExtension<ClaimsResponse>();
if (claimsData != null)
{
email = claimsData.Email;
I am using folowing configuration:
<dotNetOpenAuth>
<openid>
<relyingParty>
<security requireSsl="false" ignoreUnsignedExtensions="false" maximumHashBitLength="256" minimumHashBitLength="160" rejectDelegatingIdentifiers="true" rejectUnsolicitedAssertions="false" requireAssociation="false" requireDirectedIdentity="false" />
<behaviors>
<add type="DotNetOpenAuth.OpenId.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth" />
</behaviors>
</relyingParty>
</openid>
<messaging>
<untrustedWebRequest>
<whitelistHosts>
<add name="localhost" />
</whitelistHosts>
</untrustedWebRequest>
</messaging>
</dotNetOpenAuth>
I am using the latiest version 3.2.0.9177
Thank you very much for help
Vitaly