You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2016/09/15 23:37:20 UTC

[jira] [Created] (CB-11859) Generalized solution for plugins to add secrets to source files

Shazron Abdullah created CB-11859:
-------------------------------------

             Summary: Generalized solution for plugins to add secrets to source files
                 Key: CB-11859
                 URL: https://issues.apache.org/jira/browse/CB-11859
             Project: Apache Cordova
          Issue Type: New Feature
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: AllPlugins, CLI
            Reporter: Shazron Abdullah


i.e. set API keys and secrets that reside in source files in plugin.xml. Right now, this is a manual process.

Usually these tokens are interspersed in with existing code, we could mandate a separate "secrets.h" (or equivalent) file that we can token replace to minimize search/replace errors.

Either search/replace, or we "generate" a source file from these values. I like this latter approach better.

So, the "before", which is included in the plugin:
{code}
// secrets.h
// AUTO-GENERATED - do not modify!

#define CLIENT_KEY          @"NOT SET"
#define CLIENT_SECRET  @"NOT SET"
{code}

"After", according to `cordova plugin install` parameters:
{code}
// secrets.h
// AUTO-GENERATED - do not modify!

#define CLIENT_KEY          @"ASGSKL888A"
#define CLIENT_SECRET  @"BobsYourUncle"
{code}






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org