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

Sign WebSocket request #99

Open
Mzem opened this issue Sep 24, 2019 · 3 comments
Open

Sign WebSocket request #99

Mzem opened this issue Sep 24, 2019 · 3 comments

Comments

@Mzem
Copy link

Mzem commented Sep 24, 2019

Hello,

Is there any options to sign a WebSocket request (for API Gateway WebSocket API) ?

@codaabraham
Copy link

Any update on this?

@aashitvyas
Copy link

@mhart I am wondering if I can sign WebSocket Request through this aws4 sign library ?

@aceysmith
Copy link

Yes there is!

aws4.sign({
  host: 'XXX.execute-api.XXX.amazonaws.com',
  path: '/XXX,
  signQuery: true,
}, {
  accessKeyId: 'XXX',
  secretAccessKey: 'XXX',
  sessionToken: 'XXX',
})

let socket = new WebSocket("wss://" + signedUrl.host + signedUrl.path)
socket.onopen = function() {
  console.log('CONNECTED')
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants