npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

brightcove-auth-proxy

v0.2.8

Published

Brightcove Authentication PRoxy

Downloads

3

Readme

Brightcove Auth Proxy

The Brightcove access_token endpoint doesn't support CORS and requires the use of an Authorization header to retrieve an access token.

Thus, requests from web clients must be funneled through a server-based component which sets the Authorization header.

This is a quick and dirty implementation of an endpoint that supports retrieving an access token using express but is still compatible with the ASP.Net MVC based proxy contained in the connector VS Solution.

This endpoint listens to POSTs to localhost:3001/api/obtainAccessToken

Installation

With a recent version of nodejs installed:

npm install brightcove-auth-proxy

Then, to run:

brightcove-auth-proxy

use a process manager like PM2 to ensure the process continuously runs:

npm install pm2 -g
pm2 start brightcove-auth-proxy

Settings

The auth proxy implementation uses a clientid/clientsecret defined in request objects, however, if one would rather define the clientid/secret on the server (and ignore the supplied id/secret in the request), use following environment variables:

CORS whitelisted domains and port can be controlled as well.

Environment Variables:

export BC_ClientId=clientid
export BC_ClientSecret=clientsecret
export BC_GrantType=clientsecret
export BC_Whitelist=comma seperated domains
export BC_Port=port number

SSL

The following environment variables control SSL:

export BC_SSL_Port=SSL port number
export BC_SSL_Cert=path to ssl cert
export BC_SSL_Key=path to ssl private key

To obtain a cert for local development, use openSSL:

openssl req -x509 -out localhost-3002.crt -keyout localhost-3002.key \
  -newkey rsa:2048 -nodes -sha256 \
  -subj '/CN=localhost:3002' -extensions EXT -config <( \
   printf "[dn]\nCN=localhost:3002\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost:3002\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")

export BC_SSL_Cert=~/localhost-3002.crt
export BC_SSL_Key=~/localhost-3002.key