Server 如何在.net c中生成Oauth2 OIDC授权代码#

Server 如何在.net c中生成Oauth2 OIDC授权代码#,server,oauth-2.0,openid-connect,identity,wso2is,Server,Oauth 2.0,Openid Connect,Identity,Wso2is,当以下请求到达我的提供程序时,提供程序应生成代码并将其发送回。我如何在asp.net c#中生成此代码 答复: 代码: 您需要在浏览器中使用这些参数初始化授权请求 这是示例请求 https://<is-domain>:<id-host>/oauth2/authorize?response_type=code&client_id=<client-id>&redirect_uri=<redirect-uri>&scope=<

当以下请求到达我的提供程序时,提供程序应生成代码并将其发送回。我如何在asp.net c#中生成此代码

答复:
代码:

  • 您需要在浏览器中使用这些参数初始化授权请求
  • 这是示例请求

    https://<is-domain>:<id-host>/oauth2/authorize?response_type=code&client_id=<client-id>&redirect_uri=<redirect-uri>&scope=<scope>&state=<state>
    
    https://:/oauth2/authorize?响应\u type=code&client\u id=&redirect\u uri=&scope=&state=
    
    您可以参考从C#应用程序打开浏览器

  • 然后,用户必须完成身份验证流程并批准同意
  • 然后,代码将作为查询参数发送回您定义的回调URL。从中,你可以得到代码
  • https://<is-domain>:<id-host>/oauth2/authorize?response_type=code&client_id=<client-id>&redirect_uri=<redirect-uri>&scope=<scope>&state=<state>