git ssb

1+

Dominic / ssb-keys



Commit bbbd29b65c8ed765e15d78274384d695de8acec7

Merge pull request #11 from dominictarr/master

createAuth method
Paul Frazee committed on 3/6/2015, 8:48:47 PM
Parent: 5f9f193e1855719d8c60ef976a86474ce6be2779
Parent: 4180b9752e30345f4c196c7dc8648334cf9b2913

Files changed

index.jschanged
index.jsView
@@ -227,4 +227,12 @@
227227 var str = JSON.stringify(obj, null, 2)
228228 var _hmac = exports.hmac(str, secret)
229229 return deepEqual(hmac, _hmac)
230230 }
231+
232+exports.createAuth = function (keys, role) {
233+ return ssbKeys.signObj(keys, {
234+ role: role || 'client',
235+ ts: Date.now(),
236+ public: keys.public
237+ })
238+}

Built with git-ssb-web