I am just creating a web-api project (based on ASP.NET with C #). VS creates this empty application using its demo application to demonstrate its capabilities. Everything works fine with this demo.
As part of the demo code, you will make this block in the file "App_Start / Startup.Auth.cs":
// Configure the application for OAuth based flow PublicClientId = "self"; OAuthOptions = new OAuthAuthorizationServerOptions { TokenEndpointPath = new PathString("/Token"), Provider = new ApplicationOAuthProvider(PublicClientId), AuthorizeEndpointPath = new PathString("/api/Account/ExternalLogin"), AccessTokenExpireTimeSpan = TimeSpan.FromDays(14), AllowInsecureHttp = true }; // Enable the application to use bearer tokens to authenticate users app.UseOAuthBearerTokens(OAuthOptions);
OK Now suppose the authentication mechanism works well. I want to add documentation to WebAPI about this "/ Token" page. But since this page is generated by code, the WebAPI documentation engine does not recognize this as part of the documentation. So, how should my users know how to enter my application?
What can I do to add this "/ Token" page to my API auto-create API documentation?
Thanks.
source share