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

authentication refactory #121

Merged
merged 7 commits into from
Dec 20, 2024
Merged

authentication refactory #121

merged 7 commits into from
Dec 20, 2024

Conversation

devkral
Copy link
Contributor

@devkral devkral commented Dec 20, 2024

Checklist

  • The code has 100% test coverage.
  • The documentation was properly created or updated (if applicable) following the correct guidelines and appropriate language.
  • I branched out from the latest main or is a sub-branch.

Summary or description

  • Refactor authentication.
  • Allow multiple backends.
  • Move backend logic from BaseAuthMiddleware to AuthenticationMiddleware
  • Fix broken examples in docs and docs
  • Remove non-mandatory stubs from user interface

Changes:

- fix docs
- refactor authentication
- remove methods stubs get_id and identity from interface. They were not required and had
  no function
- allow multiple backends
not correctly defined

first: they are all not defined as interface in docs

is_active: defaults to False, also False for BasicUser
is_anonymous: not defined in BaseUser. Afaik cannot be checked safely.
Rendundant for is_authenticated
get_id: return None
identity: raises NotImplemented and not in docs specified
- make only abstract, protocol would fail
@tarsil tarsil merged commit c88d529 into main Dec 20, 2024
8 checks passed
@tarsil tarsil deleted the devkral/fixes/authentication branch December 20, 2024 11:52
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