Beispiel #1
0
 def __new__(cls, opts):
     AuthManager(opts)
     return {
         Regex.string_url_regex("backend"): {
             "": StartAuthController,
             "callback": EndAuthController,
         }
     }
Beispiel #2
0
	def __new__(cls, opts):
		AuthManager(opts)
		return {
			Regex.string_url_regex("backend"): {
				"": StartAuthController,
				"callback": EndAuthController,
			}
		}
Beispiel #3
0
	def __new__(cls, opts):
		AuthController.options = Dict.merge(AuthController.options, opts)
		base_uri = AuthController.options["common"]["base_uri"]
		AuthController.options["common"]["success_uri"] = urljoin(base_uri, AuthController.options["common"]["success_uri"])
		AuthController.options["common"]["error_uri"] = urljoin(base_uri, AuthController.options["common"]["error_uri"])
		for backend, params in AuthController.options.items():
			if "redirect_uri" in params:
				params["redirect_uri"] = urljoin(base_uri, params["redirect_uri"])
		return {
			Regex.string_url_regex("backend"): {
				"": StartAuthController,
				"callback": EndAuthController,
			}
		}