New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic token refresh for REST API with OpenID Connect authentication? #7257
Comments
We're looking for this as well. |
Same problem here using Swagger UI with FastAPI. oauth2_scheme = OAuth2AuthorizationCodeBearer(
authorizationUrl=ConfigHandler.get_config()["oauth2"]["authorization_server"]["authorization_url"], # The endpoint to get the authorization token
tokenUrl=ConfigHandler.get_config()["oauth2"]["authorization_server"]["token_url"], # The endpoint to get the actual access token
refreshUrl=ConfigHandler.get_config()["oauth2"]["authorization_server"]["token_url"]
) |
We tried specifying |
Having this would help much in testing our APIs. |
afaik, Swagger UI does not currently have token refresh. Happy to accept contributions, especially in this subject of authorization/authentication. 😉 |
Thinking about this more, one might be able to use |
Any progress on this problem? I also need this functionality. |
Any progress on this? it will be great help for developers |
|
+1 |
I am also looking for this feature in swagger, is there any progress? |
+1 |
Is there any update on this feature? Do you know anything @tim-lai |
I'm suffering with you |
Wished the fastapi docs could do this |
Q&A (please complete the following information)
Content & configuration
I am developing an application having a REST API that is secured by Spring Security, using Keycloak to provide OpenID Connect functionalities.
The OpenAPI specification is generated using Springdoc. AFAIK, the correct way of getting SwaggerUI to authenticate against OpenID Connect is to use OpenID Connect Discovery.
Swagger/OpenAPI definition:
How can we help?
Authorization works well in principal, but the application needs to do a token refresh automatically and regularly.
Currently, I can send valid request to the API until the validity of the token acquired during login has expired.
In the SwaggerUI documentation, I did not find how to configure such a thing like token refresh.
Is SwaggerUI able to perform an automatic token refresh or is there eventually a possibility that the user can trigger it manually?
The text was updated successfully, but these errors were encountered: