@stvnrlly this is a PR against your #31 that slightly refactors things and ensures the documentation for the new methods shows up in the sphinx docs.
In particular, it changes get_user_by_email from a staticmethod to a classmethod. This is important because it's now calling other sub-methods, all of which we want to make overrideable. As a classmethod, this method can call sub-methods off cls, which allows subclasses that override those sub-methods to "just work". In contrast, as a staticmethod we have to hard-code UaaBackend when calling sub-methods, which would mean that any subclasses overriding those sub-methods would also have to trivially override get_user_by_email to call their subclass specifically, which is really annoying.
@stvnrlly this is a PR against your #31 that slightly refactors things and ensures the documentation for the new methods shows up in the sphinx docs.
In particular, it changes
get_user_by_email
from astaticmethod
to aclassmethod
. This is important because it's now calling other sub-methods, all of which we want to make overrideable. As aclassmethod
, this method can call sub-methods offcls
, which allows subclasses that override those sub-methods to "just work". In contrast, as astaticmethod
we have to hard-codeUaaBackend
when calling sub-methods, which would mean that any subclasses overriding those sub-methods would also have to trivially overrideget_user_by_email
to call their subclass specifically, which is really annoying.