Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed to FormsAuthenticationConfiguration.DisableRedirect

  • Loading branch information...
commit 5d50df77f797a117ded155b235760d3237bcf723 1 parent 9159e6a
@prabirshrestha prabirshrestha authored thecodejunkie committed
View
4 src/Nancy.Authentication.Forms.Tests/FormsAuthenticationFixture.cs
@@ -105,11 +105,11 @@ public void Should_add_a_pre_and_post_hook_when_enabled()
}
[Fact]
- public void Should_add_a_pre_hook_but_not_a_post_hook_when_EnableUnauthorizedLoginRedirect_is_false()
+ public void Should_add_a_pre_hook_but_not_a_post_hook_when_DisableRedirect_is_true()
{
var pipelines = A.Fake<IPipelines>();
- this.config.EnableUnauthorizedLoginRedirect = false;
+ this.config.DisableRedirect = true;
FormsAuthentication.Enable(pipelines, this.config);
A.CallTo(() => pipelines.BeforeRequest.AddItemToStartOfPipeline(A<Func<NancyContext, Response>>.Ignored))
View
2  src/Nancy.Authentication.Forms/FormsAuthentication.cs
@@ -58,7 +58,7 @@ public static void Enable(IPipelines pipelines, FormsAuthenticationConfiguration
currentConfiguration = configuration;
pipelines.BeforeRequest.AddItemToStartOfPipeline(GetLoadAuthenticationHook(configuration));
- if (configuration.EnableUnauthorizedLoginRedirect)
+ if (!configuration.DisableRedirect)
{
pipelines.AfterRequest.AddItemToEndOfPipeline(GetRedirectToLoginHook(configuration));
}
View
3  src/Nancy.Authentication.Forms/FormsAuthenticationConfiguration.cs
@@ -24,7 +24,6 @@ public FormsAuthenticationConfiguration(CryptographyConfiguration cryptographyCo
{
CryptographyConfiguration = cryptographyConfiguration;
RedirectQuerystringKey = DefaultRedirectQuerystringKey;
- EnableUnauthorizedLoginRedirect = true;
}
/// <summary>
@@ -51,7 +50,7 @@ public FormsAuthenticationConfiguration(CryptographyConfiguration cryptographyCo
/// <summary>
/// Gets or sets whether to redirect to login page during unauthorized access.
/// </summary>
- public bool EnableUnauthorizedLoginRedirect { get; set; }
+ public bool DisableRedirect { get; set; }
/// <summary>
/// Gets or sets the cryptography configuration
Please sign in to comment.
Something went wrong with that request. Please try again.