是否有用于 Microsoft 身份平台和 OAuth 2.0 授权的 OAuth 2 构建器?

Is there an OAuth 2 builder for Microsoft identity platform and OAuth 2.0 authorization?

documents开始,请求授权码的方式很丑陋:

// Line breaks for legibility only
https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize?
client_id=6731de76-14a6-49ae-97bc-6eba6914391e
&response_type=code
&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
&response_mode=query
&scope=openid%20offline_access%20https%3A%2F%2Fgraph.microsoft.com%2Fmail.read
&state=12345
&code_challenge=YTFjNjI1OWYzMzA3MTI4ZDY2Njg5M2RkNmVjNDE5YmEyZGRhOGYyM2IzNjdmZWFhMTQ1ODg3NDcxY2Nl
&code_challenge_method=S256

是否有针对此类请求的生成器class?特别是考虑到它要上 Azure,我以为会有但一直找不到。

该文章的第二段指出:

This article describes how to program directly against the protocol in your application using any language. When possible, we recommend you use the supported Microsoft Authentication Libraries (MSAL) instead to acquire tokens and call secured web APIs. Also take a look at the sample apps that use MSAL.

这篇文章解释了协议的工作原理,但几乎没有人会直接实现协议。 MSAL 和许多其他库会为您包装此功能。