Skip to content

letsface/koa-auth-header

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

Simple authentication header parser for koa.js framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published