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() );
Activity
- Latest release
- 1y ago
- Total releases
- 9
- Cadence
- ~3 months
- Last 12 months
- 0
Details
- First release
- May 07, 2021
| Version | Released | |
|---|---|---|
2.1.0
minor
|
2.1.0
minor
Dependencies (5)
|
|
2.0.1
patch
|
2.0.1
patch
Dependencies (5)
|
|
2.0.0
major
|
2.0.0
major
Dependencies (5)
|
|
1.2.2
patch
|
1.2.2
patch
Dependencies (5)
|
|
1.2.1
patch
|
1.2.1
patch
Dependencies (5)
|
|
1.2.0
minor
|
1.2.0
minor
Dependencies (5)
|
|
1.1.2
patch
|
1.1.2
patch
Dependencies (5)
|
|
1.1.1
patch
|
1.1.1
patch
Dependencies (5)
|
|
1.1.0
initial
|
1.1.0
initial
Dependencies (5)
|