-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow suppress WWWAuthenticate header for Ajax requests.
- Loading branch information
Showing
10 changed files
with
95 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/ZNetCS.AspNetCore.Authentication.Basic/AjaxRequestOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
// <copyright file="AjaxRequestOptions.cs" company="Marcin Smółka zNET Computer Solutions"> | ||
// Copyright (c) Marcin Smółka zNET Computer Solutions. All rights reserved. | ||
// </copyright> | ||
// <summary> | ||
// The ajax request options. | ||
// </summary> | ||
// -------------------------------------------------------------------------------------------------------------------- | ||
|
||
namespace ZNetCS.AspNetCore.Authentication.Basic | ||
{ | ||
/// <summary> | ||
/// The ajax request options. | ||
/// </summary> | ||
public class AjaxRequestOptions | ||
{ | ||
#region Public Properties | ||
|
||
/// <summary> | ||
/// Gets or sets the ajax request header name. | ||
/// </summary> | ||
public string HeaderName { get; set; } = BasicAuthenticationDefaults.AjaxRequestHeaderName; | ||
|
||
/// <summary> | ||
/// Gets or sets the ajax request header value. | ||
/// </summary> | ||
public string HeaderValue { get; set; } = BasicAuthenticationDefaults.AjaxRequestHeaderValue; | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether suppress sending the WWWAuthenticate response header when a request has the | ||
/// header (X-Requested-With,XMLHttpRequest). | ||
/// </summary> | ||
public bool SuppressWwwAuthenticateHeader { get; set; } = false; | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters