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);
-
Notifications
You must be signed in to change notification settings - Fork 0
License
TapasFE/tapas-authorize
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published