Skip to content

Implement token introspection and end session endpoints#279

Merged
Nlkomaru merged 2 commits intomasterfrom
feat/194-196-introspect-end-session
Mar 9, 2026
Merged

Implement token introspection and end session endpoints#279
Nlkomaru merged 2 commits intomasterfrom
feat/194-196-introspect-end-session

Conversation

@Nlkomaru
Copy link
Member

@Nlkomaru Nlkomaru commented Mar 9, 2026

Summary

  • Token Introspection (RFC 7662, feat: Implement token introspection endpoint (/oauth2/introspect) #194): Resource servers can query token validity and metadata via POST /oauth2/introspect
  • End Session (OIDC RP-Initiated Logout, feat: Implement end session endpoint (/oauth2/end_session) #196): Clients can initiate user logout via GET /oauth2/end_session with optional redirect
  • Dependency Updates: Exposed ORM 0.61.0 → 1.1.1 (full package migration), Shadow 9.0.0-beta4 → 9.3.2
  • OAuth Infrastructure Refactoring:
    • JwtProvider: Shared JWT algorithm/verifier caching (eliminates redundant key loading and verifier construction across 6 files)
    • KeyUtils.getKeys() caching: Lazy-cached PEM file I/O (was reading from disk on every call, up to 8× per request)
    • Client authentication commonization in OAuthValidation (extractClientCredentials, authenticateConfidentialClient, authenticateClient)
    • Security fix: Replaced JWT.decode() in RevokeRouter with signature-verifying lenientVerifier
  • OIDC Discovery updated with introspection_endpoint and end_session_endpoint

Closes #194
Closes #196

Test plan

  • Verify POST /oauth2/introspect returns active=true with metadata for valid tokens
  • Verify POST /oauth2/introspect returns active=false for expired/revoked/invalid tokens
  • Verify GET /oauth2/end_session redirects with valid id_token_hint and post_logout_redirect_uri
  • Verify GET /oauth2/end_session rejects invalid id_token_hint
  • Verify /.well-known/openid-configuration includes new endpoints
  • Verify existing token/revoke/authorize flows still work after refactoring
  • All 40 unit tests pass

…astructure

- Add RFC 7662 Token Introspection endpoint (#194)
- Add OIDC RP-Initiated Logout endpoint (#196)
- Bump Exposed ORM 0.61.0 → 1.1.1 and Shadow 9.0.0-beta4 → 9.3.2
- Extract JwtProvider utility for shared JWT algorithm/verifier caching
- Cache KeyUtils.getKeys() to avoid repeated PEM file I/O
- Commonize client authentication into OAuthValidation
- Fix JWT.decode() security issue in RevokeRouter (use lenient verifier)
- Update OIDC Discovery with introspection and end_session endpoints
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🚀 Preview of MineAuth

📦 Preview JARs (Release Page)

Artifact Download
Core MineAuth-core-fdb473b.jar
API MineAuth-api-fdb473b.jar
Addon: Betonquest MineAuth-addon-betonquest-fdb473b.jar
Addon: Griefprevention MineAuth-addon-griefprevention-fdb473b.jar
Addon: Quickshop Hikari MineAuth-addon-quickshop-hikari-fdb473b.jar
Addon: Vault MineAuth-addon-vault-fdb473b.jar

📜 Attestation: gh attestation verify <jar-file> --owner morinoparty

📖 Documentation & Reports

Available for 7 days (until 2026-03-16)

Resource Link
📖 Documentation Preview
📖 Dokka API Preview
🧪 JUnit Report Report
🔍 Detekt Report Report

🧪 Test Summary

Tests Passed Skipped Failed
74 74 ✅ 0 ⏭️ 0 ❌

@Nlkomaru Nlkomaru enabled auto-merge March 9, 2026 12:14
@Nlkomaru Nlkomaru merged commit 913da61 into master Mar 9, 2026
7 checks passed
@Nlkomaru Nlkomaru deleted the feat/194-196-introspect-end-session branch March 9, 2026 12:17
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🚀 Preview of MineAuth

📦 Preview JARs (Release Page)

Artifact Download
Core MineAuth-core-93c0b0c.jar
API MineAuth-api-93c0b0c.jar
Addon: Betonquest MineAuth-addon-betonquest-93c0b0c.jar
Addon: Griefprevention MineAuth-addon-griefprevention-93c0b0c.jar
Addon: Quickshop Hikari MineAuth-addon-quickshop-hikari-93c0b0c.jar
Addon: Vault MineAuth-addon-vault-93c0b0c.jar

📜 Attestation: gh attestation verify <jar-file> --owner morinoparty

📖 Documentation & Reports

Available for 7 days (until 2026-03-16)

Resource Link
📖 Documentation Preview
📖 Dokka API Preview
🧪 JUnit Report Report
🔍 Detekt Report Report

🧪 Test Summary

Tests Passed Skipped Failed
74 74 ✅ 0 ⏭️ 0 ❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Implement end session endpoint (/oauth2/end_session) feat: Implement token introspection endpoint (/oauth2/introspect)

1 participant