一键导入
spec-userinfo
UserInfoエンドポイント(UserInfo Endpoint)機能の開発・修正を行う際に使用。UserInfo claims、scopeフィルタリング、verified_claims実装時に役立つ。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
UserInfoエンドポイント(UserInfo Endpoint)機能の開発・修正を行う際に使用。UserInfo claims、scopeフィルタリング、verified_claims実装時に役立つ。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
外部API認証ユースケースの設定ガイド。外部API連携(認証委譲、リスク判定、OTP等)の interaction 設計、identity_match_field、MFA 2段階目、previous_interaction のヒアリングと設定JSONを提供。
ユースケース別セットアップのエントリポイント。ユーザーにユースケースを選択してもらい、対応するスキル(use-case-login, use-case-mfa等)にルーティングする。共通ワークフロー、前提条件、組み合わせパターンの概要を提供。
認証機能(Authentication Policy, MFA)の開発・修正を行う際に使用。認証ポリシー、パスワード、OTP、FIDO2、条件付き認証実装時に役立つ。
セキュリティ・脆弱性対策の開発・テストを行う際に使用。OAuth/OIDC攻撃対策、認証識別子切り替え攻撃、Session Fixation、マルチテナント分離、セキュリティテスト実装時に役立つ。
外部サービス連携(External Service Integration)機能の開発・修正を行う際に使用。HTTP Request Executor, MappingRule, OAuth/HMAC認証実装時に役立つ。
FIDO2/WebAuthn/パスキー関連の実装・設定・ドキュメント・テストを扱う時に使用。パスキー登録、認証、管理、アテステーション検証に関する作業で自動的に呼び出される。
基于 SOC 职业分类
| name | spec-userinfo |
| description | UserInfoエンドポイント(UserInfo Endpoint)機能の開発・修正を行う際に使用。UserInfo claims、scopeフィルタリング、verified_claims実装時に役立つ。 |
documentation/docs/content_06_developer-guide/03-application-plane/05-userinfo.md - UserInfo実装ガイドdocumentation/docs/content_03_concepts/04-tokens-claims/concept-01-id-token.md - クレーム概念UserInfoエンドポイントは、Access Tokenを使ってユーザー情報を取得するエンドポイント。
claims: プレフィックスverified_claims: プレフィックス(OIDC4IDA)libs/
└── idp-server-core/ # UserInfoコア
└── .../openid/userinfo/
├── handler/
│ ├── UserinfoHandler.java # UserInfo処理
│ └── UserinfoErrorHandler.java # エラー処理
├── UserinfoClaimsCreator.java # クレーム生成
├── UserinfoResponse.java # レスポンス
├── validator/
│ └── UserinfoValidator.java
├── verifier/
│ └── UserinfoVerifier.java
└── plugin/
└── UserinfoCustomIndividualClaimsCreators.java
idp-server-core/openid/userinfo/handler/UserinfoHandler.java 内の実際の実装:
public class UserinfoHandler {
OAuthTokenQueryRepository oAuthTokenQueryRepository;
AuthorizationServerConfigurationQueryRepository authorizationServerConfigurationQueryRepository;
ClientConfigurationQueryRepository clientConfigurationQueryRepository;
UserinfoCustomIndividualClaimsCreators userinfoCustomIndividualClaimsCreators;
public UserinfoRequestResponse handle(
UserinfoRequest request,
UserinfoDelegate delegate
) {
AccessTokenEntity accessTokenEntity = request.toAccessToken();
Tenant tenant = request.tenant();
// リクエスト検証
UserinfoValidator validator = new UserinfoValidator(request);
validator.validate();
// Access Token取得
OAuthToken oAuthToken = oAuthTokenQueryRepository.find(
tenant,
accessTokenEntity
);
if (!oAuthToken.exists()) {
throw new TokenInvalidException("not found token");
}
// 検証(トークン検証)
UserinfoVerifier verifier = new UserinfoVerifier(
oAuthToken,
request.toClientCert(),
request.dpopProof(),
request.httpMethod(),
request.httpUri()
);
verifier.verifyToken();
// ユーザー取得
User user = delegate.findUser(tenant, oAuthToken.subject());
verifier.verifyUser(user);
// クレーム生成
UserinfoClaimsCreator claimsCreator =
new UserinfoClaimsCreator(
user,
oAuthToken.authorizationGrant(),
authorizationServerConfiguration,
clientConfiguration,
userinfoCustomIndividualClaimsCreators
);
Map<String, Object> claims = claimsCreator.createClaims();
UserinfoResponse userinfoResponse =
new UserinfoResponse(user, claims);
return new UserinfoRequestResponse(
UserinfoRequestStatus.OK,
oAuthToken,
userinfoResponse
);
}
}
UserInfoクレームは、以下の要素から生成:
| Scope | 含まれるClaims |
|---|---|
profile | name, family_name, given_name, middle_name, nickname, preferred_username, profile, picture, website, gender, birthdate, zoneinfo, locale, updated_at |
email | email, email_verified |
phone | phone_number, phone_number_verified |
address | address |
claims:xxx | カスタムクレーム |
verified_claims:xxx | 本人確認済みクレーム(OIDC4IDA)※現在 UserInfo 未対応、ID Token のみ |
e2e/src/tests/
└── spec/
└── oidc_core_5_userinfo.test.js # UserInfo仕様テスト
# ビルド
./gradlew :libs:idp-server-core:compileJava
# テスト
cd e2e && npm test -- spec/oidc_core_5_userinfo.test.js
claims_supported に対象クレームが含まれているか確認(最も多い原因)claims パラメータで verified_claims を要求しているか確認