Sign in Sign up
nuget

ZAExtensions.ZAAuth

ZAExtensions.ZAAuth is a extension of for create a simple authenticate cookie in WepApis.'s projects. In your appsetting you need add this code: "ZToken": "[YourTokenName] In your startup.cs you need add this code: // Http cookies and auth services.AddHttpContextAccessor(); services.AddScoped<IZTokens, ZTokens>(); services.AddAuthentication(za => { za.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; za.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme; }).AddCookie(za => { za.Cookie.Name = [YourTokenName]; za.Cookie.HttpOnly = false; za.Cookie.SameSite = SameSiteMode.Unspecified; }); app.UseCors( options => options.AllowAnyHeader() .AllowAnyMethod() .AllowAnyOrigin() );

nuget View on Nuget

Activity

Latest release
1y ago
Total releases
9
Cadence
~3 months
Last 12 months
0

Details

First release
May 07, 2021
Releases
Version Released
2.1.0 minor
2.0.1 patch
2.0.0 major
1.2.2 patch
1.2.1 patch
1.2.0 minor
1.1.2 patch
1.1.1 patch
1.1.0 initial