security-middleware
Security middleware for the Openshift OAuth server
Usage
Production
No configuration is required to run it in production mode.
Development
To run it locally, you will need to set following environment variables:
OAUTH2_CLIENT_ID
OAUTH2_CLIENT_SECRET
OAUTH2_REDIRECT_URL
API_SERVER_URL
SERVICEACCT_TOKEN
For more information about Openshift OAuth, see the Openshift documentation
Use it
-
To protect the ui
:
const inspect = require('security-middleware')
router.all(['/', '/*'], inspect.ui(), app)
-
To protect the api
:
const inspect = require('security-middleware')
router.all(['/', '/*'], inspect.app, app)