laget.PskAuthentication.Client
2.1.3
Prefix Reserved
See the version list below for details.
dotnet add package laget.PskAuthentication.Client --version 2.1.3
NuGet\Install-Package laget.PskAuthentication.Client -Version 2.1.3
<PackageReference Include="laget.PskAuthentication.Client" Version="2.1.3" />
paket add laget.PskAuthentication.Client --version 2.1.3
#r "nuget: laget.PskAuthentication.Client, 2.1.3"
// Install laget.PskAuthentication.Client as a Cake Addin
#addin nuget:?package=laget.PskAuthentication.Client&version=2.1.3
// Install laget.PskAuthentication.Client as a Cake Tool
#tool nuget:?package=laget.PskAuthentication.Client&version=2.1.3
laget.PskAuthentication
Generic implementation of Secure Pre-Shared Key (PSK) Authentication for laget.se using AES.
Configuration
This example is shown using Autofac since this is the go-to IoC for us.
public class OptionModule : Module
{
readonly IConfiguration _configuration;
public OptionModule(IConfiguration configuration)
{
_configuration = configuration;
}
protected override void Load(ContainerBuilder builder)
{
builder.Register(c => new PskAuthenticationAttribute(new PskAuthenticationOptions
{
Key = _configuration.GetValue<string>("Security:Key"),
IV = _configuration.GetValue<string>("Security:IV"),
Salt = _configuration.GetValue<string>("Security:Salt"),
Secret = _configuration.GetValue<string>("Security:Secret")
})).AsSelf();
}
}
appsettings.json
"Security": {
"Key": "...",
"IV": "...",
"Salt": "...",
"Secret": "..."
}
Usage
Controller
[PskAuthentication]
public class SomeController : ControllerBase
{
}
Aes
You can generate the necessary Aes properties via the code below or visit https://rextester.com/RMKPPK46300
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Security.Cryptography;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
var aes = Aes.Create();
aes.Mode = CipherMode.CBC;
aes.Padding = PaddingMode.PKCS7;
aes.GenerateIV();
aes.GenerateKey();
Console.WriteLine(Convert.ToBase64String(aes.IV));
Console.WriteLine(Convert.ToBase64String(aes.Key));
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.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. |
-
.NETStandard 2.0
- laget.Cryptography (>= 0.1.3)
-
.NETStandard 2.1
- laget.Cryptography (>= 0.1.3)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on laget.PskAuthentication.Client:
Package | Downloads |
---|---|
laget.Youcal.Integration.Sdk
Software Development Kit (SDK) for the integration between laget.se and Youcal. |
|
laget.SFI.Sdk
This is the Software Development Kit (SDK) for the integration between laget.se and sports associations. |
|
laget.Payment.System.Sdk
This is the Software Development Kit (SDK) for the integration between laget.se and payment providers. |
|
laget.Newbody.Integration.Sdk
This is the Software Development Kit (SDK) for the integration between laget.se and Newbody. |
|
laget.Kakservice.Integration.Sdk
This is the Software Development Kit (SDK) for the integration between laget.se and Kakservice. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.2.5 | 1,165 | 2/9/2024 |
2.1.4 | 816 | 1/20/2024 |
2.1.3 | 5,140 | 9/28/2023 |
2.0.1 | 1,801 | 9/19/2023 |
1.0.25 | 6,787 | 3/10/2023 |
1.0.24 | 696 | 3/10/2023 |
1.0.23 | 3,355 | 12/5/2022 |
1.0.22 | 5,344 | 10/27/2022 |
1.0.21 | 908 | 7/8/2022 |
1.0.20 | 7,687 | 2/9/2022 |
1.0.18 | 942 | 8/16/2021 |
1.0.17 | 1,114 | 7/5/2021 |
1.0.16 | 4,777 | 4/6/2021 |
1.0.15 | 849 | 3/5/2021 |
1.0.14 | 987 | 2/1/2021 |
1.0.13 | 4,232 | 12/23/2020 |
1.0.12 | 1,219 | 12/22/2020 |
1.0.11 | 969 | 12/16/2020 |
1.0.10 | 1,730 | 12/12/2020 |
1.0.9 | 1,005 | 12/12/2020 |
1.0.8 | 959 | 12/11/2020 |