A2v10.Identity.ApiKey 10.1.8570

dotnet add package A2v10.Identity.ApiKey --version 10.1.8570
                    
NuGet\Install-Package A2v10.Identity.ApiKey -Version 10.1.8570
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="A2v10.Identity.ApiKey" Version="10.1.8570" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="A2v10.Identity.ApiKey" Version="10.1.8570" />
                    
Directory.Packages.props
<PackageReference Include="A2v10.Identity.ApiKey" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add A2v10.Identity.ApiKey --version 10.1.8570
                    
#r "nuget: A2v10.Identity.ApiKey, 10.1.8570"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package A2v10.Identity.ApiKey@10.1.8570
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=A2v10.Identity.ApiKey&version=10.1.8570
                    
Install as a Cake Addin
#tool nuget:?package=A2v10.Identity.ApiKey&version=10.1.8570
                    
Install as a Cake Tool

About

A2v10.Identity.ApiKey allows the ApiKey authorization for the A2v10 platform applications.

How to use

The ApiKey may be plain text (KeyType.ApiKey) or contain encoded user claims (KeyType.EncodedClaims).

If you use KeyType.EncodedClaims, you must specify the encryption key and vector.

Use

ApiKeyUserHelper<T>.GenerateApiKey(User, Сonfiguration)

for generate encoded ApiKey.

// T - type of user identifier
.AddApiKeyAuthorization<T>(options => {
    // options is read only
});

// configure
services.Configure<ApiKeyConfigurationOptions>(options =>
{
	options.KeyType = KeyType.EncodedClaims; /* or KeyType.ApiKey */
	/* for KeyType.EncodedClaims */
	options.AesEncryptKey = "Aes_Encrypt_Key";
	options.AesEncryptVector = "Aes_Encrypt_Vector";
	options.SkipCheckUser = true;
	/* or */
	options.Configure<Int64>(KeyType.EncodedClaims, Configuration);
});

appsettings.json (for KeyType.EncodedClaims)

"AesEncrypt": {
	"Key": "my_encrypt_key_1", /* 16 chars min */
	"Vector": "my_encrypt_vector_1" /* 16 chars min */
}

Feedback

A2v10.Identity.ApiKey is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.8570 252 8/28/2025
10.1.8566 181 8/18/2025
10.1.8565 166 8/12/2025
10.1.8563 324 7/26/2025
10.1.8558 240 6/19/2025
10.1.8554 268 6/9/2025
10.1.8553 167 6/4/2025
10.1.8551 143 5/30/2025
10.1.8549 214 5/20/2025
10.1.8547 257 5/14/2025
10.1.8545 170 5/7/2025
10.1.8542 152 4/25/2025
10.1.8540 230 4/21/2025
10.1.8534 287 3/10/2025
10.1.8529 199 2/25/2025
10.1.8526 194 2/16/2025
10.1.8521 180 2/8/2025
10.1.8510 242 1/18/2025
10.1.8508 168 1/11/2025
10.1.8506 166 1/8/2025
10.1.8504 174 12/21/2024
10.1.8503 196 12/5/2024
10.1.8500 163 11/19/2024
10.1.8363 196 11/3/2024
10.1.8360 201 10/25/2024
10.1.8358 161 10/25/2024
10.1.8351 196 10/9/2024
10.1.8348 155 10/5/2024
10.1.8347 177 10/1/2024
10.1.8346 172 9/29/2024
10.1.8341 201 9/6/2024
10.1.8340 140 9/2/2024
10.1.8339 197 8/24/2024
10.1.8338 181 8/23/2024
10.1.8332 151 8/7/2024
10.1.8328 146 7/31/2024
10.1.8327 140 7/25/2024
10.1.8325 137 7/23/2024
10.1.8322 173 7/17/2024
10.1.8319 160 7/10/2024
10.1.8315 157 7/5/2024
10.1.8306 217 6/20/2024
10.1.8305 158 6/18/2024
10.1.8303 153 6/13/2024
10.1.8301 158 6/8/2024
10.1.8296 180 5/28/2024
10.1.8295 156 5/28/2024
10.1.8286 175 5/14/2024
10.1.8282 179 5/8/2024
10.1.8280 211 4/26/2024
10.1.8276 216 4/15/2024
10.1.8275 187 4/7/2024
10.1.8271 203 3/30/2024
10.1.8268 216 3/18/2024
10.1.8267 172 3/18/2024
10.1.8266 165 3/16/2024
10.1.8261 212 3/8/2024
10.1.8259 198 2/28/2024
10.1.8255 159 2/25/2024
10.1.8251 165 2/23/2024
10.1.8235 197 2/3/2024
10.1.8233 186 1/30/2024
10.1.8226 189 1/18/2024
10.1.8222 187 1/11/2024
10.1.8220 184 1/10/2024
10.1.8214 203 1/2/2024
10.1.8213 187 12/31/2023
10.1.8198 181 12/21/2023
10.1.8188 201 12/9/2023
10.1.8186 181 11/29/2023
10.1.8184 161 11/24/2023
10.1.8183 175 11/23/2023
10.1.8180 177 11/18/2023
10.1.8171 204 11/9/2023
10.1.8168 188 11/6/2023
10.1.8159 173 9/27/2023
10.1.8152 229 9/11/2023
10.1.8150 221 9/3/2023
10.1.8147 234 9/2/2023
10.1.8143 283 8/22/2023
10.1.8134 260 8/5/2023
10.1.8126 255 7/25/2023
10.1.8114 280 7/7/2023
10.1.8109 287 6/12/2023
10.1.8097 297 4/21/2023
10.1.8096 278 4/10/2023
10.1.8095 308 4/9/2023
10.1.8094 267 4/9/2023
10.1.8093 323 3/22/2023
10.1.8092 340 3/12/2023
10.1.8091 296 3/7/2023
10.1.8090 338 3/7/2023
10.1.8089 343 3/2/2023
10.1.8088 373 2/10/2023
10.1.8087 382 1/31/2023
10.1.8086 411 1/29/2023
10.1.8085 420 1/22/2023
10.1.8084 412 1/20/2023
10.1.8083 381 1/12/2023
10.1.8078 411 12/8/2022
10.1.8076 535 10/21/2022
10.1.8075 564 10/19/2022