swagger-api / swagger-api/swagger-ui
Authentication with Open ID Connect response_type hardcoded to token ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- Swagger-UI version: 4.5.0
- Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.0
Swagger/OpenAPI definition:
@SecuritySchemes({
@SecurityScheme(
name = "OAuth2",
type = SecuritySchemeType.OPENIDCONNECT,
openIdConnectUrl = "https://url-to-well-known-config")
})
Swagger-UI configuration options:
window.onload = function() {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: '/api/openapi.json',
dom_id: '#swagger-ui'
});
// End Swagger UI call region
ui.initOAuth({
clientId: "XXXXXX",
realm: "XXXXXXX",
scopes: "openid"
})
window.ui = ui;
};
How can we help?
The generate URL for the implicit flow hardcodes the response_type to token and we need id_token+token
the openidconnext config url does have the "id_token" has a supported type.
How can we chose which response_type we want ?
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ui.initOAuth configuration and trace how Swagger UI generates the OpenID Connect implicit-flow URL and its response_type. Compare the current token-only behavior with the reported need for id_token+token; done means the requested response type can be selected without regressing the existing token flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100