1.1.2 • Published 8 years ago

koa-auth-header v1.1.2

Weekly downloads
5
License
MIT
Repository
-
Last release
8 years ago

koa-auth-header

Simple authorization header parser for koa.js framework

Usage

app = koa();

var authHeader = require('koa-auth-header')({
  required: true, // if the authorization are required, will throw a 401 if the header is not present,
  types: {
    // if the authorization header is Authorization: Bearer: sometoken
    Bearer: function(value) {
      this.request.token = value;
    }
  }
});

app.use(authHeader);
1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

9 years ago

1.0.0

9 years ago