如何创建API/IdentityServer/Blazor(服务器端)应用程序?

我尝试自己构建此应用程序,但是在此过程中遇到了几个绊脚石.我认为最好退后一步,更广泛地了解我尝试创建的内容.似乎没有任何关于如何制作所需内容的文档. (除非有人可以指出我可能错过的正确位置)

I attempted to build this application myself but, have hit several stumbling blocks along the way. I am thinking that it may be best to step back and take a larger look at what I am trying to create. There doesn't seem to be any documentation on how to make what I am looking for. (unless someone can point me in the right place I might have missed)

最终,我想让Blazor(服务器端)应用程序进行API调用以使用应用程序中的数据,然后让IdentityServer4封装身份验证.我需要具有Azure以及ASP.net Identity作为可能的身份验证方法.

Ultimately what I would like is to have a Blazor(server-side) application make API calls to use data in the app and then have an IdentityServer4 encapsulate the authentication. I need to have Azure as well as ASP.net Identity as the possible authentication methods.

我已经尝试过并且能够创建同样具有本地API的IdentityServer4.我可以打电话给邮递员来获取令牌等.但是,在将Blazor(服务器端)应用程序与IdentityServer4绑定时,我很困惑.

I have tried and was able to create an IdentityServer4 that also has a local API. I can make calls to this from Postman to get token and such. But, when it comes to tying a Blazor(server-side) application to the IdentityServer4 I am befuddled.

我试图具体询问这个问题,但是根本没有得到任何结果.我希望从更大的角度来看可能会有所帮助.

I have tried to ask this question in specifics but, haven't gotten any results at all. I am hoping maybe this larger look at it might be helpful.

似乎odic-client.js是从IdentityServer4回调中获取数据的方式,但是,这似乎与Blazor(服务器端)中的.NET授权没有很好的结合.我如何使它们一起工作.

It seems like odic-client.js is the way to get the data from the IdentityServer4 callback but, that doesn't seem to tie in nicely with the .NET Authorization in Blazor(server-side). How do I get these to work together.



 1 条回答