Add an option for Authenticators to inject custom login instructions
Authenticators already have the ability to provide a custom confirmation_message after users log in. We use this with the ORCID authentication in tiled-demo.bluesky-project.io because the ORCID terms of service require us to echo back the ORCID that the user has logged in with. We use it with the BNL authentication because the Federal government requires us to show a user agreement after any interactive login.
We should additionally add an optional login_message which would be displayed before the Username: and Password: prompts. The use case might be unique to NSLS2 but it's been requested a lot: a message explaining that the user will receive a DUO push after entering their password. The message can also mention the option of typing password,OTP with a Yubikey press.
Changes:
-
See the instances of
confirmation_messageintiled.authenticators. Alogin_messageshould be added alongside it, for each Authenticator implementation. -
It should be included in the server's description that is presents to clients, again alongside
confirmation_message. https://github.com/bluesky/tiled/blob/f409d1a5658f16acb2fa33410d0509f1914b3e9d/tiled/server/router.py#L211-L233 -
The Python client should print it at the appropriate time, somewhere above https://github.com/bluesky/tiled/blob/f409d1a5658f16acb2fa33410d0509f1914b3e9d/tiled/client/context.py#L143
Then, in deployment-specific confirmation, an appropriate message can be added.