Express Middleware for Pivotal Cloud Foundry Single Sign-On
Very much a work in progress, use/extend at your own risk!
The purpose of this module is to wrap the process of interfacing with the Single Sign-On service provided for Pivotal Cloud Foundry into a middleware for express js.
For more information on PCF SSO visit: PCF Single Sign-On Overview
Basic Usage Example:
'use strict';const Port = processenvPORT || 8080;const AUTH_CONDITION = processenvENABLE_AUTH || false; const express = ;const session = ;const PcfSSOExpressMw = ; const app = ; // See Note #1app; const auth = app;auth; app; app; app;
Notes:
- Use an external store once in production, something like Express-Sessions
- Use a secret provided via environment variables once in procudtion