-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #933 - Filter oauth security definitions from spec when generatin…
…g `CompositeAuthenticationProvider` (#942) * Fix #933 - Filter oauth security definitions from spec when generating Signed-off-by: Ricardo Zanini <[email protected]> * Make 'resolve' more complex by searching for assignable parameters Signed-off-by: Ricardo Zanini <[email protected]> * Incorporating @hbelmiro's review Signed-off-by: Ricardo Zanini <[email protected]> --------- Signed-off-by: Ricardo Zanini <[email protected]>
- Loading branch information
1 parent
07c812a
commit a645b3c
Showing
4 changed files
with
148 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...main/resources/templates/libraries/microprofile/auth/compositeAuthenticationProvider.qute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
client/deployment/src/test/resources/openapi/issue-933-security.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Generated API | ||
version: "1.0" | ||
paths: | ||
/: | ||
post: | ||
operationId: doOperation | ||
security: | ||
- client_id: [ ] | ||
- oauth: [ read, write ] | ||
- bearerAuth: [ ] | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/MultiplicationOperation' | ||
responses: | ||
"200": | ||
description: OK | ||
components: | ||
schemas: | ||
MultiplicationOperation: | ||
type: object | ||
securitySchemes: | ||
client_id: | ||
type: apiKey | ||
in: header | ||
name: X-Client-Id | ||
x-key-type: clientId | ||
bearerAuth: | ||
type: http | ||
scheme: bearer | ||
oauth: | ||
type: oauth2 | ||
flows: | ||
authorizationCode: | ||
authorizationUrl: https://example.com/oauth/authorize | ||
tokenUrl: https://example.com/oauth/token | ||
scopes: | ||
read: Grants read access | ||
write: Grants write access | ||
admin: Grants read and write access to administrative information | ||
clientCredentials: | ||
tokenUrl: http://localhost:8382/oauth/token | ||
scopes: | ||
read: read |