Closed Benjaminpjacobs closed 4 years ago
Hey @callum-oakley - not exactly sure who to tag here - but since you were the most recent contributor I was hoping you might be able to take a look at these changes?
@Benjaminpjacobs good catch, can't quite believe I missed this. 🤦
Thanks! I'll cut a new release shortly.
published as 1.4.2
The http-ruby gem currently has the ability to transmit encrypted messages but not the ability to authenticate an encrypted channels. These channels subscriptions needs to include a step that generates and packages the shared secret that the client will use to decrypt any future messages on that channel.
This PR adds some simple methods and logic to pass the
shared_secret
attribute to the frontend in the case that the channel is prefixed with theencrypted
keyword.Only in the instance where the channel name has the
private-encrypted
prefix will theshared_secret
key be generated/included. Additionally in the instance there is noencryption_master_key
instance variable but the channel is prefixed with encrypted the gem will return nil for theshared_secret
attribute.