Back to list
maronnjapan

scope-claims-reviewer

by maronnjapan

0🍴 0📅 Jan 6, 2026

SKILL.md


name: scope-claims-reviewer description: Review test cases for Scope and Claims handling. Covers openid scope requirement, standard scopes (profile, email, address, phone), claims request parameter, and claim types per OIDC Core 1.0 Section 5.4 and 5.5.

Scope and Claims Test Case Reviewer

Review test cases for Scope and Claims handling in OpenID Connect Basic OP.

Scope

  • Feature: Scope and Claims
  • Specifications: OIDC Core 1.0 Section 5.4, 5.5
  • Profile: Basic OP

Review Process

  1. Identify which scope/claims requirement the test targets
  2. Check against the checklist below
  3. Verify both success and error scenarios
  4. Ensure claim filtering based on scope works correctly
  5. Report gaps with specific spec section references

OpenID Scope (Mandatory)

OP-scope-openid

CheckRequirementSpec Reference
[ ]MUST support openid scopeOIDC Core 3.1.2.1
[ ]openid scope REQUIRED in auth requestOIDC Core 3.1.2.1
[ ]Return invalid_scope if openid missingOIDC Core 3.1.2.1

Standard Scopes

Scope Definitions

ScopeDescriptionSpec Reference
openidRequired for OIDC requestsOIDC Core 3.1.2.1
profileBasic profile informationOIDC Core 5.4
emailEmail address and verificationOIDC Core 5.4
addressPostal addressOIDC Core 5.4
phonePhone number and verificationOIDC Core 5.4
offline_accessRefresh token (if supported)OIDC Core 11

Scope to Claims Mapping

profile Scope

CheckClaimTypeSpec Reference
[ ]namestringOIDC Core 5.1
[ ]family_namestringOIDC Core 5.1
[ ]given_namestringOIDC Core 5.1
[ ]middle_namestringOIDC Core 5.1
[ ]nicknamestringOIDC Core 5.1
[ ]preferred_usernamestringOIDC Core 5.1
[ ]profilestring (URL)OIDC Core 5.1
[ ]picturestring (URL)OIDC Core 5.1
[ ]websitestring (URL)OIDC Core 5.1
[ ]genderstringOIDC Core 5.1
[ ]birthdatestring (YYYY-MM-DD)OIDC Core 5.1
[ ]zoneinfostring (timezone)OIDC Core 5.1
[ ]localestring (BCP47)OIDC Core 5.1
[ ]updated_atnumber (Unix time)OIDC Core 5.1

email Scope

CheckClaimTypeSpec Reference
[ ]emailstringOIDC Core 5.1
[ ]email_verifiedbooleanOIDC Core 5.1

address Scope

CheckClaimTypeSpec Reference
[ ]addressJSON objectOIDC Core 5.1.1

Address object fields:

  • formatted - Full mailing address
  • street_address - Street address (may include newlines)
  • locality - City or locality
  • region - State, province, prefecture
  • postal_code - Zip or postal code
  • country - Country name

phone Scope

CheckClaimTypeSpec Reference
[ ]phone_numberstring (E.164)OIDC Core 5.1
[ ]phone_number_verifiedbooleanOIDC Core 5.1

Claims in ID Token vs UserInfo

CheckRequirementSpec Reference
[ ]sub always in ID TokenOIDC Core 2
[ ]Other claims MAY be in ID Token or UserInfoOIDC Core 5.3
[ ]Claims based on requested scopesOIDC Core 5.4

Test Case Categories

OpenID Scope Tests

  • Valid: Request with scope=openid
  • Valid: Request with scope=openid profile
  • Invalid: Request without openid scope
  • Error: Returns invalid_scope

Profile Scope Tests

  • Valid: Profile claims returned when scope=profile
  • Valid: Only available claims returned (not all required)
  • Valid: No error if some claims unavailable

Email Scope Tests

  • Valid: email and email_verified returned
  • Valid: email_verified is boolean

Address Scope Tests

  • Valid: address object returned
  • Valid: address contains expected fields
  • Valid: formatted field contains full address

Phone Scope Tests

  • Valid: phone_number returned (E.164 format)
  • Valid: phone_number_verified is boolean

Multiple Scopes Tests

  • Valid: scope=openid profile email
  • Valid: Combined claims from all scopes
  • Valid: Unknown scopes ignored (no error)

Claim Location Tests

  • Valid: Claims in UserInfo endpoint
  • Valid: Claims in ID Token (if configured)
  • Valid: sub consistent across both

Handling Unknown/Unsupported Scopes

CheckRequirementSpec Reference
[ ]MAY ignore unknown scopesOIDC Core 3.1.2.1
[ ]Return granted scopes if differentOAuth 2.1 4.1.4
[ ]No error for unsupported optional scopesOIDC Core 5.4

Error Cases

ScenarioError CodeSpec Reference
Missing openid scopeinvalid_scopeOIDC Core 3.1.2.1
Invalid scope formatinvalid_scopeOAuth 2.1 4.1.2.1

Conformance Test IDs

Test IDFeature
OP-scope-openidopenid scope required
OP-scope-profileprofile scope handling
OP-scope-emailemail scope handling
OP-scope-addressaddress scope handling
OP-scope-phonephone scope handling
OP-scope-AllMultiple scopes combined

Review Output Format

## Test Case: [Name]
### Target Feature: Scope/Claims - [specific scope or claim]
### Test ID: OP-scope-[xxx] or OP-claims-[xxx]
### Spec Compliance:
- [x] Covers required behavior per [spec section]
- [ ] Missing: [specific requirement]
### Scope Handling:
- [x/blank] openid scope enforced
- [x/blank] Correct claims for scope
### Verdict: PASS / FAIL / PARTIAL
### Recommendations: [if any]

Score

Total Score

40/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon