<feat>[iam2]: add ZIAM provider name constant (P1)#3853
<feat>[iam2]: add ZIAM provider name constant (P1)#3853ZStack-Robot wants to merge 1 commit intofeature-5.5.22-zcf-temporaryfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Walkthrough在 Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 诗
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
abstraction/src/main/java/org/zstack/abstraction/sso/OAuth2PluginConstants.java (1)
49-49: 常量定义正确,遵循了规范!新增的
ZIAM_PROVIDER_NAME常量:
- ✅ 命名遵循全大写+下划线的常量命名规范
- ✅ 没有使用冗余的
public static final修饰符(接口常量隐式为 public static final)- ✅ 与其他提供者常量(第 44-48 行)的模式保持一致
- ✅ 值 "ziam" 与现有提供者名称无冲突
根据 PR 目标,该常量将作为
OAuth2ClientVO.identityProvider的鉴别值,用于支持 ZIAM OIDC ROPC 集成,符合设计意图。♻️ 可选的风格统一建议
注意到文件中存在风格不一致:第 9-42 行的常量使用了显式的
public static final修饰符,而第 44-49 行没有。根据编码规范"接口方法不应有多余的修饰符"(此规范同样适用于接口字段),建议在后续维护时统一移除第 9-42 行的冗余修饰符,使整个文件风格一致。但这不影响当前 PR,当前新增代码已遵循了更好的实践。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@abstraction/src/main/java/org/zstack/abstraction/sso/OAuth2PluginConstants.java` at line 49, Remove the redundant explicit modifiers from interface constants to unify style: in OAuth2PluginConstants, change the earlier constants that currently declare "public static final" to use the implicit interface-constant form (no modifiers), so they match the newly added ZIAM_PROVIDER_NAME and other provider constants; locate the constants declared in OAuth2PluginConstants (the provider name constants and any others with explicit public static final) and remove the explicit modifiers while keeping names and values unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@abstraction/src/main/java/org/zstack/abstraction/sso/OAuth2PluginConstants.java`:
- Line 49: Remove the redundant explicit modifiers from interface constants to
unify style: in OAuth2PluginConstants, change the earlier constants that
currently declare "public static final" to use the implicit interface-constant
form (no modifiers), so they match the newly added ZIAM_PROVIDER_NAME and other
provider constants; locate the constants declared in OAuth2PluginConstants (the
provider name constants and any others with explicit public static final) and
remove the explicit modifiers while keeping names and values unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)
Review profile: CHILL
Plan: Pro
Run ID: 7884306f-3759-461a-afa7-7109404dfeef
📒 Files selected for processing (1)
abstraction/src/main/java/org/zstack/abstraction/sso/OAuth2PluginConstants.java
c179a4f to
83a33a1
Compare
83a33a1 to
0515305
Compare
Summary
P1 ZIAM OIDC ROPC 打通的父仓库部分:在
OAuth2PluginConstants中新增ZIAM_PROVIDER_NAME = "ziam",作为OAuth2ClientVO.identityProvider的判别值,与 premium 仓库侧的ZiamProvider/IAM2RopcLoginBackend配套。Test plan
sync from gitlab !9725