Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/guard against basic authentication #34

Closed

Conversation

maparent
Copy link

@maparent maparent commented Mar 6, 2024

Motivation:

Issue #33

All Submissions:

Note: CONTRIBUTING.md seems to be missing?
I did not see a relevant PR.

Changes to Core Features:

The explanation is in the issue; I have run tests locally and did not break them.
I have not provided new tests.

@@ -103,10 +103,9 @@ async def authenticate(self, request: Request) -> Optional[Tuple[Auth, User]]:
)
scheme, param = get_authorization_scheme_param(authorization)

if not scheme or not param:
if (not scheme or scheme.lower() != 'bearer') or not param:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but I don't think this is a good solution to the problem.

@ArtyomVancyan
Copy link
Member

ArtyomVancyan commented Mar 6, 2024

About the CONTRIBUTING.md, it is typical for all PySnippet organization projects. Also, some of the tests are failed:

tests/test_backends.py ..                                                [  7%]
tests/test_claims.py ....                                                [ 21%]
tests/test_middleware.py FFFF                                            [ 35%]
tests/test_oauth2.py FF.FF.                                              [ 57%]
tests/test_router.py ......                                              [ 78%]
tests/test_security.py ......                                            [100%]

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.

2 participants