Skip to content
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

Authentication fails with httpApiKey #591

Closed
KhudaDad414 opened this issue Nov 20, 2023 · 4 comments
Closed

Authentication fails with httpApiKey #591

KhudaDad414 opened this issue Nov 20, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@KhudaDad414
Copy link
Member

Describe the bug

I am trying to authenticate against the slack socket mode websocket server but glee throw this error:

TypeError: Cannot read properties of undefined (reading 'json')
    at file:///Users/rktrees/request-reply/dist/lib/wsHttpAuth.js:28:78
    at Array.map (<anonymous>)
    at GleeAuth.checkClientAuthConfig (file:///Uyncapi/glee.worktrees/request-reply/dist/lib/wsHttpAuth.js:25:63)
    at GleeAuth.<anonymous> (file:/ees/request-reply/dist/lib/wsHttpAuth.js:145:35)
    at Generator.next (<anonymous>)
    at fulfilled (file:///Ust-reply/dist/lib/wsHttpAuth.js:4:58)

asyncapi.yaml

asyncapi: 3.0.0
info:
  title: Slack Websocket and OpenAI API
  version: 1.0.0
...
  Slack_WebSocket:
    host: wss-primary.slack.com
    pathname: /link/
    protocol: wss
    security:
      - $ref: '#/components/securitySchemes/app_id'
      - $ref: '#/components/securitySchemes/token'
...
components:
  securitySchemes:
    token:
      type: httpApiKey
      name: ticket
      in: query
    app_id:
      type: httpApiKey
      name: app_id
      in: query
...
x-remoteServers: 
  - Slack_WebSocket

auth/Slack_WebSocket.ts

export const clientAuth = () => {
  return {
    ticket: '3863c5be0b173c',
    app_id: 'b02112d9364c32efb98f'
  }
}

cc: @Souvikns @oviecodes

@KhudaDad414 KhudaDad414 added the bug Something isn't working label Nov 20, 2023
@oviecodes
Copy link
Contributor

@KhudaDad414 it's all the same bug, the issues stems from using asyncAPI version 3 rather than version 2, so the fix @Souvikns is working on should resolve it.

@KhudaDad414
Copy link
Member Author

@oviecodes sorry, I thought we merged this: #588 🤦

@Souvikns
Copy link
Member

Souvikns commented Jan 2, 2024

@KhudaDad414 I think this one is solved should we close this?

@KhudaDad414
Copy link
Member Author

@Souvikns definitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants