Skip to content

TapasFE/tapas-authorize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tapas Authorize

Qiniu

const koa = require('koa');
const mount = require('koa-mount');
const authorize = require('tapas-authorize');

// Set your secret keys at first
authorize.qiniu.setKeys('ACCESS_KEY', 'SECRET_KEY');

// Build middleware with bucket only
const mw = authorize.qiniu('tapas-bucket');
// Build middleware with bucket and options
const mw = authorize.qiniu('tapas-bucket', {saveKey: 'tapas/images/$(etag)'});

// Mount
const app = koa();
app.use(mount('/auth/qiniu_token', mw));
app.listen(8080);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published