A2v10.Identity.ApiKey 10.1.8529

There is a newer version of this package available.
See the version list below for details.
dotnet add package A2v10.Identity.ApiKey --version 10.1.8529
                    
NuGet\Install-Package A2v10.Identity.ApiKey -Version 10.1.8529
                    
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.8529" />
                    
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.8529" />
                    
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.8529
                    
#r "nuget: A2v10.Identity.ApiKey, 10.1.8529"
                    
#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.8529
                    
#: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.8529
                    
Install as a Cake Addin
#tool nuget:?package=A2v10.Identity.ApiKey&version=10.1.8529
                    
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 266 8/28/2025
10.1.8566 181 8/18/2025
10.1.8565 176 8/12/2025
10.1.8563 337 7/26/2025
10.1.8558 240 6/19/2025
10.1.8554 278 6/9/2025
10.1.8553 177 6/4/2025
10.1.8551 143 5/30/2025
10.1.8549 225 5/20/2025
10.1.8547 267 5/14/2025
10.1.8545 170 5/7/2025
10.1.8542 163 4/25/2025
10.1.8540 241 4/21/2025
10.1.8534 300 3/10/2025
10.1.8529 210 2/25/2025
10.1.8526 206 2/16/2025
10.1.8521 190 2/8/2025
10.1.8510 253 1/18/2025
10.1.8508 178 1/11/2025
10.1.8506 176 1/8/2025
10.1.8504 184 12/21/2024
10.1.8503 196 12/5/2024
10.1.8500 175 11/19/2024
10.1.8363 196 11/3/2024
10.1.8360 211 10/25/2024
10.1.8358 171 10/25/2024
10.1.8351 208 10/9/2024
10.1.8348 165 10/5/2024
10.1.8347 189 10/1/2024
10.1.8346 182 9/29/2024
10.1.8341 211 9/6/2024
10.1.8340 150 9/2/2024
10.1.8339 207 8/24/2024
10.1.8338 191 8/23/2024
10.1.8332 161 8/7/2024
10.1.8328 157 7/31/2024
10.1.8327 140 7/25/2024
10.1.8325 147 7/23/2024
10.1.8322 183 7/17/2024
10.1.8319 170 7/10/2024
10.1.8315 167 7/5/2024
10.1.8306 225 6/20/2024
10.1.8305 168 6/18/2024
10.1.8303 153 6/13/2024
10.1.8301 168 6/8/2024
10.1.8296 191 5/28/2024
10.1.8295 166 5/28/2024
10.1.8286 185 5/14/2024
10.1.8282 189 5/8/2024
10.1.8280 221 4/26/2024
10.1.8276 226 4/15/2024
10.1.8275 197 4/7/2024
10.1.8271 213 3/30/2024
10.1.8268 226 3/18/2024
10.1.8267 182 3/18/2024
10.1.8266 175 3/16/2024
10.1.8261 222 3/8/2024
10.1.8259 208 2/28/2024
10.1.8255 169 2/25/2024
10.1.8251 175 2/23/2024
10.1.8235 207 2/3/2024
10.1.8233 196 1/30/2024
10.1.8226 199 1/18/2024
10.1.8222 197 1/11/2024
10.1.8220 194 1/10/2024
10.1.8214 213 1/2/2024
10.1.8213 197 12/31/2023
10.1.8198 192 12/21/2023
10.1.8188 211 12/9/2023
10.1.8186 191 11/29/2023
10.1.8184 171 11/24/2023
10.1.8183 186 11/23/2023
10.1.8180 187 11/18/2023
10.1.8171 216 11/9/2023
10.1.8168 188 11/6/2023
10.1.8159 173 9/27/2023
10.1.8152 239 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 270 8/5/2023
10.1.8126 255 7/25/2023
10.1.8114 280 7/7/2023
10.1.8109 298 6/12/2023
10.1.8097 308 4/21/2023
10.1.8096 289 4/10/2023
10.1.8095 309 4/9/2023
10.1.8094 268 4/9/2023
10.1.8093 324 3/22/2023
10.1.8092 351 3/12/2023
10.1.8091 309 3/7/2023
10.1.8090 351 3/7/2023
10.1.8089 346 3/2/2023
10.1.8088 384 2/10/2023
10.1.8087 385 1/31/2023
10.1.8086 422 1/29/2023
10.1.8085 431 1/22/2023
10.1.8084 413 1/20/2023
10.1.8083 382 1/12/2023
10.1.8078 421 12/8/2022
10.1.8076 545 10/21/2022
10.1.8075 574 10/19/2022