Bitzsoft.Integrations.LegalDatabase.Jianwei
1.0.0-alpha.10
This is a prerelease version of Bitzsoft.Integrations.LegalDatabase.Jianwei.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Bitzsoft.Integrations.LegalDatabase.Jianwei --version 1.0.0-alpha.10
NuGet\Install-Package Bitzsoft.Integrations.LegalDatabase.Jianwei -Version 1.0.0-alpha.10
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="Bitzsoft.Integrations.LegalDatabase.Jianwei" Version="1.0.0-alpha.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bitzsoft.Integrations.LegalDatabase.Jianwei" Version="1.0.0-alpha.10" />
<PackageReference Include="Bitzsoft.Integrations.LegalDatabase.Jianwei" />
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 Bitzsoft.Integrations.LegalDatabase.Jianwei --version 1.0.0-alpha.10
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Bitzsoft.Integrations.LegalDatabase.Jianwei, 1.0.0-alpha.10"
#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 Bitzsoft.Integrations.LegalDatabase.Jianwei@1.0.0-alpha.10
#: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=Bitzsoft.Integrations.LegalDatabase.Jianwei&version=1.0.0-alpha.10&prerelease
#tool nuget:?package=Bitzsoft.Integrations.LegalDatabase.Jianwei&version=1.0.0-alpha.10&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Bitzsoft.Integrations.LegalDatabase.Jianwei
见微数据法规案例库 SSO 跳转集成 — 基于 RSA 加密 → API 调用 → 可选 MD5 签名的管道模式生成单点登录访问链接。
功能特性
- Pipeline 管道模式:RSA 加密用户身份 → 调用见微 API 获取重定向 URL → 可选 MD5 签名,由 SsoRedirect 管道编排
- RSA 公钥加密:使用见微提供的 RSA 公钥(Base64 SPKI)加密
{userId, timestamp, platform}明文 - 可选 MD5 签名:配置
SignSecret后对最终 URL 进行 MD5 签名追加 - 统一接口:实现
ILegalDatabaseProvider,与其他法律数据库供应商无缝替换
安装
.NET CLI
dotnet add package Bitzsoft.Integrations.LegalDatabase.Jianwei
PackageReference
<PackageReference Include="Bitzsoft.Integrations.LegalDatabase.Jianwei" Version="1.0.0" />
配置
appsettings.json
{
"LegalDatabase": {
"Jianwei": {
"BaseUrl": "https://jianweidata.com/",
"PublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...",
"ApiUrl": "https://api.jianweidata.com/getUserInstValidate",
"SignSecret": "your-md5-sign-secret"
}
}
}
| 配置项 | 说明 | 必填 |
|---|---|---|
BaseUrl |
见微数据基础 URL(默认 https://jianweidata.com/) |
否 |
PublicKey |
RSA 公钥(Base64 SPKI 格式),用于加密用户身份 | 是 |
ApiUrl |
获取用户验证 URL 的 API 地址(默认 https://api.jianweidata.com/getUserInstValidate) |
否 |
SignSecret |
MD5 签名密钥(可空表示不签名) | 否 |
注册服务
从 IConfiguration 绑定(推荐)
using Bitzsoft.Integrations.LegalDatabase.Jianwei;
builder.Services.AddBitzsoftJianweiLegalDatabase(
builder.Configuration.GetSection("LegalDatabase:Jianwei"));
委托配置
builder.Services.AddBitzsoftJianweiLegalDatabase(options =>
{
options.PublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...";
options.ApiUrl = "https://api.jianweidata.com/getUserInstValidate";
// options.SignSecret = "your-md5-sign-secret"; // 可选 MD5 签名
});
使用示例
using Bitzsoft.Integrations.LegalDatabase;
public class LoginController : ControllerBase
{
private readonly ILegalDatabaseProvider _provider;
public LoginController(ILegalDatabaseProvider provider) => _provider = provider;
[HttpGet("login/jianwei")]
public async Task<IActionResult> Login(string userId)
{
// 内部执行:RSA 加密身份 → 调用见微 API → 取回重定向 URL
var access = await _provider.GenerateAccessUrlAsync(userId);
return Redirect(access.Url);
}
}
管道流程(SsoRedirect Pipeline 模式):
template— 构造 RSA 加密明文{"userId":"{userId}","timestamp":"{timestamp}","platform":"web_common"}rsa— 使用PublicKeyRSA 加密明文,写入{cipher}template:requestBody— 构造 API 请求体{"codestr":"{cipher}","codeType":"jy","redirect":0}apiCall— POST 调用ApiUrl,从响应location字段提取重定向 URL(成功码code=0)- (可选)
template:url→sign→appendSignature— 配置SignSecret时对 URL 做 MD5 签名
见微数据仅支持 SSO 跳转(
AccessUrl),调用SearchAsync/GetDocumentAsync会抛出NotSupportedException。
请求审计
内置 Bitzsoft.Integrations.RequestLogging 出站请求记录管道,记录每次调用见微 API 的请求与响应,默认使用 NullRequestLogStore 不持久化。
// 默认:启用记录管道但不持久化(日志丢弃)
services.AddBitzsoftJianweiLegalDatabase(options => { /* ... */ });
// 持久化:宿主注册 IRequestLogStore 实现后,所有出站请求自动落库
services.AddRequestLogging<MyRequestLogStore>(opts =>
{
opts.MaxInMemoryBodyBytes = 64 * 1024; // 仅控制内存/加密临时文件切换,不截断正文
opts.SensitiveFields.Add("PublicKey");
});
services.AddBitzsoftJianweiLegalDatabase(options => { /* ... */ });
依赖
| 包 | 说明 |
|---|---|
Bitzsoft.Integrations.LegalDatabase |
法规案例库抽象层(ILegalDatabaseProvider) |
Bitzsoft.Integrations.SsoRedirect |
SSO 跳转管道(RSA / API 调用 / 签名步骤) |
Bitzsoft.Integrations.RequestLogging |
出站请求记录管道 |
Bitzsoft.Integrations.Compatibility |
基础工具库 |
Microsoft.Extensions.Configuration.Abstractions |
配置抽象 |
Microsoft.Extensions.Http |
IHttpClientFactory |
Microsoft.Extensions.Options.ConfigurationExtensions |
Options 配置节点绑定 |
相关包
- Bitzsoft.Integrations.LegalDatabase -- 法规案例库抽象层
- Bitzsoft.Integrations.LegalDatabase.All -- 全部 12 家供应商聚合包
- Bitzsoft.Integrations.SsoRedirect -- SSO 跳转配置驱动管道
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. 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 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 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 is compatible. 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.
-
net10.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.LegalDatabase (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
-
net5.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.LegalDatabase (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Http (>= 5.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 5.0.0)
-
net8.0
- Bitzsoft.Integrations.Compatibility (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.LegalDatabase (>= 1.0.0-alpha.10)
- Bitzsoft.Integrations.RequestLogging (>= 1.0.0-alpha.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bitzsoft.Integrations.LegalDatabase.Jianwei:
| Package | Downloads |
|---|---|
|
Bitzsoft.Integrations.LegalDatabase.All
法规案例库聚合包 — 一键集成威科先行、法信、聚法案例、无讼、MetaLaw、把手案例、见微数据、律商联讯、北大法宝、元典、得理法搜、incoPat |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 130 | 8/3/2026 |
| 1.0.0 | 130 | 8/2/2026 |
| 1.0.0-alpha.10 | 59 | 7/26/2026 |
| 1.0.0-alpha.9 | 62 | 7/12/2026 |
| 1.0.0-alpha.8 | 68 | 7/1/2026 |
| 1.0.0-alpha.7 | 83 | 6/16/2026 |
| 1.0.0-alpha.6 | 71 | 6/16/2026 |
| 1.0.0-alpha.5 | 71 | 6/14/2026 |
| 1.0.0-alpha.3 | 76 | 6/7/2026 |