-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
fix: client security scheme now works with spec v3 #588
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
80adf7e
fix: client security scheme now works with spec v3
Souvikns 2245075
feat: update the http asyncapi file to v3
Souvikns 65a6144
Merge remote-tracking branch 'upstream/master' into client-security-fix
Souvikns 22acee1
feat: updated http examples
Souvikns fa940ec
Fix: examples to update auth
Souvikns eb29fed
Merge remote-tracking branch 'upstream/master' into client-security-fix
Souvikns a74ea4e
fix: update the auth loc logic for httpAPiKey
Souvikns e37bb1d
fix: adding query params in url
Souvikns 5780a96
feat: constructing url in auth
Souvikns ca6fa9d
Update wsHttpAuth.ts
Souvikns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,137 @@ | ||
asyncapi: 2.4.0 | ||
asyncapi: 3.0.0 | ||
info: | ||
title: AsyncAPI IMDB client | ||
version: 1.0.0 | ||
description: This app creates a client that subscribes to the server for getting the top 10 trending/upcoming anime. | ||
description: >- | ||
This app creates a client that subscribes to the server for getting the top | ||
10 trending/upcoming anime. | ||
servers: | ||
trendingAnime: | ||
url: http://localhost:8081 | ||
host: 'localhost:8081' | ||
protocol: http | ||
security: | ||
- token: [] | ||
- userPass: [] | ||
- apiKey: [] | ||
- UserOrPassKey: [] | ||
- oauth: | ||
- write:pets | ||
- read:pets | ||
- $ref: '#/components/securitySchemes/token' | ||
- $ref: '#/components/securitySchemes/userPass' | ||
- $ref: '#/components/securitySchemes/apiKey' | ||
- $ref: '#/components/securitySchemes/UserOrPassKey' | ||
- type: oauth2 | ||
flows: | ||
implicit: | ||
authorizationUrl: 'https://example.com/api/oauth/dialog' | ||
availableScopes: | ||
'write:pets': modify pets in your account | ||
'read:pets': read your pets | ||
authorizationCode: | ||
authorizationUrl: 'https://example.com/api/oauth/dialog' | ||
tokenUrl: 'https://example.com/api/oauth/dialog' | ||
availableScopes: | ||
'delete:pets': modify pets in your account | ||
'update:pets': read your pets | ||
scopes: | ||
- 'write:pets' | ||
- 'read:pets' | ||
testwebhook: | ||
url: ws://localhost:9000 | ||
host: 'localhost:9000' | ||
protocol: ws | ||
x-remoteServers: | ||
- trendingAnime | ||
channels: | ||
/test: | ||
test: | ||
address: '/test' | ||
bindings: | ||
ws: | ||
bindingVersion: 0.1.0 | ||
publish: | ||
operationId: index | ||
message: | ||
$ref: '#/components/messages/test' | ||
messages: | ||
testMessage: | ||
$ref: '#/components/messages/testMessage' | ||
servers: | ||
- $ref: '#/servers/testwebhook' | ||
trendingAnime: | ||
address: '/trendingAnime' | ||
bindings: | ||
http: | ||
type: request | ||
method: POST | ||
bindingVersion: 0.1.0 | ||
servers: | ||
- trendingAnime | ||
publish: | ||
operationId: trendingAnimeListRecieverController | ||
message: | ||
$ref: "../server/asyncapi.yaml#/components/messages/trendingAnime" | ||
subscribe: | ||
message: | ||
payload: | ||
type: object | ||
- $ref: '#/servers/trendingAnime' | ||
messages: | ||
trendingAnimeMessage: | ||
$ref: '#/components/messages/trendingAnimeMessage' | ||
operations: | ||
index: | ||
action: receive | ||
channel: | ||
$ref: '#/channels/test' | ||
messages: | ||
- $ref: '#/components/messages/testMessage' | ||
trendingAnimeListRecieverController: | ||
action: send | ||
channel: | ||
$ref: '#/channels/trendingAnime' | ||
messages: | ||
- $ref: '#/components/messages/trendingAnimeMessage' | ||
reply: | ||
channel: | ||
$ref: '#/channels/trendingAnime' | ||
messages: | ||
- $ref: '#/components/messages/trendingAnimeReply' | ||
components: | ||
messages: | ||
test: | ||
testMessage: | ||
summary: ping client | ||
payload: | ||
type: object | ||
trendingAnimeMessage: | ||
summary: Data required to populate trending anime | ||
payload: | ||
type: object | ||
required: | ||
- name | ||
- rating | ||
- genre | ||
- studio | ||
properties: | ||
name: | ||
type: string | ||
description: Name of the anime. | ||
rating: | ||
type: string | ||
description: Rating of the show. | ||
genre: | ||
type: string | ||
description: The genre of anime. | ||
studio: | ||
type: string | ||
description: The studio of anime. | ||
trendingAnimeReply: | ||
payload: | ||
type: object | ||
securitySchemes: | ||
token: | ||
type: http | ||
scheme: bearer | ||
bearerFormat: JWT | ||
userPass: | ||
type: userPassword | ||
apiKey: | ||
type: httpApiKey | ||
name: api_key | ||
in: query | ||
UserOrPassKey: | ||
type: apiKey | ||
in: user | ||
oauth: | ||
token: | ||
type: http | ||
scheme: bearer | ||
bearerFormat: JWT | ||
userPass: | ||
type: userPassword | ||
apiKey: | ||
type: httpApiKey | ||
name: api_key | ||
in: query | ||
UserOrPassKey: | ||
type: apiKey | ||
in: user | ||
oauth: | ||
type: oauth2 | ||
flows: | ||
implicit: | ||
authorizationUrl: https://example.com/api/oauth/dialog | ||
scopes: | ||
write:pets: modify pets in your account | ||
read:pets: read your pets | ||
authorizationUrl: 'https://example.com/api/oauth/dialog' | ||
availableScopes: | ||
'write:pets': modify pets in your account | ||
'read:pets': read your pets | ||
authorizationCode: | ||
authorizationUrl: https://example.com/api/oauth/dialog | ||
tokenUrl: https://example.com/api/oauth/dialog | ||
scopes: | ||
delete:pets: modify pets in your account | ||
update:pets: read your pets | ||
|
||
authorizationUrl: 'https://example.com/api/oauth/dialog' | ||
tokenUrl: 'https://example.com/api/oauth/dialog' | ||
availableScopes: | ||
'delete:pets': modify pets in your account | ||
'update:pets': read your pets | ||
x-remoteServers: | ||
- trendingAnime |
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have a centtral
README.md
file in the root ofanime-http
to explain how to run this example and what it is. I see we haveasyncapi.md
file in the client and the server folders but I don't see any useful info there for me to get started.