slspress-jwt-authorizer

JWT authorizer for use with slspress

Usage no npm install needed!

<script type="module">
  import slspressJwtAuthorizer from 'https://cdn.skypack.dev/slspress-jwt-authorizer';
</script>

README

slspress-jwt-authorizer

createRS256BearerAuthorizer

Creates an authorizer that provides access based on a valid JWT bearer token from auth0. Only the RS256 algorithm is supported.

Usage:

const { create } = require('slspress');
const { createRS256BearerAuthorizer } = require('slspress-jwt-authorizer');
const app = create();

const auth0PublicKey = '';// load this from some props of something.

app.on('authorizer').authorizer(createRS256BearerAuthorizer(auth0PublicKey));

module.exports = app.export();