-
Notifications
You must be signed in to change notification settings - Fork 34
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 logic refactor #1586
Conversation
self.authorization_token = authorization_token | ||
self.access_token = None | ||
|
||
def _get_network(self, access_token: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something very interesting @paaragon . If I use __get_network
here I cannot mock the method because as a private method the test cannot access to the method.
I didn't remember this so probably we should stop using that nomenclature, what do you think?
""" | ||
The main objective of this class is to manage the access to the model | ||
""" | ||
|
||
def get_or_create_by_id(self, user_id: str) -> type[AbstractUser]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also found a way to type that we are returning a user with type[AbstractUser]
. This way the linter doesn't complain 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Tansito . Very good job! this organisation looks so clean and performant.
Just one little change request 😉
Summary
This PR will refactor the entire authentication flow to prepare the project to introduce additional services like IBM Cloud. This is a 100% refactor, there is no change in the logic or the output. So the main purpose is the simplification and improvement of the codebase.
Details and comments