PowerUtils.AspNetCore.Authentication.BasicAuth
v1.1.2
該軟件包之所以停止,是因為它從未演變,並且此軟件包中存在的代碼不能證明其延續是合理的。如有必要,最好在項目中直接實現此代碼。該包將在2024/01/08之後完全刪除。
使用基本身份驗證的UTIL,助手,擴展和屬性
該軟件包可通過Nuget軟件包獲得:https://www.nuget.org/packages/powerutils.aspnetcore.authentication.basicauth
nuget
Install-Package PowerUtils.AspNetCore.Authentication.BasicAuth.NET CLI
dotnet add package PowerUtils.AspNetCore.Authentication.BasicAuth
屬性以限制使用基本身份驗證的控制器或操作的訪問
[ BasicAuthentication ]
[ ApiController ]
public class TestController : ControllerBase
{
[ HttpGet ]
public async Task < IActionResult > Get ( )
{
return this . Ok ( ) ;
}
} [ ApiController ]
public class TestController : ControllerBase
{
[ BasicAuthentication ]
[ HttpGet ]
public async Task < IActionResult > Get ( )
{
return this . Ok ( ) ;
}
} 如果您有任何疑問,評論或建議,請打開問題或創建拉請請求