I've created a new Web Api project, added Asp.Net Identity and configured OAuth like so:
OAuthOptions = new OAuthAuthorizationServerOptions
{
TokenEndpointPath = new PathString("/Token"),
Provider = new ApplicationOAuthProvider(PublicClientId),
AuthorizeEndpointPath = new PathString("/api/Account/ExternalLogin"),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
AllowInsecureHttp = true
};
This all works fine, I can call the /Token endpoint and get a bearer token back.
The problem is that this is not discoverable in Swagger I assume because it's not on a controller and therefore has no xml documentation generated for it.
Does anyone know of a way to display this login endpoint in my Swagger docs?
Thanks.
Also, i should've said that the Swagger documentation is working with all my controllers, it's just that I'm missing this one obvious method - how to login.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…