Open maedi opened 11 years ago
That helper outputs some javascript code: https://github.com/ryanb/private_pub/blob/master/lib/private_pub/view_helpers.rb#L12 So you can use simple javascript instead. Something like this would do it I guess:
<script type="text/javascript">
PrivatePub.sign({"server":"http://localhost:9292/faye","timestamp":1377071937590,"channel":"/your/channel","signature":"signature hash"});
</script>
@gregmolnar it possible
but is important think
subscription = PrivatePub.subscription(:channel => channel)
prepare subscription on backend as secure solution.. right/ ?
According to the Readme:
I'd like to use Private Pub in PhoneGap which can only run JavaScript. Can Private Pub do its authentication via an AJAX request instead? Or will I have to use Faye directly.