xianyu-backend-java/utils/geetest/geetest_config.py
2025-12-23 23:02:24 +08:00

36 lines
984 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
极验验证码配置
说明:
- captcha_id 和 private_key 需要从极验官网申请
- 当前使用的是示例配置,生产环境请替换为自己的密钥
"""
import os
class GeetestConfig:
"""极验验证码配置类"""
# 极验分配的captcha_id从环境变量读取有默认值
CAPTCHA_ID = os.getenv("GEETEST_CAPTCHA_ID", "a30cdbb466e9349385762477cb2c7df6")
# 极验分配的私钥(从环境变量读取,有默认值)
PRIVATE_KEY = os.getenv("GEETEST_PRIVATE_KEY", "6f70322308eb29ae0d85516a14a32d2c")
# 用户标识(可选)
USER_ID = os.getenv("GEETEST_USER_ID", "xianyu_system")
# 客户端类型web, h5, native, unknown
CLIENT_TYPE = "web"
# API地址
API_URL = "http://api.geetest.com"
REGISTER_URL = "/register.php"
VALIDATE_URL = "/validate.php"
# 请求超时时间(秒)
TIMEOUT = 5
# SDK版本
VERSION = "python-fastapi:1.0.0"