Closed jpobley closed 4 years ago
Good catch. Is there a way that we can check this in a test?
Good catch. Is there a way that we can check this in a test?
Hmmm. A test for the configuration or the handler? Testing configuration feels like we'd be testing traitlets
. Your instinct is right, though: this bug definitely would have been caught by a test case for the handler.
Writing a test for any of the handlers is made complicated by the handlers themselves being defined in the SAMLAuthenticator.get_handlers()
method. We could move the handler definitions out of that function, either to a new module or keep them in the same one, and then have their __init__
methods take the authenticator instance as an argument.
What do you think? It would increase the size of this PR, but I can take a stab at it between changing diapers.
Nah - I think this is fine. Thanks for the work. I'll try to get this up later today.
The current fix for backwards compatibility breaks the logout flow.
traitlets
will ignore any attribute injupyterhub_config.py
that's not defined on the class. When the typo was fixed, it meant that the bad attribute name couldn't be set on the class anymore.Currently, when the user logs out, the authenticator will check it and raise an
AttributeError
, sending a500: Internal Server Error
to the UI.Signed-off-by: JP Obley jpobley@gmail.com