We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f9e7f29 + b5e79e1 commit e27946aCopy full SHA for e27946a
lib.js
@@ -4,7 +4,14 @@ const jwksClient = require('jwks-rsa');
4
const jwt = require('jsonwebtoken');
5
const util = require('util');
6
7
-const getPolicyDocument = (effect, resource) => {
+const getPolicyDocument = (effect, methodArn) => {
8
+
9
+ // parse the ARN from the incoming resource
10
+ var methodArnComponents = methodArn.split(':');
11
+ var apiOptions = methodArnComponents[5].split('/');
12
+ methodArnComponents[5] = [apiOptions[0], apiOptions[1], "*"].join('/');
13
+ var resource = methodArnComponents.join(':');
14
15
const policyDocument = {
16
Version: '2012-10-17', // default version
17
Statement: [{
0 commit comments