过渡版:本地验发token
This commit is contained in:
1 parent
fb71def840
commit
a5f0ec645d
14 files changed
+313
-220
No files matched your search
+15
-2
@@ -67,14 +67,27 @@ class Config:
|
||||
'permission_request_approved,permission_request_rejected,permission_batch_updated,task_completed',
|
||||
)
|
||||
|
||||
# JWT/Casdoor auth configuration (phase-1 compatible rollout)
|
||||
AUTH_LEGACY_HEADER_ENABLED = os.getenv('AUTH_LEGACY_HEADER_ENABLED', 'true').lower() == 'true'
|
||||
AUTH_JWT_REQUIRED = os.getenv('AUTH_JWT_REQUIRED', 'false').lower() == 'true'
|
||||
# JWT 的签发者(iss)校验值,后端用它确认“这个 token 是谁发的”
|
||||
AUTH_JWT_ISSUER = os.getenv('AUTH_JWT_ISSUER', 'http://192.168.100.230:8088')
|
||||
# JWT 的受众(aud)校验值,后端用它确认“这个 token 是发给哪个应用的”
|
||||
AUTH_JWT_AUDIENCE = os.getenv('AUTH_JWT_AUDIENCE', '758be5fcba2df784fdb4')
|
||||
# 公钥集合地址(JWKS),后端从这里拉公钥来验签 JWT
|
||||
AUTH_JWT_JWKS_URL = os.getenv('AUTH_JWT_JWKS_URL', 'http://192.168.100.230:8088/.well-known/jwks')
|
||||
# 本地签发 JWT(过渡模式)时使用的 iss/aud(需与 auth_jwt.py 中签发保持一致)
|
||||
AUTH_JWT_LOCAL_ISSUER = os.getenv('AUTH_JWT_LOCAL_ISSUER', 'hxops-backend')
|
||||
AUTH_JWT_LOCAL_AUDIENCE = os.getenv('AUTH_JWT_LOCAL_AUDIENCE', 'hxops-frontend')
|
||||
|
||||
|
||||
class DevelopmentConfig(Config):
|
||||
DEBUG = True
|
||||
SQLALCHEMY_DATABASE_URI = os.getenv(
|
||||
'DATABASE_URL',
|
||||
#'postgresql://postgres:123456@8.152.207.171:5432/hxops_db',
|
||||
'postgresql://postgres:123456@8.152.207.171:5432/hxops_db',
|
||||
#'postgresql://postgres:difyai123456@localhost:5432/hxops_db',
|
||||
'postgresql://postgres:123456@localhost:5432/hxops_db',
|
||||
#'postgresql://postgres:123456@localhost:5432/hxops_db',
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user