in chalice/app.py [0:0]
def _generate_allowed_resources(self, request: AuthRequest) -> List[str]:
allowed_resources = []
for route in self.routes:
if isinstance(route, AuthRoute):
methods = route.methods
path = route.path
elif route == '*':
# A string route of '*' means that all paths and
# all HTTP methods are now allowed.
methods = ['*']
path = '*'
else:
# If 'route' is just a string, then they've
# opted not to use the AuthRoute(), so we'll
# generate a policy that allows all HTTP methods.
methods = ['*']
path = route
for method in methods:
allowed_resources.append(
self._generate_arn(path, request, method))
return allowed_resources