Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including koa-statelessauth with all npm packages installed. Try it out:

var koaStatelessauth = require("koa-statelessauth")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

koa-statelessauth v1.0.4

This is a stateless auth library for koa. If there is no Authorization header or if is empty it will return 401 status code. The library accepts a validator object with a validate function. Pass in your own object to determine how it validates. If the validator does not return a user object a 401 is returned; You can also pass in an optional options object that can define paths to ignore and therefore yield to the next function without validating the request.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free