简体   繁体   English

在 Azure Static Web 应用程序上添加身份验证

[英]Adding authentication on Azure Static Web Apps

I have deployed a very simple Azure Static Web Apps in which I deploy a simple documentation site powered by mkdocs (HTML and CSS).我已经部署了一个非常简单的 Azure Static Web 应用程序,我在其中部署了一个由 mkdocs(HTML 和 CSS)提供支持的简单文档站点。 I would like to know if it is possible to implement some kind of authentication through Azure AD/MSAL in which only enterprise users could log in using their email and password.我想知道是否可以通过 Azure AD/MSAL 实施某种身份验证,只有企业用户才能使用他们的 email 和密码登录。

Yes, it is possible.对的,这是可能的。 Azure Static Web Apps provides a streamlined authentication experience. Azure Static Web 应用程序提供简化的身份验证体验。 By default, you have access to a series of pre-configured providers, or the option to register a custom provider.默认情况下,您可以访问一系列预配置的提供程序,或者可以选择注册自定义提供程序。

  • Any user can authenticate with an enabled provider.任何用户都可以通过启用的提供程序进行身份验证。 Once logged in, users belong to the anonymous and authenticated roles by default.登录后,用户默认属于anonymous和经过authenticated的角色。
  • Authorized users gain access to restricted routes by rules defined in the staticwebapp.config.json file.授权用户可以通过 staticwebapp.config.json 文件中定义的规则访问受限路由。 Users join custom roles via provider-specific invitations, or through a custom Azure Active用户通过特定于提供商的邀请或通过自定义 Azure Active 加入自定义角色
  • Directory provider registration.目录提供商注册。
  • All authentication providers are enabled by default.默认情况下启用所有身份验证提供程序。
    • To restrict an authentication provider, block access with a custom route rule.要限制身份验证提供程序,请使用自定义路由规则阻止访问。
  • Pre-configured providers include:预配置的供应商包括:
    • Azure Active Directory Azure 活动目录
    • GitHub GitHub
    • Twitter Twitter

https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-authorization https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-authorization

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Azure 应用服务域 Static Web 应用程序? - How to use Azure App Services domain for Static Web Apps? Azure Web 应用限制 - Azure Web Apps restriction 是否可以从另一个内部 Azure Static Web 应用程序调用一个 Azure Function 应用程序? - Is it possible to call one Azure Function from another inside Azure Static Web Apps? 获取部署 url 以传递给下一步 - Azure Static Web 具有 Github 操作的应用程序 - Get deployment url to be passed to next step - Azure Static Web apps with Github actions Azure Static web 应用程序 CLI 在本地环境中是否支持 PUT 和 DELETE 请求? - Are PUT and DELETE requests supported by Azure Static web apps CLI on local environment? 在 Azure 上部署 React - django 应用 web 应用 - Deploying React - django apps on Azure web apps 将 HTTPListener 与 Azure Web 应用程序一起使用 - Using HTTPListener with Azure Web apps azure static web 应用程序,如何从同一个 git 回购中构建两个不同的 web 应用程序(一个产品和一个非产品)? - azure static web app, how to have two different web apps (one prod and one non prod) building from the same git repo? “WebContentNotFound”错误 azure static web - "WebContentNotFound" error with azure static web Okta 在 Azure 虚拟机上保护 web 应用程序 - Okta secure web apps on Azure Virtual Machines
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM