I understand that ASP.NET Core has the assembly Microsoft.AspNetCore.Authentication.JwtBearer which we can use for token validation. However, I just can't quite understand whether ASP.NET Core built-in middleware can be also used to generate the tokens like we did with Microsoft.Owin.Security.OAuth. Can someone please help me clarify the following questions.
Can we generate and issue tokens using Microsoft.AspNetCore.Authentication.JwtBearer like we did with Microsoft.Owin.Security.OAuth like:
app.UseOAuthAuthorizationServer(oAuthServerOptions); app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
without writing custom code to generate the token?
If we can't do it with Microsoft.Owin.Security, is there any functionality in Microsoft.AspNetCore.Owin that is analogous to Microsoft.Owin.Security.OAuth?
Is using a 3rd party solution like IdentityServer4 the way to go if we I want to use an in-app user store, expose an endpoint for client to get a token and use it for authorization? Thanks.