Skip to content

Commit 40d62d9

Browse files
authored
docs: update API references from UpdateAuth to HttpAuth (#76)
> > Reflects rename in GeneralUpdate Core library. > > Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b0d25d1 commit 40d62d9

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

website/docs/doc/GeneralUpdate.Core.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ await new GeneralUpdateBootstrap()
771771
| `Hooks<T>()` | `IUpdateHooks` | 更新生命周期前后置逻辑。 |
772772
| `UpdateReporter<T>()` | `IUpdateReporter` | 更新状态上报。 |
773773
| `SslPolicy<T>()` | `ISslValidationPolicy` | HTTPS 证书校验。 |
774-
| `UpdateAuth<T>()` | `IHttpAuthProvider` | HTTP 请求认证。 |
774+
| `HttpAuth<T>()` | `IHttpAuthProvider` | HTTP 请求认证。 |
775775
| `DownloadSource<T>()` | `IDownloadSource` | 版本清单和下载资源来源。 |
776776
| `DownloadPolicy<T>()` | `IDownloadPolicy` | 下载重试、超时、熔断等策略。 |
777777
| `DownloadExecutor<T>()` | `IDownloadExecutor` | 单文件下载实现。 |
@@ -929,11 +929,11 @@ public sealed class StaticBearerAuthProvider : IHttpAuthProvider
929929

930930
await new GeneralUpdateBootstrap()
931931
.SetConfig(request)
932-
.UpdateAuth<StaticBearerAuthProvider>()
932+
.HttpAuth<StaticBearerAuthProvider>()
933933
.LaunchAsync();
934934
```
935935

936-
Core 内置的认证类型包括 `NoOpAuthProvider``BearerTokenAuthProvider``ApiKeyAuthProvider``HmacAuthProvider`。这些类型中部分构造函数需要参数,因此如果要通过 `UpdateAuth<T>()` 注册,通常需要写一个无参包装类。
936+
Core 内置的认证类型包括 `NoOpAuthProvider``BearerTokenAuthProvider``ApiKeyAuthProvider``HmacAuthProvider`。这些类型中部分构造函数需要参数,因此如果要通过 `HttpAuth<T>()` 注册,通常需要写一个无参包装类。
937937

938938
## HTTPS 证书策略:ISslValidationPolicy
939939

website/docs/guide/Architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ await new GeneralClientBootstrap()
310310
// 自定义下载重试策略
311311
.DownloadPolicy<CustomRetryPolicy>()
312312
// 自定义认证提供者
313-
.UpdateAuth<BearerTokenAuthProvider>()
313+
.HttpAuth<BearerTokenAuthProvider>()
314314
// 生命周期钩子
315315
.Hooks<CustomUpdateHooks>()
316316
.SetConfig(config)

website/docs/guide/Security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ var config = new Configinfo
121121

122122
// 或者通过 AbstractBootstrap 注入
123123
await new GeneralClientBootstrap()
124-
.UpdateAuth<BearerTokenAuthProvider>()
124+
.HttpAuth<BearerTokenAuthProvider>()
125125
.SetConfig(config)
126126
.LaunchAsync();
127127
```

website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ All extension registration methods are provided by `AbstractBootstrap` and can b
770770
| `Hooks<T>()` | `IUpdateHooks` | Lifecycle callbacks. |
771771
| `UpdateReporter<T>()` | `IUpdateReporter` | Update status reporting. |
772772
| `SslPolicy<T>()` | `ISslValidationPolicy` | HTTPS certificate validation. |
773-
| `UpdateAuth<T>()` | `IHttpAuthProvider` | HTTP request authentication. |
773+
| `HttpAuth<T>()` | `IHttpAuthProvider` | HTTP request authentication. |
774774
| `DownloadSource<T>()` | `IDownloadSource` | Version manifest and asset source. |
775775
| `DownloadPolicy<T>()` | `IDownloadPolicy` | Retry, timeout, circuit breaker. |
776776
| `DownloadExecutor<T>()` | `IDownloadExecutor` | Single-file download implementation. |
@@ -926,11 +926,11 @@ public sealed class StaticBearerAuthProvider : IHttpAuthProvider
926926

927927
await new GeneralUpdateBootstrap()
928928
.SetConfig(request)
929-
.UpdateAuth<StaticBearerAuthProvider>()
929+
.HttpAuth<StaticBearerAuthProvider>()
930930
.LaunchAsync();
931931
```
932932

933-
Core includes `NoOpAuthProvider`, `BearerTokenAuthProvider`, `ApiKeyAuthProvider`, and `HmacAuthProvider`. Some require constructor parameters, so create a parameterless wrapper when registering through `UpdateAuth<T>()`.
933+
Core includes `NoOpAuthProvider`, `BearerTokenAuthProvider`, `ApiKeyAuthProvider`, and `HmacAuthProvider`. Some require constructor parameters, so create a parameterless wrapper when registering through `HttpAuth<T>()`.
934934

935935
## HTTPS certificate policy: ISslValidationPolicy
936936

website/i18n/en/docusaurus-plugin-content-docs/current/guide/Architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ GeneralUpdate provides rich extensibility through `AbstractBootstrap`'s CRTP pat
212212
await new GeneralClientBootstrap()
213213
.SslPolicy<CustomSslPolicy>()
214214
.DownloadPolicy<CustomRetryPolicy>()
215-
.UpdateAuth<BearerTokenAuthProvider>()
215+
.HttpAuth<BearerTokenAuthProvider>()
216216
.Hooks<CustomUpdateHooks>()
217217
.SetConfig(config)
218218
.LaunchAsync();

website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ await new GeneralUpdateBootstrap()
771771
| `Hooks<T>()` | `IUpdateHooks` | 更新生命周期前后置逻辑。 |
772772
| `UpdateReporter<T>()` | `IUpdateReporter` | 更新状态上报。 |
773773
| `SslPolicy<T>()` | `ISslValidationPolicy` | HTTPS 证书校验。 |
774-
| `UpdateAuth<T>()` | `IHttpAuthProvider` | HTTP 请求认证。 |
774+
| `HttpAuth<T>()` | `IHttpAuthProvider` | HTTP 请求认证。 |
775775
| `DownloadSource<T>()` | `IDownloadSource` | 版本清单和下载资源来源。 |
776776
| `DownloadPolicy<T>()` | `IDownloadPolicy` | 下载重试、超时、熔断等策略。 |
777777
| `DownloadExecutor<T>()` | `IDownloadExecutor` | 单文件下载实现。 |
@@ -929,11 +929,11 @@ public sealed class StaticBearerAuthProvider : IHttpAuthProvider
929929

930930
await new GeneralUpdateBootstrap()
931931
.SetConfig(request)
932-
.UpdateAuth<StaticBearerAuthProvider>()
932+
.HttpAuth<StaticBearerAuthProvider>()
933933
.LaunchAsync();
934934
```
935935

936-
Core 内置的认证类型包括 `NoOpAuthProvider``BearerTokenAuthProvider``ApiKeyAuthProvider``HmacAuthProvider`。这些类型中部分构造函数需要参数,因此如果要通过 `UpdateAuth<T>()` 注册,通常需要写一个无参包装类。
936+
Core 内置的认证类型包括 `NoOpAuthProvider``BearerTokenAuthProvider``ApiKeyAuthProvider``HmacAuthProvider`。这些类型中部分构造函数需要参数,因此如果要通过 `HttpAuth<T>()` 注册,通常需要写一个无参包装类。
937937

938938
## HTTPS 证书策略:ISslValidationPolicy
939939

0 commit comments

Comments
 (0)