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

Add baseline Architecture to support auth + User sessions + Basic Auth #90

Merged
merged 16 commits into from May 7, 2024

Conversation

tianjing-li
Copy link
Collaborator

@tianjing-li tianjing-li commented May 2, 2024

Beefy first PR to setup plug & play Auth:

  • Adds new auth folder in services

  • Adds BaseAuthenticationStrategy abstract class and BasicAuthentication (email+password) to start with. The base class should be inherited from all Auth strategies, next steps should include adding OAuth strategies.

  • Adds auth routes, can retrieve session, logout, login, auth (to implement). The /login method should be generic and run for all auth strategies

  • Adds SessionMiddleware to track current user session

  • Adds extensive unit testing

  • Add tests and docs: Please include testing and documentation for your changes

  • Lint and test: Run make lint and make run-tests

@tianjing-li tianjing-li changed the title (WIP) Add baseline Architecture to support add + User sessions + Basic Auth (WIP) Add baseline Architecture to support auth + User sessions + Basic Auth May 2, 2024
@tianjing-li tianjing-li marked this pull request as ready for review May 3, 2024 18:27
@tianjing-li tianjing-li requested a review from a team as a code owner May 3, 2024 18:27
src/backend/main.py Outdated Show resolved Hide resolved
@tianjing-li tianjing-li changed the title (WIP) Add baseline Architecture to support auth + User sessions + Basic Auth Add baseline Architecture to support auth + User sessions + Basic Auth May 6, 2024
Copy link
Contributor

@scott-cohere scott-cohere left a comment

Choose a reason for hiding this comment

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

just two tiny things. good stuff! 😃

src/backend/services/auth/basic.py Outdated Show resolved Hide resolved
src/backend/services/auth/basic.py Outdated Show resolved Hide resolved
@scott-cohere scott-cohere merged commit 57691ad into main May 7, 2024
2 checks passed
@scott-cohere scott-cohere deleted the auth-base branch May 7, 2024 20:45
lakshyaag pushed a commit to lakshyaag/cohere-toolkit that referenced this pull request May 8, 2024
cohere-ai#90)

* Auth wip

* Add tests

* working basic auth

* add test coverage: still todo add session tests

* Add session tests

* Add docs

* fix types

* merge alembic

* add secret key fixture

* fix tests
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.

None yet

3 participants