I am trying to provide Google Authentication with custom usernames. I have figured out to use normalize_username for it. However, the transformation rules are very basic and I want to have my own table which will maintain email addresses as well as custom names generated using custom logic.
I have come up with SQLAlchemy based code to do so. However, I do not want to create a new connection or session for getting the mapping but want to use the existing JupyterHub connection pool. My question is whether there is a way to read the connection or session object from jupyterhub_config.py? Here is the logic I am planning to implement, please suggest if there is a better way than overriding normalize_username: * Get the email id from LocalGoogleAuthenticator * Check if there is a user created using custom logic, if not create an entry into a table which will contain username and email id. * If the user already exists, provide it as the normalized user in place of email id. It will give me the capability of using social authentication and also give the capability to create local users with some cryptic names without exposing email ids of my students. Your help is greatly appreciated in this regard. -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/f15343b2-07a4-493c-8efc-fac03c1466b3%40googlegroups.com.
