-
Notifications
You must be signed in to change notification settings - Fork 894
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
feat(framework) Add abstract user auth plugin #4618
Conversation
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.
LGTM!
2fbce91
to
ac839bb
Compare
5d3eb8b
to
473cd86
Compare
da5de46
to
ac88a18
Compare
@abstractmethod | ||
def login( | ||
login_details: dict[str, str], | ||
config: dict[str, Any], |
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.
Wouldn't it better to make use of some of the types we have for configs ? For example
flower/src/py/flwr/common/typing.py
Line 65 in fc8591f
UserConfig = dict[str, UserConfigValue] |
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 function expects a json dictionary here, and it would be rather flexible if we just use dict[str, Any]
. Though we normally just need to store scalars in the json dict, I am not quite sure what's the benefit of enforcing a stricter type here.
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.
It receives a {string: string}
(
flower/src/proto/flwr/proto/exec.proto
Line 67 in 0730b12
message GetLoginDetailsResponse { map<string, string> login_details = 1; } |
exec.proto
. Happy to leave it as Any
, but in other parts of the code we are more strict with these things (e.g. typing.UserConfig
)
This is the second PR introducing user authentication. The changes include:
ExecAuthPlugin
andCliAuthPlugin
.Please merge #4244 first before merging this PR.