When directly using the API to get a Claim, the correctness of the Token's key is not checked. var jwt = jwtSecurityTokenHandler.ReadJ[......]继续阅读
When directly using the API to get a Claim, the correctness of the Token's key is not checked. var jwt = jwtSecurityTokenHandler.ReadJ[......]继续阅读
当直接使用 API 获取 Claim 时,是不会检查 Token 的密钥是否正确的。 var jwt = jwtSecurityTokenHandler.ReadJwtToken(token); 如果要同时检查 Token,则可以这样使用: [......]继续阅读
Common JSON serialization configuration is as follows: // JSON serialization configuration private static readonly JsonSerializerOpti[......]继续阅读
常用的 Json 序列化配置如下: // json 序列化配置 private static readonly JsonSerializerOptions JsonSetting = new JsonSerializerOptions() {[......]继续阅读
Middleware example: using AuthCenter.Domain.Modules; using Microsoft.AspNetCore.Http; using System; using System.Collections.Generic; using System.Tex[......]继续阅读
中间件示例: using AuthCenter.Domain.Modules; using Microsoft.AspNetCore.Http; using System; using System.Collections.Generic; using System.Text; using Syst[......]继续阅读
Docker If you configure a Docker private repository using Nexus but do not set the correct address for Docker, you will receive the following error wh[......] 继续阅读
Docker 如果使用 Nexus 配置 Docker 私有仓库,但是 Docker 不配置好地址,那么拉取镜像时会提示: Error response from daemon: Get https://192.168.0.111:666/v2/: http: server gave HTTP re[......]继续阅读
为了配置 Linux 免密登录,之前找到的方法都是比较麻烦的,后面发现一种只需要两个步骤就能完成免密登录配置的方法。 假如,在 Linux A 免密登录 Linux B。 那么在 A 上生成 私钥公钥: ssh-keygen 生成后,将公钥推送到 B 中: ssh-copy-id <user[......]继续阅读
为了配置 Linux 免密登录,之前找到方法都是比较麻烦的,后面发现一种只需要两个步骤就能完成免密登录配置的方法。 假如,在 Linux A 免密登录 Linux B。 那么在 A 上生成 私钥公钥: ssh-keygen 生成后,将公钥推送到 B 中: ssh-copy-id <user&[......]继续阅读
In ASP.NET Core, the method to generate a verification code along with its code is as follows: Import ZKWeb.System.Drawing, with the code sample below[......] 继续阅读
This article mainly introduces some binary processing classes and simple usage methods of Span in the C# namespace System.Buffers.Binary. These binary[......] 继续阅读
本文主要介绍 C# 命名空间 System.Buffers.Binary 中的一些二进制处理类和 Span 的简单使用方法,这些二进制处理类型是上层应用处理二进制数据的基础,掌握这些类型后,我们可以很容易地处理类型和二进制数据之间的转换以及提高程序性能。 C# 原语类型 按照内存分配来区分,C# 有[......] 继续阅读
Introduction CZGL.ProcessMetrics is a metrics library that records information such as GC, CPU, memory, machine network, and disk space of application[......] 继续阅读
导读 CZGL.ProcessMetrics 是一个 Metrics 库,能够将程序的 GC、CPU、内存、机器网络、磁盘空间等信息记录下来,使用 Prometheus 采集信息,然后使用 Grafana 显示。 周日花了时间把这个库更新,修复了一些 Bug,增加了一些有趣的功能,支持多服务器多应用[......] 继续阅读
空接口,发布者订阅者通讯,需要一个实现了 IEventData 的类。 /// <summary> /// Event Data /// </summary> public interface IEventData { } 事[......] 继续阅读
In ControllerBase, its HttpContext is null by default. These properties depend on ControllerContext. Of course, we can also inject IHttpContextAcces[......] 继续阅读
在 ControllerBase 中,其 HttpContext 的默认为空。 这些属性依赖于 ControllerContext。 当然我们也可以注入 IHttpContextAccessor,在每个控制器的构造函数中写进去,比较麻烦。我可以统一通过 控制器激活器进行统一注入。 ///[......]继续阅读