示例#1
0
文件: auth.py 项目: travofoz/kiss.py
 def __new__(cls, opts):
     AuthManager(opts)
     return {
         Regex.string_url_regex("backend"): {
             "": StartAuthController,
             "callback": EndAuthController,
         }
     }
示例#2
0
文件: auth.py 项目: Danisan/kiss.py
	def __new__(cls, opts):
		AuthManager(opts)
		return {
			Regex.string_url_regex("backend"): {
				"": StartAuthController,
				"callback": EndAuthController,
			}
		}
示例#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,
			}
		}