• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DemocracyClub / aggregator-api / 35e2328b-f8d4-4c33-9e5f-3773636c9008

10 Dec 2024 02:11PM UTC coverage: 72.986% (-0.3%) from 73.333%
35e2328b-f8d4-4c33-9e5f-3773636c9008

Pull #578

circleci

awdem
adapts smoke tests to handle basic auth
Pull Request #578: Feat/basic auth lambda 2

0 of 7 new or added lines in 1 file covered. (0.0%)

1078 of 1477 relevant lines covered (72.99%)

0.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/frontend/lambda_basic_auth.py
NEW
1
def lambda_handler(event, context):
×
NEW
2
    headers = event.get("headers", {})
×
NEW
3
    auth = headers.get("Authorization")
×
NEW
4
    dc_auth = "Basic ZGM6ZGM="  # dc:dc in base64
×
5

NEW
6
    if auth == dc_auth:
×
NEW
7
        return {
×
8
            "principalId": "dc",
9
            "policyDocument": {
10
                "Version": "2012-10-17",
11
                "Statement": [
12
                    {
13
                        "Action": "execute-api:Invoke",
14
                        "Effect": "Allow",
15
                        "Resource": "*",
16
                    }
17
                ],
18
            },
19
        }
20

NEW
21
    raise Exception("Unauthorized")
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc