public IEnumerable<IAuthenticationRequest> CreateRequests(Identifier userSuppliedIdentifier, Realm realm, Uri returnTo, Uri privacyPolicy)
{
if (userSuppliedIdentifier == null)
{
throw new ArgumentNullException("userSuppliedIdentifier");
}
if (realm == null)
{
throw new ArgumentNullException("realm");
}
if (returnTo == null)
{
throw new ArgumentNullException("returnTo");
}
var requests = relyingParty.CreateRequests(userSuppliedIdentifier, realm, returnTo);
foreach (IAuthenticationRequest request in requests)
{
// Ask for the user's email, not because we necessarily need it to do our work,
// but so we can display something meaningful to the user as their "username"
// when they log in with a PPID from Google, for example.
request.AddExtension(new ClaimsRequest
{
Email = DemandLevel.Require,
FullName = DemandLevel.Request,
PolicyUrl = privacyPolicy,
});
yield return request;
}
}