{t('已从 Discovery 获取配置,可继续手动修改所有字段。')}
{discoveryAutoFilledLabels ? (
{t('自动填充字段')}:
{' '}
{discoveryAutoFilledLabels}
) : null}
{discoveryInfo.scopesSupported?.length ? (
{t('Discovery scopes')}:
{' '}
{discoveryInfo.scopesSupported.join(', ')}
) : null}
{discoveryInfo.claimsSupported?.length ? (
{t('Discovery claims')}:
{' '}
{discoveryInfo.claimsSupported.join(', ')}
) : null}
}
/>
)}
({
value: key,
label: config.name,
})),
]}
/>
}
onClick={handleFetchFromDiscovery}
loading={discoveryLoading}
block
>
{t('获取 Discovery 配置')}
{t(
'图标使用 react-icons(Simple Icons)或 URL/emoji,例如:github、gitlab、si:google',
)}
}
showClear
/>
{getOAuthProviderIcon(formValues.icon || '', 24)}
{t('OAuth 端点')}
{t('字段映射')}
{t('配置如何从用户信息 API 响应中提取用户数据,支持 JSONPath 语法')}
{
const keys = Array.isArray(activeKey) ? activeKey : [activeKey];
setAdvancedActiveKeys(keys.filter(Boolean));
}}
>
{t('准入策略')}
{t('可选:基于用户信息 JSON 做组合条件准入,条件不满足时返回自定义提示')}
mergeFormValues({ access_policy: value })}
label={t('准入策略 JSON(可选)')}
rows={6}
placeholder={`{
"logic": "and",
"conditions": [
{"field": "trust_level", "op": "gte", "value": 2},
{"field": "active", "op": "eq", "value": true}
]
}`}
extraText={t('支持逻辑 and/or 与嵌套 groups;操作符支持 eq/ne/gt/gte/lt/lte/in/not_in/contains/exists')}
showClear
/>
mergeFormValues({ access_denied_message: value })}
label={t('拒绝提示模板(可选)')}
placeholder={t('例如:需要等级 {{required}},你当前等级 {{current}}')}
extraText={t('可用变量:{{provider}} {{field}} {{op}} {{required}} {{current}} 以及 {{current.path}}')}
showClear
/>