How to use the oauthenticator.GoogleAppsOAuthenticator function in oauthenticator

To help you get started, we’ve selected a few oauthenticator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ryanlovett / jh-google-oauthenticator / oauthenticator.py View on Github external
if not username or not username.endswith('@'+self.hosted_domain):
			username = None
		else:
			username = username.split('@')[0]

		if self.whitelist and username not in self.whitelist:
			username = None

		raise gen.Return(username)

class LocalGoogleOAuthenticator(LocalAuthenticator, GoogleOAuthenticator):
	"""A version that mixes in local system user creation"""
	pass

class LocalGoogleAppsOAuthenticator(LocalAuthenticator, GoogleAppsOAuthenticator):
	"""A version that mixes in local system user creation"""
	pass
github rgbkrk / jupyterhub-compmodels-deploy / roles / jupyterhub / files / docker_oauth.py View on Github external
This adds the user to the whitelist, and creates a system user by
        accessing a simple REST api.

        """
        homedir = os.path.join('/', 'home', user.name)
        os.mkdir(homedir)
        os.chown(homedir, 2000, 2000)
        self.log.info("Created home directory for user %s", user.name)
        if user.state is None:
            user.state = {}
        user.state['user_id'] = 2000
        self.db.commit()


class DockerOAuthenticator(DockerAuthenticator, GoogleAppsOAuthenticator):
    """A version that mixes in local system user creation from within a
    docker container, and Google OAuthentication.

    """
    pass