Plugin context:currentUser.get

Hi Team,

I have a question on API.

I need to do encryption of text but it seems the only 2 plugins for encryption use a key that the admin defines on the plugin config page.

I’m creating message app where the users can define their own key.

So, I figured I’d write a new plugin for this.

I see this in the docs:

context = {
     currentUser: {
         get: function(fieldName: String) - returns the value of a field for the object
         listProperties: function() - returns an array of the different fields you can access 
     request: call request with a node request function, returns the response synchronously
     async: call context.async with a function that kicks off an asynchronous operation, 
         taking a callback taking (err, res). Returns res or else throws error.
     keys: Object with Keys defined in the Plugins Tab

Is there a way using get: function to pull data from an input box on my form defined as ‘key’ as this is where I want to store my key’s value temporarily.

something like:

mykey = context:currentUser.get: function(fieldName: Input Key.value)

Many thanks in advance!


If anyone is looking for this functionality, please check out Cryptolize plugin. From within your app, just search for it and you should find it in the store.