Skip to content
Myr

feat(middleware): add bearer auth middleware (#299)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* feat(middleware): add bearer auth middleware Close #279 * add prefix option * tweak

authored by Yusuke Wada · committed by GitHub · parent 153fe69 · Browse files · 4 files+171 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+171 added−0 removed

  • tests:+67 added−0 removed
  • other:+104 added−0 removed

4 files+171 added−0 removed

added:src/middleware/bearer-auth/index.test.ts+67 added
added:src/middleware/bearer-auth/index.ts+66 added
added:src/middleware/bearer-auth/README.md+34 added
modified:package.json+4 added
16 unmodified lines
17 },18 "exports": {19 ".": "./dist/index.js",20 "./basic-auth": "./dist/middleware/basic-auth/index.js",21 "./bearer-auth": "./dist/middleware/bearer-auth/index.js",22 "./body-parse": "./dist/middleware/body-parse/index.js",23 "./cookie": "./dist/middleware/cookie/index.js",24 "./cors": "./dist/middleware/cors/index.js",25 "./etag": "./dist/middleware/etag/index.js",
15 unmodified lines
41 "*": {42 "basic-auth": [43 "./dist/middleware/basic-auth"44 ],45 "bearer-auth": [46 "./dist/middleware/bearer-auth"47 ],48 "body-parse": [49 "./dist/middleware/body-parse"50 ],51 "cookie": [
100 unmodified lines