> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/enabling-authenticated-access.md).

# 启用已认证访问

要在登录界面后保护文档，首先需要为网站启用经过身份验证的访问。

### 启用经过身份验证的访问

前往 [网站设置](https://gitbook.com/docs/documentation/zh/manage-your-site/site-settings.md)，然后在网站的受众群体设置中选择 **经过身份验证的访问** 。选择后，你会看到一些选项，需要继续配置网站。你还会看到系统生成的“**私钥**”，在稍后的经过身份验证的访问设置过程中会用到。

### 选择身份验证方法

根据你的设置，我们提供了相关集成和指南，帮助你为不同工具设置经过身份验证的访问。

前往相应的指南，继续为网站设置经过身份验证的访问。

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="image">封面图片</th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover-dark data-type="image">封面图片（深色）</th></tr></thead><tbody><tr><td>设置 Auth0</td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-1c14347f4503148191776242e0da52260edc7d11%2F25_12_10_auth0_1.png?alt=media">25_12_10_auth0_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/setting-up-auth0.md">设置 Auth0</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-446de09ea1ba89d6f2ef9d0605ffe6b979ecc71a%2F25_12_10_auth0.png?alt=media">25_12_10_auth0.png</a></td></tr><tr><td>设置 Azure AD</td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-21450b5ac7fdc78bb1fc5658c9d60965db66a909%2F25_12_10_azure_1.png?alt=media">25_12_10_azure_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/setting-up-azure-ad.md">设置 Azure AD</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-feb7ad64287c82e0000fcdf4acdc28b3cedaeddf%2F25_12_10_azure.png?alt=media">25_12_10_azure.png</a></td></tr><tr><td>设置 Okta</td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-3bdc1d1ef12117460aa73b2073ca5ff9d4df0532%2F25_12_10_okta_1.png?alt=media">25_12_10_okta_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/setting-up-okta.md">设置 Okta</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-46ab6aeb21d828fec76ec93d5705e165d341fd88%2F25_12_10_okta.png?alt=media">25_12_10_okta.png</a></td></tr><tr><td>设置 AWS Cognito</td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-6983773e4004a1a537d346b93ca651f58de51950%2F25_12_10_aws_cognito_1.png?alt=media">25_12_10_aws_cognito_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/setting-up-aws-cognito.md">设置 AWS Cognito</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-534e13b81140652c2ecdfbd457b57abb2296c87a%2F25_12_10_aws_cognito.png?alt=media">25_12_10_aws_cognito.png</a></td></tr><tr><td>设置 OIDC</td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-fee30282a44d475ffdd18a364338c74b8aa673bc%2F25_12_10_oidc_1.png?alt=media">25_12_10_oidc_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/setting-up-oidc.md">设置 OIDC</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-4037bb853bb58f69b6823741dd931981c5e46a98%2F25_12_10_oidc.png?alt=media">25_12_10_oidc.png</a></td></tr><tr><td>设置自定义后端</td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-16df4936c6a1eb9aa89e6a0bc537b570d5e34649%2F25_12_10_custom_1.png?alt=media">25_12_10_custom_1.png</a></td><td><a href="https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/setting-up-a-custom-backend.md">托管自己的登录页面</a></td><td><a href="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-2c03da7b1125ae273cb7d10943bd30380536b9db%2F25_12_10_custom.png?alt=media">25_12_10_custom.png</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access/enabling-authenticated-access.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
