Forge.Security.Jwt.Client.Storage.Browser
1.3.0
See the version list below for details.
dotnet add package Forge.Security.Jwt.Client.Storage.Browser --version 1.3.0
NuGet\Install-Package Forge.Security.Jwt.Client.Storage.Browser -Version 1.3.0
<PackageReference Include="Forge.Security.Jwt.Client.Storage.Browser" Version="1.3.0" />
paket add Forge.Security.Jwt.Client.Storage.Browser --version 1.3.0
#r "nuget: Forge.Security.Jwt.Client.Storage.Browser, 1.3.0"
// Install Forge.Security.Jwt.Client.Storage.Browser as a Cake Addin #addin nuget:?package=Forge.Security.Jwt.Client.Storage.Browser&version=1.3.0 // Install Forge.Security.Jwt.Client.Storage.Browser as a Cake Tool #tool nuget:?package=Forge.Security.Jwt.Client.Storage.Browser&version=1.3.0
Forge.Security.Jwt.Client.Storage.Browser
Forge.Security.Jwt.Client.Storage.Browser is a library extension that provides access to the browsers local and session storage APIs for WASM applications.
Installing
To install the package add the following line to you csproj file replacing x.x.x with the latest version number:
<PackageReference Include="Forge.Security.Jwt.Client.Storage.Browser" Version="x.x.x" />
You can also install via the .NET CLI with the following command:
dotnet add package Forge.Security.Jwt.Client.Storage.Browser
If you're using Visual Studio you can also install via the built in NuGet package manager.
Setup
You will need to register the local storage services with the service collection in your Startup.cs file in Blazor Server.
public void ConfigureServices(IServiceCollection services)
{
// ... preinitialization steps
// always add this code after the "Forge.Security.Jwt.Client" library initialization
services.AddForgeJwtClientAuthenticationCoreWithLocalStorage();
services.AddForgeJwtClientAuthenticationCoreWithSessionStorage();
}
Or in your Program.cs file in Blazor WebAssembly.
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
builder.Services.AddForgeJwtClientAuthenticationCoreWithLocalStorage();
builder.Services.AddForgeJwtClientAuthenticationCoreWithSessionStorage();
await builder.Build().RunAsync();
}
Registering services as Singleton
If you would like to register Storage Provider services as singletons, it is possible by using the following method:
builder.Services.AddForgeJwtClientAuthenticationCoreAsSingletonWithLocalStorage();
builder.Services.AddForgeJwtClientAuthenticationCoreAsSingletonWithSessionStorage();
This method is not recommended in the most cases, try to avoid using it.
Please also check the following projects in my repositories:
- Forge.Yoda
- Forge.Security.Jwt.Service
- Forge.Security.Jwt.Service.Storage.SqlServer
- Forge.Security.Jwt.Client
- Forge.Security.Jwt.Client.Storage.Browser
- Forge.Wasm.BrowserStorages
- Forge.Wasm.BrowserStorages.NewtonSoft.Json
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Forge.Security.Jwt.Shared (>= 1.7.0)
- Forge.Wasm.BrowserStorages (>= 1.0.3)
-
.NETStandard 2.0
- Forge.Security.Jwt.Shared (>= 1.7.0)
- Forge.Wasm.BrowserStorages (>= 1.0.3)
-
net6.0
- Forge.Security.Jwt.Shared (>= 1.7.0)
- Forge.Wasm.BrowserStorages (>= 1.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.