Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
byu-brownie-framework
Advanced tools
A front end web application framework that provides backwards compatability for brownie based systems
The purpose of this framework it to make it easy to write front end web applications that integrate the existing interoperability of C-Framework applications into a new generation of web applications.
It is recommended that you install this module globally as follows:
npm install -g byu-brownie-framework
If you choose to install locally within a directory you can issue this command:
npm install byu-brownie-framework
If you installed globally then you can start the server by issuing the command:
byu-brownie-framework [OPTIONS]... [DIRECTORY]
If you installed locally within a directory then you can start the server by navigating to that directory and running the command:
npm start [OPTIONS]... [DIRECTORY]
If you want to start the server within your own NodeJS code you can do the following:
var server = require('byu-brownie-framework');
server(directory [, options]);
For a full list of options either omit the directory or use the -h flag with the command. Each of the following lines are equivalent (depending on local or global install):
byu-brownie-framework
byu-brownie-framework -h
byu-brownie-framework --help
npm start
If you are running this with pm2, which I highly recommend then you can issue one of the following commands:
pm2 start byu-brownie-framework [OPTIONS]... [DIRECTORY] //global install
pm2 start bin/byu-brownie-framework [OPTIONS]... [DIRECTORY] //local install
The C-Framework wanted a way to persist data within a single tab or window when navigating to other loosely coupled web applications. Cookies could not be used because they are shared by all tabs and windows for that browser. If a user had more than one tab or window open at the same time then the persistent data would be overwritten by whichever tab or window last wrote to the cookie.
As a solution to this, the C-Framework incorporated a system of brownies (similar to cookies). Essentially this data was passed around by submitting a form that posted the persistent data to the C-Framework with every navigational change. In other words, if you clicked on a link, you were actually posting data from a hidden form, and that data was received by the C-Framework to build the next page with the data that you wanted persisted.
This same functionality can now be implemented with JavaScript's sessionStorage. With the advent of sessionStorage, and due to the increasing importance of decoupling server side code from front end code, this framework came into being.
This framework keeps interoperability with the C-Framework, but also is liberated from the need to post persistent data between web applications by using sessionStorage instead.
Because this framework is for front end applications, it also comes with a static file server. This server will automatically serve up any files that are in the distribution directory (as specified by the configuration).
One of the tools provided by this framework is that all link clicks will automatically be intercepted and analyzed before being followed. If the link is going to a C-Framework application then the brownie will automatically be encoded and posted to that URL. If it is not going to a C-Framework application then the link will function as normal.
The brownie is defined as a global JavaScript variable. When your application loads, it will already have the decrypted brownie data, whether it was supplied from the C-Framework or if it was stored in the sessionStorage.
You can get or manipulate the data in the brownie using one of these functions:
The C-framework stores a cookie in the browser named "brownie" for the domain *.byu.edu. That cookie is used as part of the key for encrypting and decrypting the brownie. Therefore, in order for this framework to work property it must also run on the byu.edu domain.
During development, a workaround would be to copy that "brownie" cookie from your browser for the *.byu.edu domain and make a cookie called "brownie" on the domain that you are developing on. This is only recommended for development if you cannot run the brownie framework server on the byu.edu domain.
FAQs
A front end web application framework that provides backwards compatability for brownie based systems
The npm package byu-brownie-framework receives a total of 5 weekly downloads. As such, byu-brownie-framework popularity was classified as not popular.
We found that byu-brownie-framework demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.