ServerJS/Modules/SecurableModules: Difference between revisions

Jump to navigation Jump to search
m
m (→‎Security: Added some details to future-proof the section on security, and added mention of the "environment" and "environment.print", which we've used for testing.)
Line 27: Line 27:
# A module receives an "environment" variable that is an Object.
# A module receives an "environment" variable that is an Object.
## The "environment" may have a "print" function that accepts a "message" and an optional "label" String.  
## The "environment" may have a "print" function that accepts a "message" and an optional "label" String.  
### The label may be one of "log", "warn", "error", "pass", "fail", "info", "help", and "module".
### The label may be one of "log", "warn", "error", "pass", "fail".
### Any other, unspecified label must be in lower-case and begin with "x" and a vendor-specific label like "x-chiron-log".
### Any other, unspecified label must be in lower-case and begin with "x" and a vendor-specific label like "x-v8cgi-database".
## Any other, unspecified members of "environment" must be in camelCase and begin with "x" and a vendor-specific label like "xCajaDomita"
## Any other, unspecified members of "environment" must be in camelCase and begin with "x" and a vendor-specific label like "xCajaDomita"
# The "require" function may have additional members.
# The "require" function may have additional members.
171

edits

Navigation menu