feat: support OIDC login.
This commit is contained in:
@@ -820,6 +820,46 @@ linuxdo_connect:
|
||||
userinfo_id_path: ""
|
||||
userinfo_username_path: ""
|
||||
|
||||
# =============================================================================
|
||||
# Generic OIDC OAuth Login (SSO)
|
||||
# 通用 OIDC OAuth 登录(用于 Sub2API 用户登录)
|
||||
# =============================================================================
|
||||
oidc_connect:
|
||||
enabled: false
|
||||
provider_name: "OIDC"
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
# 例如: "https://keycloak.example.com/realms/myrealm"
|
||||
issuer_url: ""
|
||||
# 可选: OIDC Discovery URL。为空时可手动填写 authorize/token/userinfo/jwks
|
||||
discovery_url: ""
|
||||
authorize_url: ""
|
||||
token_url: ""
|
||||
# 可选(仅补充 email/username,不用于 sub 可信绑定)
|
||||
userinfo_url: ""
|
||||
# validate_id_token=true 时必填
|
||||
jwks_url: ""
|
||||
scopes: "openid email profile"
|
||||
# 示例: "https://your-domain.com/api/v1/auth/oauth/oidc/callback"
|
||||
redirect_url: ""
|
||||
# 安全提示:
|
||||
# - 建议使用同源相对路径(以 / 开头),避免把 token 重定向到意外的第三方域名
|
||||
# - 该地址不应包含 #fragment(本实现使用 URL fragment 传递 access_token)
|
||||
frontend_redirect_url: "/auth/oidc/callback"
|
||||
token_auth_method: "client_secret_post" # client_secret_post | client_secret_basic | none
|
||||
# 注意:当 token_auth_method=none(public client)时,必须启用 PKCE
|
||||
use_pkce: false
|
||||
# 开启后强制校验 id_token 的签名和 claims(推荐)
|
||||
validate_id_token: true
|
||||
allowed_signing_algs: "RS256,ES256,PS256"
|
||||
# 允许的时钟偏移(秒)
|
||||
clock_skew_seconds: 120
|
||||
# 若 Provider 返回 email_verified=false,是否拒绝登录
|
||||
require_email_verified: false
|
||||
userinfo_email_path: ""
|
||||
userinfo_id_path: ""
|
||||
userinfo_username_path: ""
|
||||
|
||||
# =============================================================================
|
||||
# Default Settings
|
||||
# 默认设置
|
||||
|
||||
Reference in New Issue
Block a user