@stolostron/security-middleware
v1.0.6
Published
Security middleware for authentication
Downloads
18
Keywords
Readme
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 # OAuth Client ID
OAUTH2_CLIENT_SECRET # OAuth Client Secret
OAUTH2_REDIRECT_URL # Redirect URL
API_SERVER_URL # Kubernetes API URL
SERVICEACCT_TOKEN # Kubernetes Access 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)