Swashbuckle 5.0 and Password Grant Flow
See original GitHub issueThere is documentation on how to authenticate request with the Implicit Grant Flow but not with the Password Grant Flow. Based on the doc for the implicit grant I’ve enable swagger like this
Swashbuckle.Application.SwaggerEnabledConfiguration sec = config.EnableSwagger(c =>
{
c.SingleApiVersion("v1", "MyApi");
c.OAuth2("oauth2")
.Description("OAuth2 Password Grant")
.Flow("password")
.Scopes(scopes => { scopes.Add("read", "Read access to protected resources"); })
.TokenUrl("http://localhost:51398/OAuth/token");
c.OperationFilter<AssignOAuth2SecurityRequirements>();
c.IncludeXmlComments(System.String.Format(@"{0}\bin\MyApi.XML", System.AppDomain.CurrentDomain.BaseDirectory));
});
sec.EnableSwaggerUi();
I took the “AssignOAuth2SecurityRequirements” extension under SwahsBuckle.Dummy.Core. Is there any other extensions needed for the Password Flow?
Issue Analytics
- State:
- Created 9 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Swashbuckle 5.0 and Password Grant Flow · Issue #202
There is documentation on how to authenticate request with the Implicit Grant Flow but not with the Password Grant Flow.
Read more >OAuth2 with Resource Owner Password Credentials Grant
I'm trying to use Swashbuckle 5.0.x with OAuth2. I want to use OAuth2's Resource Owner Password Credentials Grant. I basically only want to...
Read more >OAuth2 with Resource Owner Password Credentials Grant
I'm trying to use Swashbuckle 5.0.x with OAuth2. I want to use OAuth2's Resource Owner Password ... Enable Oauth2 client credentials flow in...
Read more >Swagger UI (OpenApi) with Authorization code flow + ...
In this post I've tried to show how straightforward is to add Authorization code flow + PKCE in Swashbuckle Asp.Net Core. If you...
Read more >How to do OAuth2 Authorization in ASP.NET Core ...
This post is about documenting OAuth 2 protected ASP.NET Core Web API using Swashbuckle. Last post - Securing Your Web API Using Azure ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@domaindrivendev It looks like Password Flow support has landed in swagger-ui Master: https://github.com/swagger-api/swagger-ui/pull/2397
Are there any changes that need to be done in Swashbuckle to include this?
@domaindrivendev I’d appreciate a response to my comment above.