Open aanno2 opened 4 years ago
Support securityScheme type 'openIdConnect' like type 'oauth2' is already supported.
If your securitrySchemes includes something like:
securitrySchemes
"securitySchemes": { "oAuth2Flows": { "type": "oauth2", "flows": { "implicit": { "authorizationUrl": "${KEYCLOAK_BASE_URL}/auth/realms/zap/protocol/openid-connect/auth", "scopes": { "openid": "description" } } } }
openapi-generator emits the following inside API calls:
openapi-generator
// authentication (oAuth2Flows) required if (this.configuration.accessToken) { const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); }
This is all right, as the client needs to send the (OAuth2) bearer token to the server.
However, for the type 'openIdConnect', the code is not generated.
"securitySchemes": { "kcqs": { "type": "openIdConnect", "openIdConnectUrl": "\${KEYCLOAK_BASE_URL}/auth/realms/zap/.well-known/openid-configuration" } }
Result:
// authentication (kcqs) required // nothing follows
The very same code must be generated for type 'openIdConnect' and type 'oauth2'.
👍 Thanks for opening this issue! 🏷 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
Is your feature request related to a problem? Please describe.
Support securityScheme type 'openIdConnect' like type 'oauth2' is already supported.
If your
securitrySchemes
includes something like:openapi-generator
emits the following inside API calls:This is all right, as the client needs to send the (OAuth2) bearer token to the server.
However, for the type 'openIdConnect', the code is not generated.
Result:
Describe the solution you'd like
The very same code must be generated for type 'openIdConnect' and type 'oauth2'.