久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

通過 Azure Functions 在 Azure AD 中驗證用戶(驗證用戶

Authenticate User In Azure AD (validate username amp; password) via Azure Functions(通過 Azure Functions 在 Azure AD 中驗證用戶(驗證用戶名和密碼))
本文介紹了通過 Azure Functions 在 Azure AD 中驗證用戶(驗證用戶名和密碼)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

是否可以創建一個 Azure 函數,它將用戶名和密碼作為輸入參數,并且函數應該針對 Azure AD 驗證用戶.

Is it possible to create an Azure Function which will take username and password as input parameters and function should validate user against Azure AD.

推薦答案

首先,重要的是要提到收集 Azure AD 用戶的用戶名和密碼作為應用程序(Azure 函數或 Web 應用程序)的一部分,你是開發)非常違反最佳實踐,并帶來多種攻擊風險.因此,即使您可以使用變通方法來實現它,請務必從安全角度重新考慮您的要求.

Firstly, it's important to mention that collecting username and password for an Azure AD user as part of your application (Azure function or web app any other application you're developing) is very much against the best practices and opens up multiple attack risks. So even though you may be able to use workarounds to achieve it, please do reconsider the requirement that you have from a security standpoint.

解決方法 - ROPC - 資源所有者密碼憑據授予(不推薦,多個問題)

Azure AD 不提供直接 API 來驗證用戶憑據.作為一種解決方法(也是一個不好的解決方法),您可以使用 Resource Owner Password Credentials (ROPC) flow,它與用戶名和密碼一起使用來獲取令牌.

Azure AD does not provide a direct API to validate user credentials. As a workaround (and a bad one at that), you can use Resource Owner Password Credentials (ROPC) flow which works with username and password to acquire a token.

它違反了安全最佳實踐,也不適用于 MFA 和聯合身份驗證用戶.強烈建議不要使用此授權,因為它會帶來潛在的攻擊風險,因此不推薦.

It violates security best practices and also does not work with MFA and federated authentication users. Using this grant is highly discouraged as it brings potential attack risks, so not recommended.

如果用戶名或密碼不正確,你會得到一個異常,否則你會得到一個有效的令牌,這意味著憑據是好的.

If either username or password is incorrect, you will get an exception, otherwise you get back a valid token which means credentials are good.

這里有幾個鏈接,其中包含有關 ROPC 的詳細信息(建議不要同時使用它..):

Here are a couple of links that cover details on ROPC (and recommend not using it at the same time..):

  • ADAL.NET 庫文檔關于使用用戶名和密碼獲取令牌
  • Azure AD OAuth 中的資源所有者密碼憑據授予

例如,本機應用程序的代碼如下所示.

For example, code would look like this for a native application.

result = await context.AcquireTokenAsync(resource, clientId, new UserPasswordCredential("john@contoso.com", johnsPassword));

其他參考資料

  • 這里 是一篇舊文章,但仍然非常詳細.看看最后的一長串限制.
  • Here is an old article but still very detailed. And look at the long list of limitations at the end.

這篇關于通過 Azure Functions 在 Azure AD 中驗證用戶(驗證用戶名和密碼)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護進程或服務器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
主站蜘蛛池模板: 97伦理电影 | 亚洲xxxxx| 成人深夜福利在线观看 | 国产在线一区二区三区 | www.性色| 精品一区二区三区中文字幕 | 精品亚洲一区二区三区 | 国产97碰免费视频 | 玖玖视频免费 | 国产免费看| www久久久| 国产大片一区 | 亚洲成人激情在线观看 | 最新超碰 | 91免费观看| 日韩黄色免费 | 欧美一区二区三区电影 | 亚洲综合色视频在线观看 | 亚洲成人精品国产 | 成av在线| 欧美男人天堂 | 日本免费在线 | 小早川怜子xxxxaⅴ在线 | 国产精品久久久久影院色老大 | 99re视频在线免费观看 | 国产精久久久久久久妇剪断 | 久久久成人网 | 久久成人免费 | 亚洲毛片 | 日韩精品一区二区三区久久 | 国产aⅴ爽av久久久久久久 | 国产精品九九视频 | 高清一区二区三区 | 黄色av网站在线观看 | 爱操影视| 一区二区中文字幕 | 欧美不卡一区 | 午夜小电影 | 亚洲高清在线 | 韩日精品在线观看 | 日韩乱码一二三 |