diff options
Diffstat (limited to 'src/DotNetOpenId.TestWeb/ProviderEndpoint.aspx.cs')
-rw-r--r-- | src/DotNetOpenId.TestWeb/ProviderEndpoint.aspx.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/DotNetOpenId.TestWeb/ProviderEndpoint.aspx.cs b/src/DotNetOpenId.TestWeb/ProviderEndpoint.aspx.cs index 098a812..8eab9c7 100644 --- a/src/DotNetOpenId.TestWeb/ProviderEndpoint.aspx.cs +++ b/src/DotNetOpenId.TestWeb/ProviderEndpoint.aspx.cs @@ -5,6 +5,7 @@ using DotNetOpenId.Extensions.SimpleRegistration; using SregDemandLevel = DotNetOpenId.Extensions.SimpleRegistration.DemandLevel;
using DotNetOpenId.Extensions.ProviderAuthenticationPolicy;
using System.Globalization;
+using DotNetOpenId;
public partial class ProviderEndpoint : System.Web.UI.Page {
const string nicknameTypeUri = WellKnownAttributes.Name.Alias;
@@ -101,17 +102,21 @@ public partial class ProviderEndpoint : System.Web.UI.Page { }
protected void ProviderEndpoint1_AuthenticationChallenge(object sender, DotNetOpenId.Provider.AuthenticationChallengeEventArgs e) {
- TestSupport.Scenarios scenario = (TestSupport.Scenarios)Enum.Parse(typeof(TestSupport.Scenarios),
- new Uri(e.Request.LocalIdentifier.ToString()).AbsolutePath.TrimStart('/'));
if (!e.Request.IsReturnUrlDiscoverable) {
throw new ArgumentException(string.Format(CultureInfo.CurrentCulture,
"return_to could not be verified using RP discovery realm {0}.", e.Request.Realm));
}
+ TestSupport.Scenarios scenario = (TestSupport.Scenarios)Enum.Parse(typeof(TestSupport.Scenarios),
+ new Uri(e.Request.LocalIdentifier).AbsolutePath.TrimStart('/'));
switch (scenario) {
case TestSupport.Scenarios.AutoApproval:
// immediately approve
e.Request.IsAuthenticated = true;
break;
+ case TestSupport.Scenarios.AutoApprovalAddFragment:
+ e.Request.SetClaimedIdentifierFragment("frag");
+ e.Request.IsAuthenticated = true;
+ break;
case TestSupport.Scenarios.ApproveOnSetup:
e.Request.IsAuthenticated = !e.Request.Immediate;
break;
|