Skip to content

Conversation

@commonism
Copy link
Owner

fixes #92

ggpwnkthx and others added 2 commits June 8, 2023 08:52
Using httpx_auth in the glue files so that the httpx authentication parameter is used as much as possible. The changes were designed to handle combination authentication methods. It brings support for OAuth2, AWSSigV4, and more.

Any authentication method in the httpx_auth library can be used directly and dynamically. In order to ensure Security Schemes Objects continue to follow the OpenAPI specifications, the type must be set to "http" and the scheme can be set to any of the httpx_auth classes that extend the httpx.Auth class.

Example Spec:
spec = {...}
spec["components"]["securitySchemes"]["sigv4"] = {"type": "http", "scheme": "aws4auth"}

api = OpenAPI("fict.iv", document=spec)
api.authenticate(
    apiKey="asdf1234",
    sigv4={
        "access_id": "my-access-id",
        "secret_key": "my-secret-key",
        "service": "execute-api",
        "region": "us-east-1",
    },
)
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #99 (ab7d0c7) into master (9b238bd) will decrease coverage by 0.88%.
The diff coverage is 39.50%.

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
- Coverage   94.89%   94.01%   -0.88%     
==========================================
  Files          78       78              
  Lines        4894     4963      +69     
==========================================
+ Hits         4644     4666      +22     
- Misses        250      297      +47     
Flag Coverage Δ
unittests 94.01% <39.50%> (-0.88%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiopenapi3/v30/glue.py 76.42% <31.48%> (-13.03%) ⬇️
aiopenapi3/v20/glue.py 82.88% <42.85%> (-5.21%) ⬇️
tests/path_test.py 99.60% <100.00%> (+<0.01%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@commonism commonism merged commit c1ac973 into master Jun 8, 2023
@commonism commonism deleted the Esquire-Media/master branch June 8, 2023 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants