Not all ouath endpoints generated in Swagger
See original GitHub issueI have Oauth configuration like this:
public static final String OAUTH_PATH = "/oauth/token";
openAPI.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEMA_OAUTH2, Collections.emptyList()))
.components(
new Components()
.addSecuritySchemes(SECURITY_SCHEMA_OAUTH2,
new SecurityScheme()
.type(SecurityScheme.Type.OAUTH2)
.bearerFormat(BEARER_FORMAT)
.flows(new OAuthFlows()
.password(new OAuthFlow()
.refreshUrl(OAUTH_PATH)
.tokenUrl(OAUTH_PATH)
.scopes(new Scopes())))));
However generated documentation have only: auth-controller /whoAmI /oauth/token/revokeById/{tokenId} /tokens/revokeRefreshToken/{tokenId}
I miss /oauth/token endpoint, which is used to generate and refresh tokens. Of course oauth flow is working ok
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
OAuth 2.0 - Swagger
OAuth 2.0 is an authorization protocol that gives an API client limited access to user data on a web server. GitHub, Google, and...
Read more >OAuth2 authorization endpoint is not listed in Swagger using ...
I use Spring Security 5 to build OAuth2 login and SpringFox for Swagger. There is an endpoint /oauth2/authorization/my-oauth , but this ...
Read more >Hiding Endpoints From Swagger Documentation in Spring Boot
Let's have a look at how we can hide endpoints from Swagger API ... The most common scenario to do so is when...
Read more >F.A.Q - Springdoc-openapi
It detects the overloaded endpoints, and generates parameters.schema.oneOf. What is a proper way to set up Swagger UI to use provided spec.yml?
Read more >OpenAPI/Swagger Support - GitHub Pages
You can customize the generated Swagger using the standard Swagger Annotations. ... You can also provide some tags for all endpoints with the ......
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
Hi @kdanko and @Marx2 ,
We will add introduce the support of spring-security-oauth2 authorization server, in the next release v1.2.27: You can have a look at snapshot and test it in advance. Make sure you reference also:
The problem is that “/oauth/token” endpoint is NOT visible in Swagger documentation. My service is client and server at the same time, so it should list all endpoints for oauth, and the most important is “/oauth/token”, which is not displayed. I’m attaching screenshot of generated documentation, “/oauth/token” is missing:
I think task should be reopened