-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmanifest.js
37 lines (35 loc) · 1014 Bytes
/
manifest.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
var createMiddleware = require('./middlewareCreator');
module.exports = {
version: '1.3.0',
init: function(pluginContext) {
var middleWare = createMiddleware(pluginContext);
pluginContext.registerPolicy({
name: 'moesif',
policy: (actionParams) => {
return middleWare;
}
});
// console.log(pluginContext);
},
policies: ['moesif'], // this is for CLI to automatically add to "policies" whitelist in gateway.config
schema: {
// This is for CLI to ask about params 'eg plugin configure example'
"$id": 'http://www.moesif.com/schemas/policies/moesif.json',
"type": 'object',
"properties": {
applicationId: {
type: 'string',
description: 'application id obtained from your moesif account.'
},
sessionTokenHeader: {
type: 'string',
description: 'the header used for session tokens.'
},
debug: {
type: 'boolean'
}
},
required: [ 'applicationId' ]
}
};