ApiValidateService 1.0.5

dotnet add package ApiValidateService --version 1.0.5
                    
NuGet\Install-Package ApiValidateService -Version 1.0.5
                    
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="ApiValidateService" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ApiValidateService" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="ApiValidateService" />
                    
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 ApiValidateService --version 1.0.5
                    
#r "nuget: ApiValidateService, 1.0.5"
                    
#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 ApiValidateService@1.0.5
                    
#: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=ApiValidateService&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=ApiValidateService&version=1.0.5
                    
Install as a Cake Tool

API鉴权

概述

该包提供以下功能:

  • 从请求头中解析信息,验证接口权限;

使用说明

1. 引用AuthorizationService.dll
2. 初始化相关配置

在使用该dll相关功能之前,请先通过ConfigInit类初始化相关配置

/// <summary>
/// 初始化配置参数
/// </summary>
/// <param name="authorizationUrl">授权服务器地址 ucp的Portal地址 注意不是auth地址</param>
/// <param name="includeClientIds">拦截范围</param>
/// <param name="excludeClientIds">非拦截范围</param>
/// <param name="clientIds">当前服务在ucp接入时的clientId</param>
/// <exception cref="ArgumentNullException"></exception>
public ConfigInit(string authorizationUrl, List<string> clientIds, List<string>? includeClientIds = null, List<string>? excludeClientIds = null)

//初始化配置示例
ConfigInit configInit = new ConfigInit(authorizationUrl,clientIds,includeClientIds,excludeClientIds);
使用相关API接口
public bool PreHandle(HttpRequestMessage httpRequest, HttpResponseMessage httpResponse)

//使用示例
ApiAuthorizationFilter apiAuthorizationFilter = new ApiAuthorizationFilter();
apiAuthorizationFilter.PreHandle(request,response);
Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  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
1.0.5 142 1/9/2026
1.0.4 130 1/8/2026
1.0.3 126 1/8/2026
1.0.2 119 1/8/2026
1.0.1 123 1/8/2026
1.0.0 240 3/29/2024