Does ads mean Active Directory? If so have a look at
That example is for LDAP, but you should be able to modify it to work with AD. In addition to the overridden authenticator you need to use a jupyter/docker-stacks image which can switch UID and GID at startup.