Reputation: 2629
When configuring IdentityServer4 for ASP WebAPI/MVC i have the option to use
It seems to me that it does the same thing. Why shouldi choose the Identity server option over the openidconnect?
When does each one apply best and why?
Upvotes: 0
Views: 468
Reputation: 28435
In API (MVC Web API) application you should call
app.UseIdentityServerAuthentication
See IdentityServer4 API documentation
Our authentication middleware serves the same purpose as the app.UseJwtBearerAuthentication middleware (in fact it uses the Microsoft JWT middleware internally), but adds a couple of additional features:
- support for both JWTs and reference tokens
- extensible caching for reference tokens
- unified configuration model
- scope validation
In Web Client (MVC Web ) you should call
app.UseOpenIdConnectAuthentication
See IdentityServer4 "Creating an MVC client" documentation
Upvotes: 1
Reputation: 1971
It implement a middlware to use the OIC flow whatever your server authority.
Have a look on those links :
In this case, the configuration is more specific to use the IdendityServer4 workflow
The first is more generic whereas the second is more specific.
Upvotes: 0