diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,18 @@
 [PVP](https://pvp.haskell.org/) and is versioned independently of the other
 Shōmei packages.
 
+## 0.4.0.0 — 2026-11-25
+
+- **Breaking:** require the Shōmei 0.4 API series.
+
+- Active access-token responses from `POST /oauth/introspect` include the stored `session_kind` (`interactive`, `machine`, or `delegated`).
+
+- `POST /oauth/introspect` adds `client_id` for sessions issued to an OAuth client, sends `Cache-Control: no-store`, searches the other token type when `token_type_hint` does not match, and reports a token whose subject or actor disagrees with its stored session as inactive. **Source compatibility:** `IntrospectResult` now carries the typed `IntrospectSuccess`/`IntrospectionResponse` in place of an aeson `Value`; the OpenAPI document gains the `IntrospectionResponse` schema.
+
+- Add POST /v1/admin/users/{userId}/mfa/reset with typed DTOs/results/OpenAPI, administrative authorization, delegation/self-target refusal and mandatory live-session checks. Bind enrollment and code regeneration to the initiating session even in token-only mode.
+
+- OAuth namespaces now retain OAuth JSON through parsing, routing and middleware errors. Authentication boundaries own challenges; authorize login_required has none. **Source compatibility:** OAuthResult adds 405/406/413/415/429 constructors and OAuthErrorWithHeaders adds optional oauthAllow; update exhaustive matches and record construction. Additive mount-aware formatter and response middleware APIs preserve default entry points.
+
 ## 0.3.0.1 — 2026-11-17
 
 - Admit `base64` 2.0 and 2.1 (`>=1.0 && <2.2`). No source or API change.
diff --git a/shomei-servant.cabal b/shomei-servant.cabal
--- a/shomei-servant.cabal
+++ b/shomei-servant.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.0
 name: shomei-servant
-version: 0.3.0.1
+version: 0.4.0.0
 synopsis: Servant API, handlers, and auth combinators for Shōmei
 description:
   The HTTP layer of the Shōmei authentication toolkit. Exposes ShomeiAPI as a
@@ -77,6 +77,7 @@
     Shomei.Mfa.Handler
     Shomei.Mfa.Result
     Shomei.OAuth.Api
+    Shomei.OAuth.Boundary
     Shomei.OAuth.Handler
     Shomei.OAuth.Result
     Shomei.Passkey.Api
@@ -129,7 +130,7 @@
     servant-health >=0.1 && <0.2,
     servant-openapi-hs >=5.1 && <5.2,
     servant-server >=0.20.3 && <0.21,
-    shomei-core ^>=0.3.0.0,
+    shomei-core ^>=0.4.0.0,
     sop-core >=0.5 && <0.6,
     text >=2.0 && <2.2,
     time >=1.12 && <1.15,
@@ -150,7 +151,7 @@
     aeson-pretty >=0.8 && <0.9,
     base >=4.18 && <5,
     bytestring >=0.11 && <0.13,
-    shomei-servant ^>=0.3.0.0,
+    shomei-servant ^>=0.4.0.0,
 
 -- | OpenAPI 3.1 conformance (EP-27 M4): property-checks that every JSON body
 -- type's actual 'ToJSON' encoding validates against its generated 'ToSchema',
@@ -188,7 +189,8 @@
     servant-health >=0.1 && <0.2,
     servant-openapi-hs >=5.0 && <6,
     servant-server >=0.20.3 && <0.21,
-    shomei-servant ^>=0.3.0.0,
+    shomei-core ^>=0.4.0.0,
+    shomei-servant ^>=0.4.0.0,
     text >=2.0 && <2.2,
 
 test-suite shomei-servant-test
@@ -196,6 +198,7 @@
   type: exitcode-stdio-1.0
   hs-source-dirs: test
   main-is: Main.hs
+  other-modules: ResourceServerFixture
   ghc-options:
     -threaded
     -rtsopts
@@ -215,9 +218,9 @@
     servant >=0.20.3 && <0.21,
     servant-health >=0.1 && <0.2,
     servant-server >=0.20.3 && <0.21,
-    shomei-core ^>=0.3.0.0,
-    shomei-jwt ^>=0.3.0.0,
-    shomei-servant ^>=0.3.0.0,
+    shomei-core ^>=0.4.0.0,
+    shomei-jwt ^>=0.4.0.0,
+    shomei-servant ^>=0.4.0.0,
     tasty >=1.4 && <1.6,
     tasty-hunit >=0.10 && <0.11,
     text >=2.0 && <2.2,
diff --git a/src/Shomei/Account/Admin/Api.hs b/src/Shomei/Account/Admin/Api.hs
--- a/src/Shomei/Account/Admin/Api.hs
+++ b/src/Shomei/Account/Admin/Api.hs
@@ -7,11 +7,13 @@
     ReinstateUserRoute,
     DeleteUserRoute,
     AdminPasswordResetRoute,
+    ResetMfaRoute,
   )
 where
 
 import Servant.API
 import Servant.API.MultiVerb (MultiVerb)
+import Shomei.Account.Dto (ResetMfaRequest)
 import Shomei.Account.Result
 import Shomei.Account.User.Dto (AdminStatusFilter, UserPageCursor)
 import Shomei.Id (UserId)
@@ -32,12 +34,15 @@
 
 type AdminPasswordResetRoute = "users" :> RequireAdmin :> CsrfProtected :> PreHandlerResponses BadRequestPreHandlerResponses :> Capture "userId" UserId :> "password-reset" :> MultiVerb 'POST ApplicationContentTypes AdminPasswordResetResponses AdminPasswordResetResult
 
+type ResetMfaRoute = "users" :> RequireAdmin :> CsrfProtected :> PreHandlerResponses BadRequestPreHandlerResponses :> Capture "userId" UserId :> "mfa" :> "reset" :> ReqBody '[JSON] ResetMfaRequest :> MultiVerb 'POST ApplicationContentTypes ResetMfaResponses ResetMfaResult
+
 data AdminAccountApi mode = AdminAccountApi
   { listUsers :: mode :- ListUsersRoute,
     getUser :: mode :- GetUserRoute,
     suspendUser :: mode :- SuspendUserRoute,
     reinstateUser :: mode :- ReinstateUserRoute,
     deleteUser :: mode :- DeleteUserRoute,
-    passwordReset :: mode :- AdminPasswordResetRoute
+    passwordReset :: mode :- AdminPasswordResetRoute,
+    resetMfa :: mode :- ResetMfaRoute
   }
   deriving stock (Generic)
diff --git a/src/Shomei/Account/Dto.hs b/src/Shomei/Account/Dto.hs
--- a/src/Shomei/Account/Dto.hs
+++ b/src/Shomei/Account/Dto.hs
@@ -7,9 +7,12 @@
     PasswordResetRequest (..),
     ConfirmPasswordResetRequest (..),
     ChangePasswordRequest (..),
+    ResetMfaRequest (..),
+    ResetMfaResponse (..),
   )
 where
 
+import Shomei.Account.Admin.Recovery.Domain (RecoveryCounts)
 import Shomei.Account.User.Dto (UserResponse)
 import Shomei.Prelude
 import Shomei.Session.Dto (TokenPairResponse)
@@ -52,6 +55,21 @@
 data ChangePasswordRequest = ChangePasswordRequest
   { currentPassword :: !Text,
     newPassword :: !Text
+  }
+  deriving stock (Generic)
+  deriving anyclass (FromJSON, ToJSON)
+
+data ResetMfaRequest = ResetMfaRequest
+  { identityVerified :: !Bool,
+    caseReference :: !Text
+  }
+  deriving stock (Generic)
+  deriving anyclass (FromJSON, ToJSON)
+
+data ResetMfaResponse = ResetMfaResponse
+  { resetAt :: !UTCTime,
+    counts :: !RecoveryCounts,
+    verifiedNotificationDestination :: !Bool
   }
   deriving stock (Generic)
   deriving anyclass (FromJSON, ToJSON)
diff --git a/src/Shomei/Account/Handler.hs b/src/Shomei/Account/Handler.hs
--- a/src/Shomei/Account/Handler.hs
+++ b/src/Shomei/Account/Handler.hs
@@ -4,6 +4,7 @@
     adminAccountServer,
     loadUser,
     requireExistingUser,
+    requireLiveAuthentication,
   )
 where
 
@@ -12,6 +13,7 @@
 import Servant (Handler)
 import Servant.Server.Generic (AsServerT)
 import Shomei.Account.Admin.Api (AdminAccountApi (..))
+import Shomei.Account.Admin.Recovery qualified as Recovery
 import Shomei.Account.Admin.Workflow qualified as Admin
 import Shomei.Account.Api (AccountApi (..))
 import Shomei.Account.Dto
@@ -33,7 +35,7 @@
 import Shomei.Account.User.Store qualified as UserStore
 import Shomei.Authorization.Role.Workflow qualified as Roles
 import Shomei.Delegation.Handler (denyUnderDelegation)
-import Shomei.Error (AuthError (UserHasNoEmail, UserNotFound))
+import Shomei.Error (AuthError (ImpersonationActionBlocked, InvalidCredentials, UserHasNoEmail, UserNotFound))
 import Shomei.Id (UserId)
 import Shomei.Prelude
 import Shomei.Servant.Application (ApplicationHandler, port, rejectAuth, rejectProblem, runApplicationHandler, workflow)
@@ -45,8 +47,11 @@
 import Shomei.Servant.Seam (Env (..))
 import Shomei.Session.Authentication.Workflow qualified as Authentication
 import Shomei.Session.Command (ProofContext (..), SignupCommand (..))
+import Shomei.Session.Domain (Session (..), SessionKind (..))
 import Shomei.Session.Dto (tokenPairToResponse)
 import Shomei.Session.LoginAttempt.Domain (ClientIp (..))
+import Shomei.Session.Workflow (requireLiveSession)
+import Shomei.Time.Store (now)
 
 accountServer :: Env -> AccountApi (AsServerT Handler)
 accountServer env =
@@ -68,7 +73,8 @@
       suspendUser = adminSuspendUserH env,
       reinstateUser = adminReinstateUserH env,
       deleteUser = adminDeleteUserH env,
-      passwordReset = adminPasswordResetH env
+      passwordReset = adminPasswordResetH env,
+      resetMfa = adminResetMfaH env
     }
 
 signupH :: Env -> SignupRequest -> Handler SignupResult
@@ -192,3 +198,24 @@
 nonEmpty value
   | Text.null value = Nothing
   | otherwise = Just value
+
+adminResetMfaH :: Env -> AuthUser -> UserId -> ResetMfaRequest -> Handler ResetMfaResult
+adminResetMfaH env actor target request = runApplicationHandler do
+  denyUnderDelegation env "admin_reset_mfa" actor
+  denySelfTarget actor target
+  ts <- port env now
+  session <- workflow env (requireLiveSession ts actor.authSessionId)
+  unless (session.userId == actor.authUserId) (rejectAuth InvalidCredentials)
+  attribution <- case session.kind of
+    InteractiveSession -> pure (Recovery.AuthenticatedAdministrator actor.authUserId)
+    MachineSession -> pure (Recovery.AdministratorService actor.authUserId)
+    DelegatedSession -> rejectAuth ImpersonationActionBlocked
+  result <- workflow env (Recovery.resetUserSecondFactors attribution target (Recovery.RecoveryCommand request.identityVerified request.caseReference))
+  pure ResetMfaResponse {resetAt = result.resetAt, counts = result.counts, verifiedNotificationDestination = result.verifiedNotificationDestination}
+
+-- | Credential management never relies on offline JWT validity alone.
+requireLiveAuthentication :: Env -> AuthUser -> ApplicationHandler ()
+requireLiveAuthentication env actor = do
+  ts <- port env now
+  session <- workflow env (requireLiveSession ts actor.authSessionId)
+  unless (session.userId == actor.authUserId) (rejectAuth InvalidCredentials)
diff --git a/src/Shomei/Account/Result.hs b/src/Shomei/Account/Result.hs
--- a/src/Shomei/Account/Result.hs
+++ b/src/Shomei/Account/Result.hs
@@ -26,10 +26,12 @@
     DeleteUserResult,
     AdminPasswordResetResponses,
     AdminPasswordResetResult,
+    ResetMfaResponses,
+    ResetMfaResult,
   )
 where
 
-import Shomei.Account.Dto (SignupResponse)
+import Shomei.Account.Dto (ResetMfaResponse, SignupResponse)
 import Shomei.Account.User.Dto (AdminUserResponse, AdminUsersPage, UserResponse)
 import Shomei.Servant.Result
 
@@ -84,3 +86,7 @@
 type AdminPasswordResetResponses = ApplicationEmptyResponses 202 "Password reset requested"
 
 type AdminPasswordResetResult = ApplicationResult ()
+
+type ResetMfaResponses = ApplicationResponses 200 "Second factors reset" ResetMfaResponse
+
+type ResetMfaResult = ApplicationResult ResetMfaResponse
diff --git a/src/Shomei/Mfa/Handler.hs b/src/Shomei/Mfa/Handler.hs
--- a/src/Shomei/Mfa/Handler.hs
+++ b/src/Shomei/Mfa/Handler.hs
@@ -5,7 +5,7 @@
 import Network.Socket (SockAddr)
 import Servant (Handler)
 import Servant.Server.Generic (AsServerT)
-import Shomei.Account.Handler (loadUser)
+import Shomei.Account.Handler (loadUser, requireLiveAuthentication)
 import Shomei.Authorization.Claims.Domain (AuthClaims (..))
 import Shomei.Config (ImpersonationConfig (..), ShomeiConfig (..))
 import Shomei.Delegation.Handler (denyUnderDelegation)
@@ -53,28 +53,33 @@
 totpEnrollH :: Env -> AuthUser -> Handler TotpEnrollResult
 totpEnrollH env authUser = runApplicationHandler do
   denyUnderDelegation env "totp_enroll" authUser
+  requireLiveAuthentication env authUser
   user <- loadUser env authUser
-  Totp.TotpEnrollment {secretBase32, otpauthUri} <- workflow env (Totp.enrollTotp env.config user)
+  Totp.TotpEnrollment {secretBase32, otpauthUri} <- workflow env (Totp.enrollTotp env.config user (Just authUser.authClaims.sessionId))
   pure TotpEnrollResponse {secret = secretBase32, otpauthUri}
 
 totpVerifyH :: Env -> AuthUser -> TotpVerifyRequest -> Handler TotpVerifyResult
 totpVerifyH env authUser request = runApplicationHandler do
+  denyUnderDelegation env "totp_verify" authUser
+  requireLiveAuthentication env authUser
   user <- loadUser env authUser
-  workflow env (Totp.verifyTotpEnrollment env.config user request.code)
+  workflow env (Totp.verifyTotpEnrollment env.config user (Just authUser.authClaims.sessionId) request.code)
 
 totpDeleteH :: Env -> AuthUser -> SockAddr -> TotpRemoveRequest -> Handler TotpDeleteResult
 totpDeleteH env authUser peer request = runApplicationHandler do
   denyUnderDelegation env "totp_remove" authUser
   requireFreshAuth env authUser
+  requireLiveAuthentication env authUser
   user <- loadUser env authUser
-  workflow env (Totp.removeTotp env.config (proofContext env peer) user (totpRemovalProofOf request))
+  workflow env (Totp.removeTotp env.config (proofContext env peer) user (Just authUser.authClaims.sessionId) (totpRemovalProofOf request))
 
 recoveryCodesGenerateH :: Env -> AuthUser -> Handler RecoveryCodesGenerateResult
 recoveryCodesGenerateH env authUser = runApplicationHandler do
   denyUnderDelegation env "recovery_codes_generate" authUser
   requireFreshAuth env authUser
+  requireLiveAuthentication env authUser
   user <- loadUser env authUser
-  codes <- workflow env (Totp.regenerateRecoveryCodes env.config user)
+  codes <- workflow env (Totp.regenerateRecoveryCodes env.config user (Just authUser.authClaims.sessionId))
   pure RecoveryCodesResponse {codes}
 
 recoveryCodesCountH :: Env -> AuthUser -> Handler RecoveryCodesCountResult
diff --git a/src/Shomei/OAuth/Boundary.hs b/src/Shomei/OAuth/Boundary.hs
new file mode 100644
--- /dev/null
+++ b/src/Shomei/OAuth/Boundary.hs
@@ -0,0 +1,53 @@
+-- | Protocol ownership at the HTTP boundary, shared by routing and outer middleware.
+module Shomei.OAuth.Boundary
+  ( OAuthMounts,
+    oauthMounts,
+    defaultOAuthMounts,
+    isOAuthPath,
+    oauthBoundaryError,
+    oauthBoundaryResponse,
+  )
+where
+
+import Data.ByteString.Char8 qualified as BS8
+import Data.List (isPrefixOf)
+import Network.HTTP.Types (mkStatus)
+import Network.Wai (Response, responseLBS)
+import Servant (ServerError (..))
+import Shomei.Prelude
+import Shomei.Servant.OAuth (oauthError)
+
+-- | Full decoded namespace prefixes. Construction rejects empty mounts and segments.
+newtype OAuthMounts = OAuthMounts [[Text]]
+  deriving stock (Eq, Show)
+
+oauthMounts :: [[Text]] -> Either Text OAuthMounts
+oauthMounts mounts
+  | any (\segments -> null segments || any (== "") segments) mounts = Left "OAuth mounts must contain non-empty path segments"
+  | otherwise = Right (OAuthMounts mounts)
+
+defaultOAuthMounts :: OAuthMounts
+defaultOAuthMounts = OAuthMounts [["oauth"]]
+
+isOAuthPath :: OAuthMounts -> [Text] -> Bool
+isOAuthPath (OAuthMounts mounts) segments = any (`isPrefixOf` segments) mounts
+
+-- | Fixed descriptions deliberately exclude submitted values and parser diagnostics.
+-- 413/429 are operational extensions using the OAuth envelope.
+oauthBoundaryError :: Int -> ServerError
+oauthBoundaryError code =
+  let (reason, errorCode, description) = case code of
+        404 -> ("Not Found", "invalid_request", "OAuth resource not found")
+        405 -> ("Method Not Allowed", "invalid_request", "method not allowed")
+        406 -> ("Not Acceptable", "invalid_request", "requested response representation is not supported")
+        413 -> ("Payload Too Large", "invalid_request", "request body too large")
+        415 -> ("Unsupported Media Type", "invalid_request", "request content type is not supported")
+        429 -> ("Too Many Requests", "temporarily_unavailable", "request rate limit exceeded")
+        _ -> ("Bad Request", "invalid_request", "request could not be parsed")
+      err = oauthError (mkStatus code reason) errorCode description
+   in err {errHeaders = err.errHeaders <> [("Retry-After", "60") | code == 429]}
+
+oauthBoundaryResponse :: Int -> Response
+oauthBoundaryResponse code =
+  let err = oauthBoundaryError code
+   in responseLBS (mkStatus err.errHTTPCode (BS8.pack err.errReasonPhrase)) err.errHeaders err.errBody
diff --git a/src/Shomei/OAuth/Handler.hs b/src/Shomei/OAuth/Handler.hs
--- a/src/Shomei/OAuth/Handler.hs
+++ b/src/Shomei/OAuth/Handler.hs
@@ -527,44 +527,53 @@
 -- token is @active@ only if it verifies /and/ its @sid@ resolves to a live session. That is the
 -- whole point of RFC 7662 — a resource server can see a revocation that stateless JWT verification
 -- cannot — and it is what makes the revoke→introspect flip observable.
-oauthIntrospectH :: Env -> Maybe Text -> Form -> Handler Value
+oauthIntrospectH :: Env -> Maybe Text -> Form -> Handler IntrospectSuccess
 oauthIntrospectH env mAuthHeader form = do
   _ <- authenticateOAuthCaller env mAuthHeader form
-  case OAuth.lookupParam "token" form of
-    Nothing -> pure inactive
+  answer <- case OAuth.lookupParam "token" form of
+    Nothing -> pure Nothing
+    -- The hint only orders the search (RFC 7662 §2.1): a token that is not of the hinted type
+    -- is still looked up as the other one.
     Just presented -> case OAuth.lookupParam "token_type_hint" form of
-      -- The hint is advisory. Try an opaque refresh token directly when named; otherwise try the
-      -- JWT path first and fall back to refresh lookup when signature verification fails.
-      Just "refresh_token" -> introspectRefresh env presented
-      _ -> do
-        verified <- runOAuthPort env (verifyAccessToken (AccessToken presented))
-        case verified of
-          Left _ -> introspectRefresh env presented
-          Right claims -> do
-            mSession <- runOAuthPort env (findSessionById claims.sessionId)
-            now' <- runOAuthPort env now
-            case mSession of
-              Just s | sessionIsLive now' s -> pure (activeAccess claims s)
-              -- The signature is fine but the session is gone or dead: to a resource server the
-              -- token is not active, which is exactly what revocation must make observable.
-              _ -> pure inactive
+      Just "refresh_token" -> introspectRefresh env presented `orElse` introspectAccess env presented
+      _ -> introspectAccess env presented `orElse` introspectRefresh env presented
+  pure (IntrospectSuccess (fromMaybe OAuth.IntrospectionInactive answer) "no-store" "no-cache")
+  where
+    orElse first second = first >>= maybe second (pure . Just)
 
+-- | Introspect a presented access JWT. 'Nothing' means it is not a token this issuer signed, so
+-- the caller may try another token type. A token that verifies is answered here even when
+-- inactive.
+introspectAccess :: Env -> Text -> Handler (Maybe OAuth.IntrospectionResponse)
+introspectAccess env presented = do
+  verified <- runOAuthPort env (verifyAccessToken (AccessToken presented))
+  case verified of
+    Left _ -> pure Nothing
+    Right claims -> do
+      mSession <- runOAuthPort env (findSessionById claims.sessionId)
+      now' <- runOAuthPort env now
+      pure . Just $ case mSession of
+        Just s | sessionIsLive now' s, sessionBacksClaims claims s -> activeAccess claims s
+        -- The signature is fine but the session is gone or dead: to a resource server the
+        -- token is not active, which is exactly what revocation must make observable.
+        _ -> OAuth.IntrospectionInactive
+
 -- | Introspect a presented refresh token: hash it, look it up, and report from its status and its
--- session's liveness.
-introspectRefresh :: Env -> Text -> Handler Value
+-- session's liveness. 'Nothing' means no such refresh token exists.
+introspectRefresh :: Env -> Text -> Handler (Maybe OAuth.IntrospectionResponse)
 introspectRefresh env presented = do
   tokHash <- runOAuthPort env (hashRefreshToken (RefreshToken presented))
   mTok <- runOAuthPort env (findRefreshTokenByHash tokHash)
   case mTok of
-    Nothing -> pure inactive
+    Nothing -> pure Nothing
     Just tok
-      | (tok ^. #status) /= RefreshTokenActive -> pure inactive
+      | (tok ^. #status) /= RefreshTokenActive -> pure (Just OAuth.IntrospectionInactive)
       | otherwise -> do
           mSession <- runOAuthPort env (findSessionById (tok ^. #sessionId))
           now' <- runOAuthPort env now
-          case mSession of
-            Just s | sessionIsLive now' s -> pure (Aeson.object ["active" Aeson..= True, "token_type" Aeson..= ("refresh_token" :: Text)])
-            _ -> pure inactive
+          pure . Just $ case mSession of
+            Just s | sessionIsLive now' s -> OAuth.IntrospectionRefreshToken
+            _ -> OAuth.IntrospectionInactive
 
 -- | @POST \/oauth\/revoke@ (RFC 7009): revoke what we recognize, and always answer @200@.
 --
@@ -646,31 +655,38 @@
 oauthClientSecretHash :: OAuthClient.OAuthClient -> Maybe Text
 oauthClientSecretHash OAuthClient.OAuthClient {secretHash} = secretHash
 
--- | @{"active": false}@, the one answer to every introspection failure.
-inactive :: Value
-inactive = Aeson.object ["active" Aeson..= False]
-
 -- | Is this session usable right now — active and unexpired?
 sessionIsLive :: UTCTime -> Session.Session -> Bool
 sessionIsLive now' s = s.status == Session.SessionActive && s.expiresAt > now'
 
+-- | Does the stored session agree with the token about who it is for? The response reports the
+-- kind from the row and the identities from the claims, so a row that names a different subject
+-- or actor, or whose kind contradicts its actor, must not be presented as evidence for this
+-- token. Every token Shōmei mints satisfies this; a mismatch fails closed as inactive.
+sessionBacksClaims :: AuthClaims -> Session.Session -> Bool
+sessionBacksClaims claims s =
+  s.userId == claims.subject
+    && s.actor == claims.actor
+    && (s.kind == Session.DelegatedSession) == isJust s.actor
+
 -- | The RFC 7662 active-response object for a verified access token whose session is live.
-activeAccess :: AuthClaims -> Session.Session -> Value
-activeAccess claims _s =
-  Aeson.object
-    ( [ "active" Aeson..= True,
-        "token_type" Aeson..= ("Bearer" :: Text),
-        "scope" Aeson..= Text.unwords [s | Scope s <- Set.toList claims.scopes],
-        "sub" Aeson..= idText claims.subject,
-        "sid" Aeson..= idText claims.sessionId,
-        "iss" Aeson..= issuerClaimText claims.issuer,
-        "aud" Aeson..= audienceClaimText claims.audience,
-        "exp" Aeson..= (floor (utcTimeToPOSIXSeconds claims.expiresAt) :: Integer),
-        "iat" Aeson..= (floor (utcTimeToPOSIXSeconds claims.issuedAt) :: Integer)
-      ]
-        -- `act` per the RFC 8693 convention when the token was delegated (impersonation).
-        <> foldMap (\a -> ["act" Aeson..= Aeson.object ["sub" Aeson..= idText a]]) claims.actor
-    )
+activeAccess :: AuthClaims -> Session.Session -> OAuth.IntrospectionResponse
+activeAccess claims session =
+  OAuth.IntrospectionAccessToken
+    OAuth.ActiveAccessToken
+      { sessionKind = session ^. #kind,
+        scope = Text.unwords [s | Scope s <- Set.toList claims.scopes],
+        subject = idText claims.subject,
+        sessionId = idText claims.sessionId,
+        issuer = issuerClaimText claims.issuer,
+        audience = audienceClaimText claims.audience,
+        expiresAt = floor (utcTimeToPOSIXSeconds claims.expiresAt),
+        issuedAt = floor (utcTimeToPOSIXSeconds claims.issuedAt),
+        -- RFC 7662 `client_id`: lets a resource server tell a token an OAuth client holds for
+        -- the user from one issued to the user's own first-party login.
+        clientId = session ^. #oauthClientId,
+        actor = idText <$> claims.actor
+      }
   where
     issuerClaimText (Issuer t) = t
     audienceClaimText (Audience t) = t
diff --git a/src/Shomei/OAuth/Result.hs b/src/Shomei/OAuth/Result.hs
--- a/src/Shomei/OAuth/Result.hs
+++ b/src/Shomei/OAuth/Result.hs
@@ -22,6 +22,7 @@
     TokenResult,
     UserinfoResponses,
     UserinfoResult,
+    IntrospectSuccess (..),
     IntrospectResponses,
     IntrospectResult,
     RevokeResponses,
@@ -44,7 +45,7 @@
 import Servant (JSON, ServerError (..))
 import Servant.API.MultiVerb
 import Shomei.Prelude
-import Shomei.Servant.OAuth (OAuthErrorResponse (..), TokenResponse)
+import Shomei.Servant.OAuth (IntrospectionResponse, OAuthErrorResponse (..), TokenResponse)
 import Text.Read (readMaybe)
 import Web.HttpApiData (FromHttpApiData (parseHeader), ToHttpApiData (toHeader))
 
@@ -52,7 +53,8 @@
   '[ DescHeader "Cache-Control" "OAuth responses are not cacheable" Text,
      DescHeader "Pragma" "OAuth responses are not cacheable" Text,
      OptHeader (DescHeader "WWW-Authenticate" "Client authentication challenge" Text),
-     OptHeader (DescHeader "Retry-After" "Seconds until retry" Natural)
+     OptHeader (DescHeader "Retry-After" "Seconds until retry" Natural),
+     OptHeader (DescHeader "Allow" "Allowed HTTP methods" Text)
    ]
 
 data OAuthErrorWithHeaders = OAuthErrorWithHeaders
@@ -60,32 +62,35 @@
     oauthCacheControl :: !Text,
     oauthPragma :: !Text,
     oauthAuthenticate :: !(Maybe Text),
-    oauthRetryAfter :: !(Maybe Natural)
+    oauthRetryAfter :: !(Maybe Natural),
+    oauthAllow :: !(Maybe Text)
   }
   deriving stock (Eq, Show, Generic)
 
-instance AsHeaders '[Text, Text, Maybe Text, Maybe Natural] OAuthErrorResponse OAuthErrorWithHeaders where
+instance AsHeaders '[Text, Text, Maybe Text, Maybe Natural, Maybe Text] OAuthErrorResponse OAuthErrorWithHeaders where
   toHeaders response =
-    ( I response.oauthCacheControl :* I response.oauthPragma :* I response.oauthAuthenticate :* I response.oauthRetryAfter :* Nil,
+    ( I response.oauthCacheControl :* I response.oauthPragma :* I response.oauthAuthenticate :* I response.oauthRetryAfter :* I response.oauthAllow :* Nil,
       response.oauthErrorBody
     )
-  fromHeaders (I oauthCacheControl :* I oauthPragma :* I oauthAuthenticate :* I oauthRetryAfter :* Nil, oauthErrorBody) =
-    OAuthErrorWithHeaders {oauthErrorBody, oauthCacheControl, oauthPragma, oauthAuthenticate, oauthRetryAfter}
+  fromHeaders (I oauthCacheControl :* I oauthPragma :* I oauthAuthenticate :* I oauthRetryAfter :* I oauthAllow :* Nil, oauthErrorBody) =
+    OAuthErrorWithHeaders {oauthErrorBody, oauthCacheControl, oauthPragma, oauthAuthenticate, oauthRetryAfter, oauthAllow}
 
 -- servant 0.20.3's generic header decoder rejects absent optional fields. OAuth explicitly
 -- permits WWW-Authenticate and Retry-After to be absent, so preserve that contract in clients.
-instance {-# OVERLAPPING #-} ServantHeaders OAuthErrorHeaders '[Text, Text, Maybe Text, Maybe Natural] where
-  constructHeaders (I oauthCacheControl :* I oauthPragma :* I oauthAuthenticate :* I oauthRetryAfter :* Nil) =
+instance {-# OVERLAPPING #-} ServantHeaders OAuthErrorHeaders '[Text, Text, Maybe Text, Maybe Natural, Maybe Text] where
+  constructHeaders (I oauthCacheControl :* I oauthPragma :* I oauthAuthenticate :* I oauthRetryAfter :* I oauthAllow :* Nil) =
     requiredHeader "Cache-Control" oauthCacheControl
       <> requiredHeader "Pragma" oauthPragma
       <> optionalHeader "WWW-Authenticate" oauthAuthenticate
       <> optionalHeader "Retry-After" oauthRetryAfter
+      <> optionalHeader "Allow" oauthAllow
   extractHeaders headers = do
     oauthCacheControl <- extractRequiredHeader "Cache-Control" headers
     oauthPragma <- extractRequiredHeader "Pragma" headers
     oauthAuthenticate <- extractOptionalHeader "WWW-Authenticate" headers
     oauthRetryAfter <- extractOptionalHeader "Retry-After" headers
-    pure (I oauthCacheControl :* I oauthPragma :* I oauthAuthenticate :* I oauthRetryAfter :* Nil)
+    oauthAllow <- extractOptionalHeader "Allow" headers
+    pure (I oauthCacheControl :* I oauthPragma :* I oauthAuthenticate :* I oauthRetryAfter :* I oauthAllow :* Nil)
 
 requiredHeader :: (ToHttpApiData a) => HTTP.HeaderName -> a -> [HTTP.Header]
 requiredHeader name value = [(name, toHeader value)]
@@ -114,6 +119,11 @@
   '[ WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 400 "OAuth request rejected" OAuthErrorResponse),
      WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 401 "OAuth authentication failed" OAuthErrorResponse),
      WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 404 "OAuth resource not found" OAuthErrorResponse),
+     WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 405 "OAuth method not allowed" OAuthErrorResponse),
+     WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 406 "OAuth response representation not acceptable" OAuthErrorResponse),
+     WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 413 "OAuth request body too large" OAuthErrorResponse),
+     WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 415 "OAuth request media type unsupported" OAuthErrorResponse),
+     WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 429 "OAuth request throttled" OAuthErrorResponse),
      WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 500 "OAuth server error" OAuthErrorResponse),
      WithHeaders OAuthErrorHeaders OAuthErrorWithHeaders (RespondAs JSON 503 "OAuth dependency unavailable" OAuthErrorResponse)
    ]
@@ -127,6 +137,11 @@
   | OAuthBadRequest !OAuthErrorWithHeaders
   | OAuthAuthenticationFailed !OAuthErrorWithHeaders
   | OAuthNotFound !OAuthErrorWithHeaders
+  | OAuthMethodNotAllowed !OAuthErrorWithHeaders
+  | OAuthNotAcceptable !OAuthErrorWithHeaders
+  | OAuthPayloadTooLarge !OAuthErrorWithHeaders
+  | OAuthUnsupportedMediaType !OAuthErrorWithHeaders
+  | OAuthTooManyRequests !OAuthErrorWithHeaders
   | OAuthInternal !OAuthErrorWithHeaders
   | OAuthUnavailable !OAuthErrorWithHeaders
   deriving stock (Eq, Show, Generic, Functor)
@@ -143,24 +158,34 @@
   toUnion = oauthToUnion
   fromUnion = oauthFromUnion
 
-oauthToUnion :: OAuthResult a -> NS I '[a, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders]
+oauthToUnion :: OAuthResult a -> NS I '[a, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders]
 oauthToUnion = \case
   OAuthSuccess value -> Z (I value)
   OAuthBadRequest value -> S (Z (I value))
   OAuthAuthenticationFailed value -> S (S (Z (I value)))
   OAuthNotFound value -> S (S (S (Z (I value))))
-  OAuthInternal value -> S (S (S (S (Z (I value)))))
-  OAuthUnavailable value -> S (S (S (S (S (Z (I value))))))
+  OAuthMethodNotAllowed value -> S (S (S (S (Z (I value)))))
+  OAuthNotAcceptable value -> S (S (S (S (S (Z (I value))))))
+  OAuthPayloadTooLarge value -> S (S (S (S (S (S (Z (I value)))))))
+  OAuthUnsupportedMediaType value -> S (S (S (S (S (S (S (Z (I value))))))))
+  OAuthTooManyRequests value -> S (S (S (S (S (S (S (S (Z (I value)))))))))
+  OAuthInternal value -> S (S (S (S (S (S (S (S (S (Z (I value))))))))))
+  OAuthUnavailable value -> S (S (S (S (S (S (S (S (S (S (Z (I value)))))))))))
 
-oauthFromUnion :: NS I '[a, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders] -> OAuthResult a
+oauthFromUnion :: NS I '[a, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders, OAuthErrorWithHeaders] -> OAuthResult a
 oauthFromUnion = \case
   Z (I value) -> OAuthSuccess value
   S (Z (I value)) -> OAuthBadRequest value
   S (S (Z (I value))) -> OAuthAuthenticationFailed value
   S (S (S (Z (I value)))) -> OAuthNotFound value
-  S (S (S (S (Z (I value))))) -> OAuthInternal value
-  S (S (S (S (S (Z (I value)))))) -> OAuthUnavailable value
-  S (S (S (S (S (S impossible))))) -> case impossible of {}
+  S (S (S (S (Z (I value))))) -> OAuthMethodNotAllowed value
+  S (S (S (S (S (Z (I value)))))) -> OAuthNotAcceptable value
+  S (S (S (S (S (S (Z (I value))))))) -> OAuthPayloadTooLarge value
+  S (S (S (S (S (S (S (Z (I value)))))))) -> OAuthUnsupportedMediaType value
+  S (S (S (S (S (S (S (S (Z (I value))))))))) -> OAuthTooManyRequests value
+  S (S (S (S (S (S (S (S (S (Z (I value)))))))))) -> OAuthInternal value
+  S (S (S (S (S (S (S (S (S (S (Z (I value))))))))))) -> OAuthUnavailable value
+  S (S (S (S (S (S (S (S (S (S (S (impossible))))))))))) -> case impossible of {}
 
 type AuthorizeHeaders =
   '[ DescHeader "Location" "Redirect target" Text,
@@ -205,10 +230,24 @@
 
 type UserinfoResult = OAuthResult Value
 
-type IntrospectResponses = OAuthResponses 200 "Token status" Value
+-- | An introspection answer names a subject, its scopes and its session, so it carries the same
+-- no-store headers as a token response.
+data IntrospectSuccess = IntrospectSuccess
+  { introspectBody :: !IntrospectionResponse,
+    introspectCacheControl :: !Text,
+    introspectPragma :: !Text
+  }
+  deriving stock (Eq, Show, Generic)
 
-type IntrospectResult = OAuthResult Value
+instance AsHeaders '[Text, Text] IntrospectionResponse IntrospectSuccess where
+  toHeaders response = (I response.introspectCacheControl :* I response.introspectPragma :* Nil, response.introspectBody)
+  fromHeaders (I introspectCacheControl :* I introspectPragma :* Nil, introspectBody) =
+    IntrospectSuccess {introspectBody, introspectCacheControl, introspectPragma}
 
+type IntrospectResponses = WithHeaders TokenHeaders IntrospectSuccess (Respond 200 "Token status" IntrospectionResponse) ': OAuthErrorResponses
+
+type IntrospectResult = OAuthResult IntrospectSuccess
+
 type RevokeResponses = OAuthEmptyResponses 200 "Token revoked"
 
 type RevokeResult = OAuthResult ()
@@ -230,12 +269,18 @@
           oauthCacheControl = headerText "Cache-Control" "no-store",
           oauthPragma = headerText "Pragma" "no-cache",
           oauthAuthenticate = optionalHeaderText "WWW-Authenticate",
-          oauthRetryAfter = optionalHeaderText "Retry-After" >>= readMaybe . Text.unpack
+          oauthRetryAfter = optionalHeaderText "Retry-After" >>= readMaybe . Text.unpack,
+          oauthAllow = optionalHeaderText "Allow"
         }
     constructor = case err.errHTTPCode of
       400 -> OAuthBadRequest
       401 -> OAuthAuthenticationFailed
       404 -> OAuthNotFound
+      405 -> OAuthMethodNotAllowed
+      406 -> OAuthNotAcceptable
+      413 -> OAuthPayloadTooLarge
+      415 -> OAuthUnsupportedMediaType
+      429 -> OAuthTooManyRequests
       503 -> OAuthUnavailable
       _ -> OAuthInternal
     optionalHeaderText name = TextEncoding.decodeUtf8 <$> lookup name err.errHeaders
diff --git a/src/Shomei/Passkey/Handler.hs b/src/Shomei/Passkey/Handler.hs
--- a/src/Shomei/Passkey/Handler.hs
+++ b/src/Shomei/Passkey/Handler.hs
@@ -5,6 +5,8 @@
 import Network.Socket (SockAddr)
 import Servant (Handler)
 import Servant.Server.Generic (AsServerT)
+import Shomei.Account.Handler (requireLiveAuthentication)
+import Shomei.Authorization.Claims.Domain (AuthClaims (..))
 import Shomei.Delegation.Handler (denyUnderDelegation)
 import Shomei.Id (CeremonyId, PasskeyId, idText, parseId)
 import Shomei.Mfa.Workflow qualified as Mfa
@@ -37,12 +39,14 @@
 registerBeginH :: Env -> AuthUser -> Handler RegisterBeginResult
 registerBeginH env user = runApplicationHandler do
   denyUnderDelegation env "passkey_register" user
-  (ceremonyId, options) <- workflow env (Passkey.beginPasskeyRegistration env.config user.authUserId)
+  requireLiveAuthentication env user
+  (ceremonyId, options) <- workflow env (Passkey.beginPasskeyRegistration env.config user.authUserId (Just user.authClaims.sessionId))
   pure PasskeyRegisterBeginResponse {ceremonyId = idText ceremonyId, options}
 
 registerCompleteH :: Env -> AuthUser -> PasskeyRegisterCompleteRequest -> Handler RegisterCompleteResult
 registerCompleteH env user request = runApplicationHandler do
   denyUnderDelegation env "passkey_register" user
+  requireLiveAuthentication env user
   ceremonyId <- parseCeremonyId request.ceremonyId
   passkey <- workflow env (Passkey.completePasskeyRegistration env.config user.authUserId ceremonyId request.credential request.label)
   pure (passkeyToResponse passkey)
@@ -53,6 +57,7 @@
 removeH :: Env -> AuthUser -> PasskeyId -> Handler RemovePasskeyResult
 removeH env user passkeyId = runApplicationHandler do
   denyUnderDelegation env "passkey_remove" user
+  requireLiveAuthentication env user
   workflow env (Passkey.removePasskey user.authUserId passkeyId)
 
 loginBeginH :: Env -> Handler PasskeyLoginBeginResult
diff --git a/src/Shomei/Servant/Error.hs b/src/Shomei/Servant/Error.hs
--- a/src/Shomei/Servant/Error.hs
+++ b/src/Shomei/Servant/Error.hs
@@ -21,9 +21,9 @@
 --
 --   * health probe failures use the structured 'Servant.Health.ProbeResult' body,
 --     not a problem document. It is a status report, not an error.
---   * The future @POST \/oauth\/token@ endpoint must use RFC 6749 §5.2's
+--   * OAuth namespaces use RFC 6749 §5.2's
 --     @{"error":"invalid_grant",…}@ shape, which OAuth2 clients require. That surface belongs
---     to MasterPlan 7 EP-4 and is exempt from this envelope.
+--     to their protocol boundary, including errors before handlers run.
 --
 -- Never leaks internal detail: 'InvalidCredentials', 'UserNotActive', and 'AccountLocked' all
 -- collapse to the same generic @401 invalid_login@ so account existence and status are not
@@ -51,6 +51,7 @@
 
     -- * Servant's built-in failures
     shomeiErrorFormatters,
+    shomeiErrorFormattersWithOAuthMounts,
 
     -- * Specs with an 'AuthError' counterpart
 
@@ -129,6 +130,8 @@
 import Data.Text.Encoding qualified as TextEncoding
 import Network.HTTP.Media (MediaType)
 import Network.HTTP.Types.Header (Header)
+import Network.HTTP.Types.URI (decodePathSegments)
+import Network.Wai (rawPathInfo)
 import Numeric.Natural (Natural)
 import Servant
   ( Accept (..),
@@ -149,6 +152,7 @@
   )
 import Shomei.Authorization.Claims.Domain (Role (..))
 import Shomei.Error (AuthError (..))
+import Shomei.OAuth.Boundary (OAuthMounts, defaultOAuthMounts, isOAuthPath, oauthBoundaryError)
 import Shomei.Prelude
 
 -- ---------------------------------------------------------------------------
@@ -308,9 +312,9 @@
 
 -- | The response headers a problem document carries at a given status.
 --
--- A 401 advertises the scheme the client should use (RFC 6750 §3); a 429 tells the client how
--- long to wait. The token bucket refills continuously, so 60 seconds is an honest upper bound
--- for a full per-minute budget rather than an exact wait.
+-- Challenges and retry intervals are supplied by the occurrence, not inferred from status.
+-- The request throttle supplies 60 seconds: an honest upper bound for a full per-minute
+-- token-bucket budget. A retryable specification alone supplies no interval.
 problemHeaders :: ProblemOccurrence -> [Header]
 problemHeaders occurrence =
   [("Content-Type", "application/problem+json")]
@@ -339,16 +343,23 @@
 -- hardcoded @err405@ (empty body) inside @Servant.Server.Internal.methodCheck@. The
 -- 'Shomei.Servant.Middleware.problemMiddleware' WAI layer converts that one.
 shomeiErrorFormatters :: ErrorFormatters
-shomeiErrorFormatters =
+shomeiErrorFormatters = shomeiErrorFormattersWithOAuthMounts defaultOAuthMounts
+
+shomeiErrorFormattersWithOAuthMounts :: OAuthMounts -> ErrorFormatters
+shomeiErrorFormattersWithOAuthMounts mounts =
   defaultErrorFormatters
-    { bodyParserErrorFormatter = \_typeRep _req msg ->
-        toProblemError pcBodyParseError (detailOccurrence (Text.pack msg)),
-      urlParseErrorFormatter = \_typeRep _req msg ->
-        toProblemError pcBadRequest (detailOccurrence (Text.pack msg)),
-      headerParseErrorFormatter = \_typeRep _req msg ->
-        toProblemError pcBadRequest (detailOccurrence (Text.pack msg)),
-      notFoundErrorFormatter = \_req -> toProblemError pcNotFound noProblemOccurrence
+    { bodyParserErrorFormatter = \_typeRep req msg ->
+        select req 400 (toProblemError pcBodyParseError (detailOccurrence (Text.pack msg))),
+      urlParseErrorFormatter = \_typeRep req msg ->
+        select req 400 (toProblemError pcBadRequest (detailOccurrence (Text.pack msg))),
+      headerParseErrorFormatter = \_typeRep req msg ->
+        select req 400 (toProblemError pcBadRequest (detailOccurrence (Text.pack msg))),
+      notFoundErrorFormatter = \req -> select req 404 (toProblemError pcNotFound noProblemOccurrence)
     }
+  where
+    select req code fallback
+      | isOAuthPath mounts (decodePathSegments (rawPathInfo req)) = oauthBoundaryError code
+      | otherwise = fallback
 
 -- ---------------------------------------------------------------------------
 -- The catalog
@@ -562,6 +573,7 @@
   TooManyRequests -> (pcTooManyRequests, retryAfterOccurrence 60)
   SessionNotFound -> plain pcSessionNotFound
   SessionExpired -> plain pcSessionExpired
+  StaleAuthentication -> plain pcSessionRevoked
   SessionRevoked -> plain pcSessionRevoked
   RefreshTokenInvalid -> plain pcRefreshTokenInvalid
   RefreshTokenExpired -> plain pcRefreshTokenExpired
diff --git a/src/Shomei/Servant/Middleware.hs b/src/Shomei/Servant/Middleware.hs
--- a/src/Shomei/Servant/Middleware.hs
+++ b/src/Shomei/Servant/Middleware.hs
@@ -1,25 +1,20 @@
--- | The WAI layer that finishes what @ErrorFormatters@ cannot.
---
--- Servant lets you format its body-parse, url-parse, header-parse, and not-found failures
--- through 'Servant.ErrorFormatters'. It does __not__ let you format a method mismatch: a request
--- to a known path with the wrong verb raises a hardcoded @err405@ with an empty body from
--- @Servant.Server.Internal.methodCheck@, below any hook. This middleware converts that response
--- into the same RFC 9457 problem document every other failure carries.
---
--- Shōmei never returns 405 from a handler, so rewriting the status unconditionally is safe.
+-- | Complete Servant's parsing hooks with protocol-aware method and negotiation errors.
+-- Namespace matching uses the original decoded path at this outer boundary. Responses
+-- already carrying OAuth JSON pass through; no response body or stream is inspected.
 module Shomei.Servant.Middleware
   ( problemMiddleware,
     problemResponse,
+    problemMiddlewareWithOAuthMounts,
   )
 where
 
 import Data.Aeson qualified as Aeson
 import Data.ByteString.Char8 qualified as BS8
 import Network.HTTP.Types (Status, mkStatus, statusCode)
-import Network.Wai (Middleware, Response, pathInfo, requestHeaders, responseLBS, responseStatus)
+import Network.Wai (Middleware, Response, pathInfo, requestHeaders, responseHeaders, responseLBS, responseStatus)
 import Servant (ServerError (..))
+import Shomei.OAuth.Boundary (OAuthMounts, defaultOAuthMounts, isOAuthPath, oauthBoundaryError, oauthBoundaryResponse)
 import Shomei.Servant.Error (ProblemOccurrence, ProblemSpec (..), bearerOccurrence, noProblemOccurrence, pcMethodNotAllowed, pcTokenInvalidAuth, problemBody, problemHeaders)
-import Shomei.Servant.OAuth qualified as OAuth
 
 -- | Build a WAI response carrying a problem document. Used by this module and by the
 -- rate-limit middleware, which answers before Servant ever sees the request.
@@ -30,18 +25,28 @@
 statusOf :: ProblemSpec -> Status
 statusOf spec = mkStatus spec.problemStatus.errHTTPCode (BS8.pack spec.problemStatus.errReasonPhrase)
 
--- | Rewrite Servant's bare @405 Method Not Allowed@ into a problem document.
+-- | Complete Servant's formatter hooks without inspecting downstream bodies or streams.
 problemMiddleware :: Middleware
-problemMiddleware _ req respond
+problemMiddleware = problemMiddlewareWithOAuthMounts defaultOAuthMounts
+
+problemMiddlewareWithOAuthMounts :: OAuthMounts -> Middleware
+problemMiddlewareWithOAuthMounts mounts app req respond
   | length [() | (name, _) <- requestHeaders req, name == "Authorization"] > 1 =
-      if "oauth" `elem` pathInfo req
-        then
-          let err = OAuth.invalidRequest "multiple Authorization headers"
-           in respond (responseLBS (mkStatus err.errHTTPCode (BS8.pack err.errReasonPhrase)) err.errHeaders err.errBody)
-        else respond (problemResponse pcTokenInvalidAuth bearerOccurrence)
-problemMiddleware app req respond =
-  app req \res ->
-    respond
-      if statusCode (responseStatus res) == 405
-        then problemResponse pcMethodNotAllowed noProblemOccurrence
-        else res
+      respond
+        if isOAuthPath mounts (pathInfo req)
+          then oauthBoundaryResponse 400
+          else problemResponse pcTokenInvalidAuth bearerOccurrence
+  | otherwise = app req \res -> respond (normalize res)
+  where
+    normalize res
+      | isOAuthPath mounts (pathInfo req), Just contentType <- lookup "Content-Type" (responseHeaders res), BS8.takeWhile (/= ';') contentType == "application/json" = res
+      | isOAuthPath mounts (pathInfo req),
+        code `elem` [404, 405, 406, 415] =
+          let err = oauthBoundaryError code
+              -- Retain semantic headers (e.g. Allow), discard the replaced representation.
+              semantic = filter (\(name, _) -> name `notElem` ["Content-Type", "Content-Length", "Content-Encoding", "Content-Range", "Content-Language", "Content-Location", "Content-Disposition", "Content-MD5", "Content-Digest", "Repr-Digest", "Digest", "Transfer-Encoding", "Trailer", "Accept-Ranges", "ETag", "Last-Modified", "Cache-Control", "Pragma", "WWW-Authenticate", "Retry-After"]) (responseHeaders res)
+           in responseLBS (responseStatus res) (err.errHeaders <> semantic) err.errBody
+      | code == 405 = problemResponse pcMethodNotAllowed noProblemOccurrence
+      | otherwise = res
+      where
+        code = statusCode (responseStatus res)
diff --git a/src/Shomei/Servant/OAuth.hs b/src/Shomei/Servant/OAuth.hs
--- a/src/Shomei/Servant/OAuth.hs
+++ b/src/Shomei/Servant/OAuth.hs
@@ -14,7 +14,7 @@
 --
 --   * @invalid_request@ (400) — a required parameter is missing or malformed.
 --   * @invalid_client@ (401) — client authentication failed. Also carries
---     @WWW-Authenticate: Basic realm="shomei"@ when the client attempted Basic authentication.
+--     @WWW-Authenticate: Basic realm="shomei"@ whenever client authentication is required.
 --   * @invalid_grant@ (400) — the presented grant is invalid, expired, or revoked.
 --   * @unauthorized_client@ (400) — this client may not use this grant type.
 --   * @unsupported_grant_type@ (400) — the server does not implement this @grant_type@.
@@ -39,6 +39,10 @@
 
     -- * The success response (RFC 6749 §5.1)
     TokenResponse (..),
+
+    -- * The introspection response (RFC 7662 §2.2)
+    IntrospectionResponse (..),
+    ActiveAccessToken (..),
   )
 where
 
@@ -55,6 +59,7 @@
 import Servant (ServerError (..))
 import Shomei.Authorization.Claims.Domain (Scope (..))
 import Shomei.Prelude
+import Shomei.Session.Domain (SessionKind, sessionKindFromText, sessionKindToText)
 import Web.FormUrlEncoded (Form, lookupUnique)
 
 -- ---------------------------------------------------------------------------
@@ -91,9 +96,7 @@
 -- @Cache-Control: no-store@ rides on every response from this endpoint, error included: an
 -- intermediary must never cache a token endpoint's answer.
 --
--- A 401 additionally carries @WWW-Authenticate: Basic realm="shomei"@, as RFC 6749 §5.2 requires
--- of an @invalid_client@ response to a request that used the Basic scheme. Shōmei sends it on
--- every @invalid_client@, which is permitted and simpler than remembering how the client tried.
+-- Challenges belong to the authentication boundary, independently of HTTP status.
 oauthError :: Status -> Text -> Text -> ServerError
 oauthError status code description =
   ServerError
@@ -106,14 +109,15 @@
           ("Cache-Control", "no-store"),
           ("Pragma", "no-cache")
         ]
-          <> [("WWW-Authenticate", "Basic realm=\"shomei\"") | statusCode status == 401]
     }
 
 -- | The single answer to every client-authentication failure: an unknown @client_id@, a wrong
 -- secret, a revoked account, an absent credential, and a malformed @Authorization@ header all
 -- produce this exact response. Nothing about which one occurred reaches the caller.
 invalidClient :: ServerError
-invalidClient = oauthError status401 "invalid_client" "client authentication failed"
+invalidClient =
+  let err = oauthError status401 "invalid_client" "client authentication failed"
+   in err {errHeaders = ("WWW-Authenticate", "Basic realm=\"shomei\"") : err.errHeaders}
 
 -- | OIDC UserInfo bearer authentication failure. Unlike client authentication at the token,
 -- introspection, and revocation endpoints, this challenge names the Bearer scheme and uses the
@@ -297,3 +301,87 @@
       <*> o Aeson..:? "refresh_token"
       <*> o Aeson..:? "id_token"
       <*> o Aeson..:? "issued_token_type"
+
+-- ---------------------------------------------------------------------------
+-- The introspection response
+-- ---------------------------------------------------------------------------
+
+-- | RFC 7662 §2.2's response from @POST \/oauth\/introspect@, in the three shapes Shōmei
+-- answers with. The JSON keys are the RFC's snake_case names plus the Shōmei extensions @sid@
+-- and @session_kind@, so the instances are hand-written and must stay in step with the
+-- @ToSchema@ in "Shomei.Servant.OpenApi".
+data IntrospectionResponse
+  = -- | @{"active":false}@: the one answer to every invalid, expired, revoked or unknown token.
+    IntrospectionInactive
+  | -- | @{"active":true,"token_type":"refresh_token"}@: a live opaque refresh token. It is not
+    -- a bearer credential, so it carries no identity members.
+    IntrospectionRefreshToken
+  | -- | A verified access token whose session is live.
+    IntrospectionAccessToken !ActiveAccessToken
+  deriving stock (Generic, Eq, Show)
+
+data ActiveAccessToken = ActiveAccessToken
+  { -- | how the stored session was established (Shōmei extension)
+    sessionKind :: !SessionKind,
+    -- | space-delimited scopes carried by the token
+    scope :: !Text,
+    subject :: !Text,
+    sessionId :: !Text,
+    issuer :: !Text,
+    audience :: !Text,
+    -- | Unix seconds
+    expiresAt :: !Integer,
+    -- | Unix seconds
+    issuedAt :: !Integer,
+    -- | the OAuth client the session was issued to through the authorization-code grant;
+    --     absent for a first-party login and for machine and delegated sessions.
+    clientId :: !(Maybe Text),
+    -- | the delegated actor, present exactly on delegated sessions
+    actor :: !(Maybe Text)
+  }
+  deriving stock (Generic, Eq, Show)
+
+instance Aeson.ToJSON IntrospectionResponse where
+  toJSON = \case
+    IntrospectionInactive -> Aeson.object ["active" Aeson..= False]
+    IntrospectionRefreshToken -> Aeson.object ["active" Aeson..= True, "token_type" Aeson..= ("refresh_token" :: Text)]
+    IntrospectionAccessToken t ->
+      Aeson.object
+        ( [ "active" Aeson..= True,
+            "token_type" Aeson..= ("Bearer" :: Text),
+            "session_kind" Aeson..= sessionKindToText t.sessionKind,
+            "scope" Aeson..= t.scope,
+            "sub" Aeson..= t.subject,
+            "sid" Aeson..= t.sessionId,
+            "iss" Aeson..= t.issuer,
+            "aud" Aeson..= t.audience,
+            "exp" Aeson..= t.expiresAt,
+            "iat" Aeson..= t.issuedAt
+          ]
+            <> foldMap (\c -> ["client_id" Aeson..= c]) t.clientId
+            -- `act` per the RFC 8693 convention when the token was delegated.
+            <> foldMap (\a -> ["act" Aeson..= Aeson.object ["sub" Aeson..= a]]) t.actor
+        )
+
+instance Aeson.FromJSON IntrospectionResponse where
+  parseJSON = Aeson.withObject "IntrospectionResponse" \o -> do
+    active <- o Aeson..: "active"
+    tokenType <- o Aeson..:? "token_type"
+    case (active, tokenType :: Maybe Text) of
+      (False, _) -> pure IntrospectionInactive
+      (True, Just "refresh_token") -> pure IntrospectionRefreshToken
+      (True, Just "Bearer") -> do
+        kind <- either (fail . Text.unpack) pure . sessionKindFromText =<< o Aeson..: "session_kind"
+        actor <- traverse (Aeson.withObject "act" (Aeson..: "sub")) =<< o Aeson..:? "act"
+        fmap IntrospectionAccessToken $
+          ActiveAccessToken kind
+            <$> o Aeson..: "scope"
+            <*> o Aeson..: "sub"
+            <*> o Aeson..: "sid"
+            <*> o Aeson..: "iss"
+            <*> o Aeson..: "aud"
+            <*> o Aeson..: "exp"
+            <*> o Aeson..: "iat"
+            <*> o Aeson..:? "client_id"
+            <*> pure actor
+      _ -> fail "unrecognized introspection token_type"
diff --git a/src/Shomei/Servant/OpenApi.hs b/src/Shomei/Servant/OpenApi.hs
--- a/src/Shomei/Servant/OpenApi.hs
+++ b/src/Shomei/Servant/OpenApi.hs
@@ -48,11 +48,14 @@
 import Servant.API.MultiVerb (DescHeader, OptHeader)
 import Servant.OpenApi (HasOpenApi (..))
 import Servant.OpenApi.Internal (IsSwaggerResponseList (..), ToResponseHeader (..))
+import Shomei.Account.Admin.Recovery.Domain (RecoveryCounts)
 import Shomei.Account.Dto
   ( ChangePasswordRequest,
     ConfirmEmailVerificationRequest,
     ConfirmPasswordResetRequest,
     PasswordResetRequest,
+    ResetMfaRequest,
+    ResetMfaResponse,
     SignupRequest,
     SignupResponse,
     VerifyEmailRequest,
@@ -87,7 +90,7 @@
 import Shomei.Servant.Auth (Authenticated, OAuthAuthenticated)
 import Shomei.Servant.Authz (RequireAdmin, RequirePermission, RequireRole, RequireScope)
 import Shomei.Servant.CachedJson (CachedJson, cacheJson)
-import Shomei.Servant.OAuth (TokenResponse)
+import Shomei.Servant.OAuth (IntrospectionResponse, TokenResponse)
 import Shomei.Servant.PreHandler (CsrfProtected, PreHandlerResponses, RateLimited)
 import Shomei.Servant.Result
   ( AuthenticationPreHandlerResponses,
@@ -130,6 +133,12 @@
         & O.schema . O.properties . ix "password" . O._Inline . O.maxLength ?~ 256
         & O.schema . O.properties . ix "displayName" . O._Inline . O.maxLength ?~ 256
 
+instance ToSchema ResetMfaRequest
+
+instance ToSchema ResetMfaResponse
+
+instance ToSchema RecoveryCounts
+
 instance ToSchema SignupResponse
 
 instance ToSchema LoginRequest where
@@ -261,6 +270,60 @@
           -- The three optional members are omitted rather than null when they do not apply, so they
           -- are documented as not required.
           & O.required .~ ["access_token", "token_type", "expires_in", "scope"]
+
+-- | @POST \/oauth\/introspect@ (RFC 7662 §2.2). Only @active@ is always present: an inactive
+-- token is exactly @{"active":false}@, a live refresh token adds only @token_type@, and a live
+-- access token carries every other member except the two optional ones noted below.
+instance ToSchema IntrospectionResponse where
+  declareNamedSchema _ =
+    pure $
+      O.NamedSchema (Just "IntrospectionResponse") $
+        mempty
+          & O.type_ ?~ O.OpenApiTypeSingle O.OpenApiObject
+          & O.description
+            ?~ "An RFC 7662 token-introspection response. `{\"active\":false}` for any invalid, \
+               \expired, revoked or unknown token; `active` and `token_type` only for a live \
+               \refresh token; the full member set for a live access token."
+          & O.properties
+            .~ IOHM.fromList
+              [ ("active", O.Inline (mempty & O.type_ ?~ O.OpenApiTypeSingle O.OpenApiBoolean)),
+                ("token_type", O.Inline (stringSchema & O.enum_ ?~ [String "Bearer", String "refresh_token"])),
+                ( "session_kind",
+                  O.Inline
+                    ( stringSchema
+                        & O.enum_ ?~ [String "interactive", String "machine", String "delegated"]
+                        & O.description
+                          ?~ "Shōmei extension: how the stored session was established. Present on \
+                             \every active access-token response."
+                    )
+                ),
+                ("scope", O.Inline (stringSchema & O.description ?~ "The space-delimited scopes the token carries.")),
+                ("sub", O.Inline (stringSchema & O.description ?~ "The user the token represents.")),
+                ("sid", O.Inline (stringSchema & O.description ?~ "Shōmei extension: the backing session.")),
+                ("iss", O.Inline stringSchema),
+                ("aud", O.Inline stringSchema),
+                ("exp", O.Inline (mempty & O.type_ ?~ O.OpenApiTypeSingle O.OpenApiInteger & O.description ?~ "Expiry in Unix seconds.")),
+                ("iat", O.Inline (mempty & O.type_ ?~ O.OpenApiTypeSingle O.OpenApiInteger & O.description ?~ "Issue time in Unix seconds.")),
+                ( "client_id",
+                  O.Inline
+                    ( stringSchema
+                        & O.description
+                          ?~ "The OAuth client the session was issued to through the \
+                             \authorization-code grant. Omitted for a first-party login and for \
+                             \machine and delegated sessions."
+                    )
+                ),
+                ( "act",
+                  O.Inline
+                    ( mempty
+                        & O.type_ ?~ O.OpenApiTypeSingle O.OpenApiObject
+                        & O.description ?~ "The delegated actor (RFC 8693). Present exactly when `session_kind` is `delegated`."
+                        & O.properties .~ IOHM.fromList [("sub", O.Inline stringSchema)]
+                        & O.required .~ ["sub"]
+                    )
+                )
+              ]
+          & O.required .~ ["active"]
 
 -- | The @application\/x-www-form-urlencoded@ request body of @POST \/oauth\/token@.
 --
diff --git a/test-openapi/Main.hs b/test-openapi/Main.hs
--- a/test-openapi/Main.hs
+++ b/test-openapi/Main.hs
@@ -12,9 +12,9 @@
 --   2. Smoke assertions on the assembled 'shomeiOpenApi': the @openapi@ version
 --      is @3.1.0@ and the document covers the expected number of paths.
 --
---   3. EP-3: the error surface. Every documented error code exists in the runtime
---      'problemCatalog' at the documented status, so the spec cannot promise a code or a
---      status the server never sends; and the document 'Shomei.Servant.Error.problemBody'
+--   3. EP-3: the error surface. The public catalog distinguishes built-in responses from
+--      generic library mappings, preserves all type anchors, and documents served OAuth
+--      quota and impersonation refusals; the document 'Shomei.Servant.Error.problemBody'
 --      actually writes for every catalog entry validates against the published @Problem@
 --      schema, so the two halves of the envelope cannot drift apart. Plus the hygiene
 --      invariants a generated client depends on: no @204@ carries content, no response
@@ -51,12 +51,14 @@
 import Servant.OpenApi.Test (validateEveryToJSON)
 import Servant.Server (ServerError (..))
 import Shomei.Account.Admin.Api
+import Shomei.Account.Admin.Recovery.Domain (RecoveryCounts (..))
 import Shomei.Account.Api
 import Shomei.Account.Dto
 import Shomei.Account.User.Dto
 import Shomei.Audit.Api
 import Shomei.Audit.Dto
 import Shomei.Authorization.Api
+import Shomei.Error (AuthError (SessionLimitReached))
 import Shomei.Mfa.Api
 import Shomei.Mfa.Dto
 import Shomei.OAuth.Api
@@ -64,17 +66,18 @@
 import Shomei.Passkey.Dto
 import Shomei.Servant.Api (OpenApiRoute, ShomeiRoutes)
 import Shomei.Servant.CachedJson (CachedJson, cacheJson, cachedJsonBytes, cachedJsonValue)
-import Shomei.Servant.Error (ProblemDetails (..), ProblemSpec (..), detailOccurrence, noProblemOccurrence, problemBody, problemCatalog, problemDetails, problemTypeFor, toProblemError)
-import Shomei.Servant.OAuth (OAuthErrorResponse (..), TokenResponse (..))
+import Shomei.Servant.Error (ProblemDetails (..), ProblemOccurrence (..), ProblemSpec (..), authErrorToServerError, detailOccurrence, noProblemOccurrence, pcSessionLimitReached, problemBody, problemCatalog, problemDetails, problemTypeFor, toProblemError)
+import Shomei.Servant.OAuth (ActiveAccessToken (..), IntrospectionResponse (..), OAuthErrorResponse (..), TokenResponse (..))
 import Shomei.Servant.OpenApi (openApiDocument, openApiValue, shomeiOpenApi)
 import Shomei.Session.Admin.Api
 import Shomei.Session.Api
+import Shomei.Session.Domain (SessionKind (..))
 import Shomei.Session.Dto
 import Shomei.SigningKey.Api
 import System.Directory (doesFileExist)
 import System.Mem (performGC)
 import Test.Hspec
-import Test.QuickCheck (Arbitrary (..), chooseInt, oneof)
+import Test.QuickCheck (Arbitrary (..), chooseInt, elements, oneof)
 import Test.QuickCheck.Instances ()
 
 -- | @logout@ answers @204@ with @Set-Cookie@ headers. Servant models a header-carrying empty
@@ -254,8 +257,8 @@
     it "declares OpenAPI version 3.1.0" $
       lookupTop "openapi" `shouldBe` Just (String "3.1.0")
 
-    it "covers exactly 41 paths" $
-      pathCount `shouldBe` 41
+    it "covers exactly 42 paths" $
+      pathCount `shouldBe` 42
 
     it "covers the exact served method and path inventory" $
       sort (map fst operations) `shouldBe` expectedOperations
@@ -272,14 +275,11 @@
                   health503Witness `seq`
                     True `shouldBe` True
 
-  describe "EP-4: /oauth/token speaks RFC 6749 behind a problem-details edge throttle" $ do
+  describe "OAuth errors include the HTTP boundary" $ do
     it "declares the OAuthErrorResponse schema" $
       (lookupTop "components" >>= field "schemas" >>= field "OAuthErrorResponse") `shouldSatisfy` isJust
 
-    -- Handler-owned failures stay in the shape a stock OAuth2 client parses. The sole exception
-    -- is 429: the edge limiter answers before routing and therefore uses the shared problem
-    -- document (with Retry-After), exactly as the runtime middleware does.
-    it "documents only the edge 429 as problem+json on /oauth/token" $
+    it "documents OAuth JSON for every token error" $
       [ Key.toText status
       | (path, Object item) <- KM.toList paths,
         path == "/oauth/token",
@@ -287,11 +287,23 @@
         (status, resp) <- responsesOf op,
         isProblemResponse resp
       ]
-        `shouldBe` ["429"]
+        `shouldBe` []
 
     it "documents the protocol-owned error statuses" $
-      responseStatusesAt "/oauth/token" `shouldBe` ["200", "400", "401", "404", "429", "500", "503"]
+      responseStatusesAt "/oauth/token" `shouldBe` ["200", "400", "401", "404", "405", "406", "413", "415", "429", "500", "503"]
 
+    it "keeps OAuth schemas and cache/retry/challenge metadata for operational errors" $ do
+      forM_ ["405", "406", "413", "415", "429"] \status -> do
+        let response = KM.lookup "/oauth/token" paths >>= field "post" >>= field "responses" >>= field status
+        (response >>= field "content" >>= field "application/json" >>= field "schema" >>= field "$ref")
+          `shouldBe` Just (String "#/components/schemas/OAuthErrorResponse")
+        forM_ ["Cache-Control", "Pragma", "WWW-Authenticate", "Retry-After", "Allow"] \header ->
+          (response >>= field "headers" >>= field header) `shouldSatisfy` isJust
+        (response >>= field "headers" >>= field "WWW-Authenticate" >>= field "required") `shouldNotBe` Just (Bool True)
+      let app429 = KM.lookup "/v1/auth/login" paths >>= field "post" >>= field "responses" >>= field "429"
+      (app429 >>= field "content" >>= field "application/problem+json") `shouldSatisfy` isJust
+      (app429 >>= field "content" >>= field "application/json") `shouldBe` Nothing
+
   describe "EP-5: the OIDC discovery document is on the OAuth side of the envelope boundary" $ do
     -- Reached by OIDC tooling, so its "provider disabled" refusal must be a shape that tooling
     -- parses. The OIDC route's protocol response list is the sole source of the alternative.
@@ -336,7 +348,7 @@
     -- Every OTHER authorize failure -- bad response_type, PKCE policy, disallowed scope -- is a
     -- 302 back to the validated redirect_uri, so it is not a status this operation declares.
     it "documents only protocol statuses rather than redirect query error values" $
-      responseStatusesAt "/oauth/authorize" `shouldBe` ["302", "400", "401", "404", "500", "503"]
+      responseStatusesAt "/oauth/authorize" `shouldBe` ["302", "400", "401", "404", "405", "406", "413", "415", "429", "500", "503"]
 
   describe "EP-3: the error surface cannot drift from the runtime catalog" $ do
     it "declares the ProblemDetails schema with the RFC 9457 profile members" $
@@ -377,6 +389,44 @@
       [p.problemCode | p <- problemCatalog, not (Text.isInfixOf ("id=\"" <> p.problemCode <> "\"") problemCatalogDocument)]
         `shouldBe` []
 
+    it "keeps the three generic mappings outside the built-in application table" $ do
+      let builtin = catalogTable problemCatalogDocument "Built-in application errors"
+          library = catalogTable problemCatalogDocument "Library-only mappings"
+      forM_
+        [ ("session_limit_reached", "429", "yes", "absent in generic mapping"),
+          ("impersonation_forbidden", "403", "no", "never"),
+          ("impersonation_target_invalid", "400", "no", "never")
+        ]
+        $ \(code, status, retryable, retryHeader) -> do
+          filter (any (Text.isInfixOf ("id=\"" <> code <> "\""))) builtin `shouldBe` []
+          case filter (any (Text.isInfixOf ("id=\"" <> code <> "\""))) library of
+            [[_, _, actualStatus, actualRetryable, _, actualRetryHeader]] -> do
+              actualStatus `shouldBe` status
+              actualRetryable `shouldBe` retryable
+              actualRetryHeader `shouldBe` retryHeader
+            rows -> expectationFailure ("expected one library row for " <> Text.unpack code <> ": " <> show rows)
+
+    it "documents the served OAuth quota and impersonation statuses without retry or challenge headers" $ do
+      catalogTable problemCatalogDocument "Served OAuth errors"
+        `shouldBe` [ ["Machine-session quota", "`POST /oauth/token`", "503", "`temporarily_unavailable`", "absent", "absent"],
+                     ["Delegated-session quota", "`POST /oauth/token`", "503", "`temporarily_unavailable`", "absent", "absent"],
+                     ["Impersonation authority refusal", "`POST /oauth/token`", "400", "`invalid_grant`", "absent", "absent"],
+                     ["Invalid impersonation target", "`POST /oauth/token`", "400", "`invalid_grant`", "absent", "absent"]
+                   ]
+
+    it "renders the generic session-limit mapping without an invented retry interval" $ do
+      let rendered = authErrorToServerError SessionLimitReached
+      rendered.errHTTPCode `shouldBe` 429
+      lookup "Retry-After" rendered.errHeaders `shouldBe` Nothing
+
+    it "serializes and schema-validates an explicit safe instance while omitting empty occurrences" $ do
+      let occurrence = noProblemOccurrence {instanceUri = Just "/requests/example"}
+          populated = problemBody pcSessionLimitReached occurrence
+          empty = problemBody pcSessionLimitReached noProblemOccurrence
+      field "instance" populated `shouldBe` Just (String "/requests/example")
+      field "instance" empty `shouldBe` Nothing
+      validateJSON mempty publishedProblemSchema populated `shouldBe` []
+
     it "renders matching RFC 9457 bodies and media types at the pre-handler boundary" $
       [ p.problemCode
       | p <- problemCatalog,
@@ -403,6 +453,15 @@
     it "marks every request body required" $
       [key | (key, op) <- operations, Just body <- [KM.lookup "requestBody" op], not (isRequired body)] `shouldBe` []
   where
+    -- Read only table rows in one section; explanatory prose is free to evolve.
+    catalogTable document heading =
+      let section =
+            takeWhile
+              (not . Text.isPrefixOf "## ")
+              (drop 1 (dropWhile (/= "## " <> heading) (Text.lines document)))
+          rows = filter (Text.isPrefixOf "| ") section
+       in [map Text.strip (init (tail (Text.splitOn "|" row))) | row <- drop 2 rows]
+
     decoded :: KM.KeyMap Value
     decoded = case decode (encode shomeiOpenApi) of
       Just (Object o) -> o
@@ -468,6 +527,7 @@
           "post /oauth/introspect",
           "post /oauth/revoke",
           "post /oauth/token",
+          "post /v1/admin/users/{userId}/mfa/reset",
           "post /v1/admin/users/{userId}/password-reset",
           "post /v1/admin/users/{userId}/reinstate",
           "post /v1/admin/users/{userId}/suspend",
@@ -536,6 +596,10 @@
 -- Show instances (needed by validateEveryToJSON for counterexamples)
 -- ---------------------------------------------------------------------------
 
+deriving stock instance Show ResetMfaRequest
+
+deriving stock instance Show ResetMfaResponse
+
 deriving stock instance Show SignupRequest
 
 deriving stock instance Show SignupResponse
@@ -679,6 +743,25 @@
 instance Arbitrary TokenResponse where
   arbitrary = TokenResponse <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
 
+instance Arbitrary IntrospectionResponse where
+  arbitrary =
+    oneof
+      [ pure IntrospectionInactive,
+        pure IntrospectionRefreshToken,
+        fmap IntrospectionAccessToken $
+          ActiveAccessToken
+            <$> elements [InteractiveSession, MachineSession, DelegatedSession]
+            <*> arbitrary
+            <*> arbitrary
+            <*> arbitrary
+            <*> arbitrary
+            <*> arbitrary
+            <*> arbitrary
+            <*> arbitrary
+            <*> arbitrary
+            <*> arbitrary
+      ]
+
 instance Arbitrary SessionsPage where
   arbitrary = SessionsPage <$> arbitrary <*> arbitrary
 
@@ -717,3 +800,12 @@
 
 instance Arbitrary CachedJson where
   arbitrary = cacheJson <$> arbitrary
+
+instance Arbitrary ResetMfaRequest where
+  arbitrary = ResetMfaRequest <$> arbitrary <*> arbitrary
+
+instance Arbitrary RecoveryCounts where
+  arbitrary = RecoveryCounts <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
+
+instance Arbitrary ResetMfaResponse where
+  arbitrary = ResetMfaResponse <$> arbitrary <*> arbitrary <*> arbitrary
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -10,6 +10,7 @@
 -- rotation, the public JWKS document, and the @RequireRole "admin"@ guard (403/200).
 module Main (main) where
 
+import Control.Exception (throwIO)
 import Control.Monad (replicateM, replicateM_, void)
 import Crypto.JOSE.Compact (decodeCompact)
 import Crypto.JOSE.Error (runJOSE)
@@ -36,10 +37,13 @@
 import Effectful (Eff, runEff)
 import GHC.Generics (Generic)
 import Network.HTTP.Client
-  ( Manager,
+  ( HttpException (HttpExceptionRequest),
+    HttpExceptionContent (ResponseTimeout),
+    Manager,
     RequestBody (RequestBodyLBS),
     applyBasicAuth,
     defaultManagerSettings,
+    defaultRequest,
     httpLbs,
     method,
     newManager,
@@ -52,20 +56,28 @@
     responseStatus,
     urlEncodedBody,
   )
-import Network.HTTP.Types (Header, statusCode)
+import Network.HTTP.Types (Header, status401, statusCode)
 import Network.HTTP.Types.URI (parseSimpleQuery, urlEncode)
 import Network.Wai (Application, Request)
 import Network.Wai qualified as Wai
 import Network.Wai.Handler.Warp (testWithApplication)
+import ResourceServerFixture qualified as Resource
 import Servant
   ( Context (EmptyContext, (:.)),
     ErrorFormatters,
     Get,
     Handler,
+    Header',
     JSON,
     NamedRoutes,
+    Post,
     Proxy (Proxy),
+    QueryParam',
+    ReqBody,
+    Required,
     Server,
+    ServerError (..),
+    Strict,
     serveWithContext,
     type (:<|>) ((:<|>)),
     type (:>),
@@ -75,6 +87,7 @@
 import Servant.Server.Experimental.Auth (AuthHandler, unAuthHandler)
 import Servant.Server.Generic (genericServe)
 import Servant.Server.Internal (runHandler)
+import Shomei.Account.Admin.Recovery.Domain (RecoveryActor (..))
 import Shomei.Account.Credential.Store (createPasswordCredential)
 import Shomei.Account.Email.Domain (emailText, mkEmail)
 import Shomei.Account.LoginId.Domain (mkLoginId, parseLoginIdForAuthentication)
@@ -95,24 +108,26 @@
 import Shomei.Id (SessionId, UserId, genOAuthClientId, genServiceAccountDbId, genSessionId, genUserId, idText, parseId)
 import Shomei.Mfa.Totp.Algorithm (base32ToSecret, totpCode, totpCounter)
 import Shomei.OAuth.AuthorizationCode.Domain (AuthorizationCode (..))
+import Shomei.OAuth.Boundary (oauthMounts)
 import Shomei.OAuth.Client.Domain (ClientType (..), NewOAuthClient (..))
 import Shomei.OAuth.Client.Store (createOAuthClient)
 import Shomei.OAuth.TokenExchange.Workflow (tokenExchangeSubjectScope)
 import Shomei.OAuth.TokenGrant.Workflow (pkceChallengeFor)
 import Shomei.Passkey.Domain (PublicKeyBytes (..), UserHandle (..), WebAuthnCredentialId (..))
-import Shomei.Prelude ((^.))
+import Shomei.Prelude (set, (^.))
 import Shomei.Servant.Api (ShomeiRoutes)
 import Shomei.Servant.Auth (AuthUser, authHandler)
 import Shomei.Servant.Authz (RequirePermission, RequireRole, RequireScope)
-import Shomei.Servant.Error (ProblemDetails (..), problemTypeFor, shomeiErrorFormatters)
-import Shomei.Servant.Middleware (problemMiddleware)
+import Shomei.Servant.Error (ProblemDetails (..), problemTypeFor, shomeiErrorFormatters, shomeiErrorFormattersWithOAuthMounts)
+import Shomei.Servant.Middleware (problemMiddleware, problemMiddlewareWithOAuthMounts)
+import Shomei.Servant.OAuth qualified as OAuth
 import Shomei.Servant.OpenApi (openApiValue)
 import Shomei.Servant.Result (ApplicationResult (ApplicationInternal, ApplicationUnavailable), ProblemWithRetryAfter (..), applicationError)
 import Shomei.Servant.Seam (AppEffects, Env (..))
 import Shomei.Servant.Server (shomeiRoutes)
 import Shomei.ServiceAccount.Domain (NewServiceAccount (..))
 import Shomei.ServiceAccount.Secret (sha256Hex)
-import Shomei.ServiceAccount.Store (createServiceAccount)
+import Shomei.ServiceAccount.Store (createServiceAccount, findServiceAccountByClientId, revokeServiceAccount)
 import Shomei.Session.Authentication.Workflow qualified as Wf
 import Shomei.Session.Command (SignupCommand (..))
 import Shomei.Session.Domain (Session (..))
@@ -123,7 +138,7 @@
 import Shomei.SigningKey.Jwks.Jwt (KeySet (..), jwksDocument, keySetPublicJwks)
 import Shomei.SigningKey.Key.Jwt (generateSigningKey)
 import Shomei.SigningKey.Sign.Jwt (runTokenSignerJwt, signAccessToken)
-import Shomei.SigningKey.Verify.Jwt (runTokenVerifierJwt)
+import Shomei.SigningKey.Verify.Jwt (runTokenVerifierJwt, verifyToken)
 import Shomei.Test.InMemory
   ( World (..),
     emptyWorld,
@@ -669,6 +684,8 @@
     Just (Number n) -> (round n :: Int) @?= 300
     other -> assertFailure ("basic: expires_in not a number: " <> show other)
   token <- must "basic: access_token" (dig ["access_token"] doc >>= asText)
+  machine <- introspect mgr port (Just (clientId, oauthClientSecret)) token
+  (dig ["session_kind"] machine >>= asText) @?= Just "machine"
 
   -- (2) The minted token is a real Shōmei token: it satisfies the RequireScope combinator on a
   -- host route that contains no authorization code of its own.
@@ -708,6 +725,7 @@
   -- (6) No credentials at all is also invalid_client.
   noCreds <- postForm mgr port "/oauth/token" Nothing [("grant_type", "client_credentials")]
   assertOAuthError "no credentials" 401 "invalid_client" noCreds
+  headerValue "WWW-Authenticate" (headersOf noCreds) @?= Just "Basic realm=\"shomei\""
 
   -- (7) A scope outside allowed_scopes is invalid_scope, not a silent downgrade.
   badScope <-
@@ -838,6 +856,7 @@
   -- (1) The auth handler: no credential at all. The commonest failure in any deployment.
   r1 <- getRaw mgr port "/v1/auth/me" []
   assertProblem "missing token" 401 "missing_token" r1
+  (bodyOf r1 >>= dig ["instance"]) @?= Nothing
   headerValue "WWW-Authenticate" (headersOf r1) @?= Just "Bearer"
 
   -- (2) The auth handler: a credential that fails verification. Deliberately indistinguishable
@@ -1303,7 +1322,7 @@
 postForm :: Manager -> Int -> String -> Maybe (Text, Text) -> [(ByteString, ByteString)] -> IO RawResponse
 postForm mgr port path mBasic params = do
   req0 <- parseRequest ("http://127.0.0.1:" <> show port <> path)
-  let withBody = urlEncodedBody params req0
+  let withBody = urlEncodedBody params req0 {redirectCount = 0}
       encoded = urlEncode True . Text.encodeUtf8
       req = maybe withBody (\(c, s) -> applyBasicAuth (encoded c) (encoded s) withBody) mBasic
   resp <- httpLbs req mgr
@@ -1325,6 +1344,19 @@
   assertEqual (what <> ": error code") (Just expectedCode) (dig ["error"] doc >>= asText)
   assertBool (what <> ": has an error_description") (isJust (dig ["error_description"] doc))
 
+-- Quota and impersonation refusals deliberately supply neither a delay nor a challenge.
+assertOAuthRefusal :: String -> Int -> Text -> Text -> RawResponse -> IO ()
+assertOAuthRefusal what expectedStatus expectedCode description response = do
+  assertOAuthError what expectedStatus expectedCode response
+  let hdrs = headersOf response
+  headerValue "Pragma" hdrs @?= Just "no-cache"
+  headerValue "Retry-After" hdrs @?= Nothing
+  headerValue "WWW-Authenticate" hdrs @?= Nothing
+  doc <- must (what <> ": body") (bodyOf response)
+  dig ["error_description"] doc @?= Just (String description)
+  forM_ ["type", "title", "status", "code", "retryable", "instance", "detail"] $ \key ->
+    assertEqual (what <> ": no problem member " <> T.unpack key) Nothing (dig [key] doc)
+
 -- | POST an arbitrary (here: malformed) body, to exercise Servant's body parser.
 postRawBytes :: Manager -> Int -> String -> LBS.ByteString -> IO RawResponse
 postRawBytes mgr port path raw = do
@@ -1395,7 +1427,18 @@
 tests ref env freshEnv freshGatedEnv freshPermissionEnv freshSessionCheckEnv freshCookieEnv freshInsecureCookieEnv freshBothEnv freshOAuthEnv freshOidcEnv freshAuthorizeEnv freshSessionAuthorizeEnv freshAdminEnv freshExchangeEnv freshRevokeEnv freshProvenanceEnv freshTotpEnv t0 jwk cfg adminToken =
   testGroup
     "typed results and HTTP end-to-end (in-memory interpreters + in-test ES256 key)"
-    [ testCase "OpenAPI HTTP responses reuse the exact JSON document and media type" $ do
+    [ testCase "administrator recovery authorizes before writes and rejects revoked sessions even in token-only mode" $ do
+        (r, e) <- freshTotpEnv
+        let c = e.config {tokenTransport = BearerAndCookie}
+        testWithApplication (pure (app e {config = c})) (scenarioAdminRecovery r jwk c),
+      testCase "administrator service scope recovers with service attribution" $ do
+        (r, _, _, adminId, e) <- freshExchangeEnv
+        testWithApplication (pure (app e)) (scenarioServiceRecovery r adminId),
+      testCase "OAuth boundary uses safe errors and complete configured path segments" (scenarioOAuthBoundary env),
+      testCase "generic OAuth 401 does not select an authentication scheme" do
+        lookup "WWW-Authenticate" (OAuth.oauthError status401 "login_required" "login required").errHeaders @?= Nothing
+        lookup "WWW-Authenticate" OAuth.invalidClient.errHeaders @?= Just "Basic realm=\"shomei\"",
+      testCase "OpenAPI HTTP responses reuse the exact JSON document and media type" $ do
         e <- freshEnv
         testWithApplication (pure (app e)) $ \port -> do
           manager <- newManager defaultManagerSettings
@@ -1412,7 +1455,27 @@
           first <- postForm mgr port "/oauth/token" (Just (clientId, oauthClientSecret)) [("grant_type", "client_credentials")]
           statusOf first @?= 200
           second <- postForm mgr port "/oauth/token" (Just (clientId, oauthClientSecret)) [("grant_type", "client_credentials")]
-          assertOAuthError "machine quota" 503 "temporarily_unavailable" second,
+          assertOAuthRefusal "machine quota" 503 "temporarily_unavailable" "active session limit reached" second,
+      testCase "OAuth delegated quota returns 503 after a successful exchange" $ do
+        (_, gateId, _, _, e) <- freshExchangeEnv
+        testWithApplication (pure (app e {config = e.config {maxActiveNonInteractiveSessions = 1}})) $ \port -> do
+          mgr <- newManager defaultManagerSettings
+          (subjectToken, _) <- signupTokenAndId mgr port "quota-subject"
+          let exchange =
+                postForm
+                  mgr
+                  port
+                  "/oauth/token"
+                  (Just (gateId, oauthClientSecret))
+                  [ ("grant_type", "urn:ietf:params:oauth:grant-type:token-exchange"),
+                    ("subject_token", Text.encodeUtf8 subjectToken),
+                    ("subject_token_type", "urn:ietf:params:oauth:token-type:access_token"),
+                    ("scope", "kawa:ingest")
+                  ]
+          first <- exchange
+          statusOf first @?= 200
+          second <- exchange
+          assertOAuthRefusal "delegated quota" 503 "temporarily_unavailable" "active session limit reached" second,
       testCase "HTTP session pages default to 50, cap at 200 and walk tied timestamps" $ do
         (r, e) <- freshPermissionEnv
         testWithApplication (pure (app e)) (scenarioSessionPaging r),
@@ -1485,6 +1548,9 @@
       testCase "POST /oauth/token: privilege-minting exchanges require live, active principals in the default auth mode" $ do
         (r, gateId, _, _, e) <- freshExchangeEnv
         testWithApplication (pure (app e)) (scenarioExchangeRequiresLiveSessions r jwk cfg t0 gateId),
+      testCase "resource servers apply route-specific policies to authenticated introspection" $ do
+        (r, confId, _, svcId, e) <- freshProvenanceEnv
+        testWithApplication (pure (app e)) (scenarioResourcePolicies r jwk e.config t0 confId svcId),
       testCase "EP-7 TOTP: enroll → verify → mfa_required(methods) → complete; replay 401; recovery gen/use/count; impersonation 403; remove; freshness 403" $ do
         (r, e) <- freshTotpEnv
         testWithApplication (pure (app e)) (scenarioTotp r jwk cfg),
@@ -1638,7 +1704,7 @@
             clientType = ConfidentialClient,
             displayName = "confidential",
             redirectUris = [authorizeRedirectUri],
-            allowedScopes = Set.fromList [Scope "openid", Scope "profile", Scope "email"],
+            allowedScopes = Set.fromList [Scope "openid", Scope "profile", Scope "email", ingestScope],
             createdAt
           }
     _ <-
@@ -1818,6 +1884,7 @@
       refuse what token = do
         response <- getNoRedirect mgr port (authorizeUrl nonInteractiveParams) (bearer token)
         assertOAuthError what 401 "login_required" response
+        headerValue "WWW-Authenticate" (headersOf response) @?= Nothing
         headerValue "Location" (headersOf response) @?= Nothing
 
   interactive <- getNoRedirect mgr port (authorizeUrl interactiveParams) (bearer userToken)
@@ -1974,11 +2041,16 @@
   -- Introspection (plan 42) reports the delegated token as active, with an `act` member naming the
   -- operator — the observability surface agrees with the token's contents. Introspection
   -- client-authenticates as the service account.
-  introActive <-
-    postForm mgr port "/oauth/introspect" (Just (gateClientId, oauthClientSecret)) [("token", enc impAccess)]
+  introActive <- postForm mgr port "/oauth/introspect" (Just (gateClientId, oauthClientSecret)) [("token", enc impAccess)]
   introActiveDoc <- must "introspect (active) body" (bodyOf introActive)
   dig ["active"] introActiveDoc @?= Just (Bool True)
-  assertBool "introspection reports the act member" (isJust (dig ["act", "sub"] introActiveDoc >>= asText))
+  (dig ["session_kind"] introActiveDoc >>= asText) @?= Just "delegated"
+  (dig ["act", "sub"] introActiveDoc >>= asText) @?= Just (idText operatorUid)
+  impEvidence <- Resource.inspect cfg.issuer cfg.audience issuedAt (pure introActive) >>= either (assertFailure . show) pure
+  idText impEvidence.subject @?= targetId
+  Just (String (idText impEvidence.sessionId)) @?= KM.lookup "sid" impClaims
+  impEvidence.scopes @?= Set.empty
+  Resource.acceptingRoutes impEvidence @?= []
   -- RFC 7009 revocation is the single stop mechanism for a delegated token. The gate service did
   -- not mint this impersonation session, so the explicitly privileged admin principal stops it.
   (stopStatus, _, _) <-
@@ -1992,8 +2064,28 @@
   introInactive <-
     postForm mgr port "/oauth/introspect" (Just (gateClientId, oauthClientSecret)) [("token", enc impAccess)]
   introInactiveDoc <- must "introspect (inactive) body" (bodyOf introInactive)
-  dig ["active"] introInactiveDoc @?= Just (Bool False)
+  introInactiveDoc @?= object ["active" .= False]
 
+  -- Valid signed, live actors reach the workflow guards: missing authority and self-target.
+  ordinaryActor <- mkTokenForSession jwk cfg operatorUid operatorSid Set.empty Set.empty Nothing issuedAt
+  let impersonate actor target =
+        postForm
+          mgr
+          port
+          "/oauth/token"
+          Nothing
+          [ teGrant,
+            ("subject_token", enc target),
+            ("subject_token_type", userIdType),
+            ("actor_token", enc actor),
+            ("actor_token_type", accessType)
+          ]
+      safeDescription = "the subject or actor token is invalid"
+  forbidden <- impersonate ordinaryActor targetId
+  assertOAuthRefusal "impersonation authority" 400 "invalid_grant" safeDescription forbidden
+  invalidTarget <- impersonate impToken (idText operatorUid)
+  assertOAuthRefusal "impersonation target" 400 "invalid_grant" safeDescription invalidTarget
+
   -- A stale operator token is one generic invalid_grant.
   staleR <-
     postForm
@@ -2316,6 +2408,7 @@
       []
   assertOAuthError "unauthenticated with no loginUrl" 401 "login_required" r
   headerValue "Location" (headersOf r) @?= Nothing
+  headerValue "WWW-Authenticate" (headersOf r) @?= Nothing
 
 -- | @\/oauth\/authorize@ authenticates outside Servant's 'Authenticated' combinator, through
 -- 'resolveAuthUser'. In token-and-session mode it must treat a revoked session as anonymous and
@@ -2658,6 +2751,10 @@
     "userinfo authentication failures stay outside the problem envelope"
     (headerValue "Content-Type" noTokenHeaders /= Just "application/problem+json")
 
+  invalidUi <- getRaw mgr port "/oauth/userinfo" [("Authorization", "Bearer invalid-sentinel")]
+  assertOAuthError "invalid UserInfo token" 401 "invalid_token" invalidUi
+  headerValue "WWW-Authenticate" (headersOf invalidUi) @?= Just "Bearer realm=\"shomei\", error=\"invalid_token\""
+
   -- introspection requires client auth; without it, 401.
   noAuth <- postForm mgr port "/oauth/introspect" Nothing [("token", Text.encodeUtf8 accessToken)]
   assertOAuthError "introspect without client auth" 401 "invalid_client" noAuth
@@ -2669,6 +2766,7 @@
   active <- introspect mgr port basic accessToken
   (dig ["active"] active) @?= Just (Aeson.Bool True)
   (dig ["token_type"] active >>= asText) @?= Just "Bearer"
+  (dig ["session_kind"] active >>= asText) @?= Just "interactive"
   (dig ["scope"] active >>= asText) @?= Just "openid profile"
   (dig ["sub"] active >>= asText) @?= Just uiSub
   assertBool "introspection reports sid" (isJust (dig ["sid"] active))
@@ -2680,15 +2778,14 @@
   -- A token-type hint is an optimization, never a requirement. The JWT attempt falls through to
   -- opaque refresh-token lookup and reports the live refresh token at 200.
   activeRefresh <- introspect mgr port basic refreshToken
-  dig ["active"] activeRefresh @?= Just (Aeson.Bool True)
-  (dig ["token_type"] activeRefresh >>= asText) @?= Just "refresh_token"
+  activeRefresh @?= object ["active" .= True, "token_type" .= ("refresh_token" :: Text)]
 
   -- The flip: revoke the refresh token, and the access token's session dies with it, so
   -- introspection -- which is session-aware regardless of sessionCheckMode -- now reports inactive.
   (revStatus, _, _) <- postForm mgr port "/oauth/revoke" basic [("token", Text.encodeUtf8 refreshToken), ("token_type_hint", "refresh_token")]
   revStatus @?= 200
   afterRevoke <- introspect mgr port basic accessToken
-  (dig ["active"] afterRevoke) @?= Just (Aeson.Bool False)
+  afterRevoke @?= object ["active" .= False]
   -- The refresh token no longer rotates.
   reuse <- postForm mgr port "/oauth/token" basic [("grant_type", "refresh_token"), ("refresh_token", Text.encodeUtf8 refreshToken)]
   assertOAuthError "a revoked refresh token" 400 "invalid_grant" reuse
@@ -2833,8 +2930,131 @@
 introspect :: Manager -> Int -> Maybe (Text, Text) -> Text -> IO Value
 introspect mgr port basic tok = do
   r <- postForm mgr port "/oauth/introspect" basic [("token", Text.encodeUtf8 tok)]
+  statusOf r @?= 200
   must "introspection body" (bodyOf r)
 
+scenarioResourcePolicies :: IORef World -> JWK -> ShomeiConfig -> UTCTime -> Text -> Text -> Int -> IO ()
+scenarioResourcePolicies ref jwk cfg clock confId svcId port = do
+  mgr <- newManager defaultManagerSettings
+  account <- runInMemory ref (findServiceAccountByClientId svcId) >>= must "provisioned service"
+  let client = Just (confId, confidentialClientSecret)
+      service = Just (svcId, oauthClientSecret)
+      request auth token = postForm mgr port "/oauth/introspect" auth [("token", Text.encodeUtf8 token)]
+      inspect = Resource.inspect cfg.issuer cfg.audience clock
+      inspectToken token = inspect (request client token)
+      grant params = do
+        r <- postForm mgr port "/oauth/token" service params
+        statusOf r @?= 200
+        must "granted access token" (bodyOf r >>= dig ["access_token"] >>= asText)
+      keys = keySetPublicJwks (KeySet jwk [])
+      checkAccess token subject kind actor holder routes = do
+        signed <- verifyToken keys cfg token >>= either (assertFailure . show) pure
+        reply <- request client token
+        -- An introspection answer names a subject and its session: it must not be cached.
+        lookup "Cache-Control" (headersOf reply) @?= Just "no-store"
+        evidence <- inspect (pure reply) >>= either (assertFailure . show) pure
+        evidence @?= Resource.Evidence subject signed.sessionId kind (Set.singleton ingestScope) actor holder
+        Resource.acceptingRoutes evidence @?= routes
+        pure reply
+
+  (login, memberId, loginSid) <- signupPrincipal mgr port jwk "resource-member"
+  (interactive, refresh) <- issueOAuthSession mgr port confId login "kawa:ingest"
+  machine <- grant [("grant_type", "client_credentials"), ("scope", "kawa:ingest")]
+  delegated <-
+    grant
+      [ ("grant_type", "urn:ietf:params:oauth:grant-type:token-exchange"),
+        ("subject_token", Text.encodeUtf8 login),
+        ("subject_token_type", "urn:ietf:params:oauth:token-type:access_token"),
+        ("scope", "kawa:ingest")
+      ]
+  let backingUser = account ^. #userId
+  -- The token an OAuth client holds for the member is interactive, but names that client, so a
+  -- route can require the member's own first-party login instead.
+  _ <- checkAccess interactive memberId SessionDomain.InteractiveSession Nothing (Just confId) ["member"]
+  machineReply <- checkAccess machine backingUser SessionDomain.MachineSession Nothing Nothing ["machine-ingest", "service-ingest"]
+  delegatedReply <- checkAccess delegated memberId SessionDomain.DelegatedSession (Just backingUser) Nothing ["service-ingest"]
+  firstParty <- inspectToken login >>= either (assertFailure . show) pure
+  firstParty.client @?= Nothing
+  Resource.acceptingRoutes firstParty @?= ["first-party-member", "member"]
+  -- The hint only orders the search: a mis-hinted token is still found as its real type.
+  hintedAccess <- postForm mgr port "/oauth/introspect" client [("token", Text.encodeUtf8 machine), ("token_type_hint", "refresh_token")]
+  bodyOf hintedAccess @?= bodyOf machineReply
+  hintedRefresh <- postForm mgr port "/oauth/introspect" client [("token", Text.encodeUtf8 refresh), ("token_type_hint", "access_token")]
+  bodyOf hintedRefresh @?= Just (object ["active" .= True, "token_type" .= ("refresh_token" :: Text)])
+  lookup "Cache-Control" (headersOf hintedRefresh) @?= Just "no-store"
+  -- Client identity does not select the response profile.
+  serviceReply <- request service delegated
+  bodyOf serviceReply @?= bodyOf delegatedReply
+  statusOf serviceReply @?= 200
+  checkIntrospectionFailures cfg clock delegatedReply
+
+  -- The token for the other audience verifies with that audience's configuration.
+  let signed config at = mkTokenForSession jwk config memberId loginSid Set.empty Set.empty Nothing at
+      otherAudience = set #audience (Audience "another-resource") cfg
+  other <- signed otherAudience clock
+  otherClaims <- verifyToken keys otherAudience other >>= either (assertFailure . show) pure
+  otherClaims.audience @?= otherAudience.audience
+  wrongIssuer <- signed (set #issuer (Issuer "https://other.test") cfg) clock
+  -- The helper issues a 900-second token. It expired an hour ago, beyond issuer skew.
+  expired <- signed cfg (addUTCTime (-4500) clock)
+  -- Correctly signed tokens whose claims disagree with the stored session about the subject or
+  -- the actor are not evidence for that session.
+  wrongSubject <- mkTokenForSession jwk cfg backingUser loginSid Set.empty Set.empty Nothing clock
+  wrongActor <- mkTokenForSession jwk cfg memberId loginSid Set.empty Set.empty (Just backingUser) clock
+  forM_ [other, wrongIssuer, expired, "invalid-bearer", wrongSubject, wrongActor] $ \token ->
+    inspectToken token >>= (@?= Left Resource.Inactive)
+  inspectToken refresh >>= (@?= Left Resource.UnsuitableCredential)
+  inspect (request Nothing login) >>= (@?= Left Resource.LookupFailed)
+
+  revoked <- postForm mgr port "/oauth/revoke" client [("token", Text.encodeUtf8 refresh)]
+  statusOf revoked @?= 200
+  inspectToken interactive >>= (@?= Left Resource.Inactive)
+  -- Keep the signup JWT valid while expiring, then removing, its own session row.
+  modifyIORef' ref (\w -> w {sessions = Map.adjust (set #expiresAt clock) loginSid w.sessions})
+  inspectToken login >>= (@?= Left Resource.Inactive)
+  modifyIORef' ref (\w -> w {sessions = Map.delete loginSid w.sessions})
+  inspectToken login >>= (@?= Left Resource.Inactive)
+
+  -- Revoking the service account ends its machine session and the delegated session it acts in.
+  forM_ [machine, delegated] $ \token ->
+    inspectToken token >>= either (assertFailure . show) (const (pure ()))
+  runInMemory ref (revokeServiceAccount (account ^. #serviceAccountId) clock)
+  forM_ [machine, delegated] $ \token ->
+    inspectToken token >>= (@?= Left Resource.Inactive)
+
+-- Exercise an older provider, damaged replies, and transport failures at the
+-- consumer's HTTP boundary. Start each variation from the same real delegated reply.
+checkIntrospectionFailures :: ShomeiConfig -> UTCTime -> RawResponse -> IO ()
+checkIntrospectionFailures cfg clock reply = do
+  obj <- case bodyOf reply of
+    Just (Object o) -> pure o
+    _ -> assertFailure "expected an introspection object"
+  let inspect = Resource.inspect cfg.issuer cfg.audience clock
+      changed edit = pure (200, [], Just (Object (edit obj)))
+  forM_
+    [ ("missing kind", KM.delete "session_kind"),
+      ("unknown kind", KM.insert "session_kind" (String "unknown")),
+      ("missing actor", KM.delete "act"),
+      ("invalid actor", KM.insert "act" (object ["sub" .= ("bad" :: Text)])),
+      ("invalid subject", KM.insert "sub" (String "bad")),
+      ("invalid session", KM.insert "sid" (String "bad")),
+      ("invalid expiry", KM.insert "exp" (String "tomorrow")),
+      ("missing scope", KM.delete "scope")
+    ]
+    $ \(label, edit) -> inspect (changed edit) >>= assertEqual label (Left Resource.MalformedReply)
+  forM_ ["", "kawa:ingest-all"] $ \scope -> do
+    evidence <- inspect (changed (KM.insert "scope" (String scope))) >>= either (assertFailure . show) pure
+    Resource.acceptingRoutes evidence @?= []
+  several <- inspect (changed (KM.insert "scope" (String "events:read kawa:ingest jobs:list"))) >>= either (assertFailure . show) pure
+  Resource.acceptingRoutes several @?= ["service-ingest"]
+  Resource.inspect (Issuer "https://other.test") cfg.audience clock (pure reply) >>= (@?= Left Resource.UnsuitableCredential)
+  Resource.inspect cfg.issuer (Audience "another-resource") clock (pure reply) >>= (@?= Left Resource.UnsuitableCredential)
+  inspect (changed (KM.insert "exp" (Number 0))) >>= (@?= Left Resource.UnsuitableCredential)
+  inspect (pure (200, [], Nothing)) >>= (@?= Left Resource.MalformedReply)
+  forM_ [302, 503] $ \status ->
+    inspect (pure (status, [], bodyOf reply)) >>= (@?= Left Resource.LookupFailed)
+  inspect (throwIO (HttpExceptionRequest defaultRequest ResponseTimeout)) >>= (@?= Left Resource.LookupFailed)
+
 -- | The @sub@ claim of an ID token, read through the same signature-verifying path the M3 test
 -- uses (so it doubles as a second check that the token verifies). @jwk@ is the test signing key.
 idTokenSub :: JWK -> Text -> IO Text
@@ -3919,3 +4139,133 @@
   allIds <- walk Nothing []
   length allIds @?= 206
   Set.size (Set.fromList allIds) @?= 206
+
+-- A narrow typed route exercises both parsing hooks without involving credentials.
+type OAuthParseAPI =
+  "identity" :> "oauth" :> "parse" :> QueryParam' '[Required, Strict] "number" Int :> Header' '[Required, Strict] "X-Number" Int :> Get '[JSON] Int
+    :<|> "identity" :> "oauth" :> "body" :> ReqBody '[JSON] Int :> Post '[JSON] Int
+
+scenarioOAuthBoundary :: Env -> IO ()
+scenarioOAuthBoundary env = do
+  mounts <- either (fail . T.unpack) pure (oauthMounts [["oauth"], ["identity", "oauth"]])
+  let ctx = authHandler env :. shomeiErrorFormattersWithOAuthMounts mounts :. EmptyContext
+      mounted =
+        problemMiddlewareWithOAuthMounts mounts $
+          serveWithContext
+            (Proxy @(TestAPI :<|> "identity" :> TestAPI :<|> OAuthParseAPI))
+            ctx
+            (testServer env :<|> testServer env :<|> ((\n h -> pure (n + h)) :<|> pure))
+  testWithApplication (pure mounted) \port -> do
+    mgr <- newManager defaultManagerSettings
+    forM_ ["/oauth", "/identity/oauth"] \prefix -> do
+      unknown <- getRaw mgr port (prefix <> "/unknown") []
+      assertOAuthError "namespace not found" 404 "invalid_request" unknown
+      wrongMethod <- getRaw mgr port (prefix <> "/token") []
+      assertOAuthError "method mismatch" 405 "invalid_request" wrongMethod
+      forM_ [("Accept", "application/xml", 406), ("Content-Type", "application/xml", 415)] \(name, value, expected) -> do
+        initial <- parseRequest ("http://127.0.0.1:" <> show port <> prefix <> "/token")
+        response <- httpLbs initial {method = "POST", requestHeaders = [(name, value)], requestBody = RequestBodyLBS "secret-sentinel"} mgr
+        statusCode (responseStatus response) @?= expected
+        assertBool "JSON errors ignore unacceptable Accept" (maybe False (BS.isPrefixOf "application/json") (lookup "Content-Type" (responseHeaders response)))
+        assertBool "no parser diagnostics" (not ("secret-sentinel" `BS.isInfixOf` LBS.toStrict (responseBody response)))
+      duplicate <- getRaw mgr port (prefix <> "/token") [("Authorization", "secret-sentinel"), ("Authorization", "second")]
+      assertOAuthError "duplicate authentication" 400 "invalid_request" duplicate
+    forM_ ["/oauthish/token", "/reports/oauth/token"] \path -> do
+      response <- getRaw mgr port path []
+      assertProblem "outside configured namespaces" 404 "not_found" response
+      duplicate <- getRaw mgr port path [("Authorization", "one"), ("Authorization", "two")]
+      assertProblem "outside duplicate header" 401 "token_invalid" duplicate
+    forM_ [("/identity/oauth/parse?number=secret-sentinel", [("X-Number", "1")]), ("/identity/oauth/parse?number=1", [("X-Number", "secret-sentinel")])] \(path, headers) -> do
+      response <- getRaw mgr port path headers
+      assertOAuthError "safe query/header parsing" 400 "invalid_request" response
+      (dig ["error_description"] =<< bodyOf response) @?= Just (String "request could not be parsed")
+
+    initial <- parseRequest ("http://127.0.0.1:" <> show port <> "/identity/oauth/body")
+    malformed <- httpLbs initial {method = "POST", requestHeaders = [("Content-Type", "application/json")], requestBody = RequestBodyLBS "\"secret-sentinel\""} mgr
+    statusCode (responseStatus malformed) @?= 400
+    (Aeson.decode (responseBody malformed) :: Maybe OAuth.OAuthErrorResponse) @?= Just (OAuth.OAuthErrorResponse "invalid_request" "request could not be parsed")
+
+scenarioAdminRecovery :: IORef World -> JWK -> ShomeiConfig -> Int -> IO ()
+scenarioAdminRecovery ref jwk cfg port = do
+  mgr <- newManager defaultManagerSettings
+  (adminId, _) <- signupOver mgr port "recovery-admin@example.com"
+  grantAdminTo ref adminId
+  adminToken <- loginOver mgr port "recovery-admin@example.com"
+  (targetId, targetToken) <- signupOver mgr port "recovery-target@example.com"
+  (ordinaryId, ordinaryToken) <- signupOver mgr port "recovery-ordinary@example.com"
+  let path uid = "/v1/admin/users/" <> T.unpack uid <> "/mfa/reset"
+      valid = object ["identityVerified" .= True, "caseReference" .= ("INC-1234" :: Text)]
+      post headers body = postRaw' mgr port (path targetId) headers body
+  (enrolled, _) <- postAuthNoBody mgr port "/v1/auth/totp/enroll" (bearer targetToken)
+  enrolled @?= 200
+  (generated, _) <- postAuthNoBody mgr port "/v1/auth/recovery-codes" (bearer targetToken)
+  generated @?= 200
+  (begun, _) <- postAuthNoBody mgr port "/v1/auth/passkeys/register/begin" (bearer targetToken)
+  begun @?= 200
+  before <- readIORef ref
+  post [] valid >>= assertProblem "anonymous recovery" 401 "missing_token"
+  post (bearer ordinaryToken) valid >>= assertProblem "ordinary recovery" 403 "missing_role"
+  self <- postRaw' mgr port (path adminId) (bearer adminToken) valid
+  assertProblem "self recovery" 403 "self_target_forbidden" self
+  parsedAdmin <- parseUserId adminId
+  parsedOrdinary <- parseUserId ordinaryId
+  delegated <- mkTokenFor jwk cfg parsedAdmin (Set.singleton (Role "admin")) Set.empty (Just parsedOrdinary)
+  delegatedResult <- post (bearer delegated) valid
+  statusOf delegatedResult @?= 403
+  forM_
+    [ object ["identityVerified" .= False, "caseReference" .= ("INC-1" :: Text)],
+      object ["identityVerified" .= True, "caseReference" .= ("sentinel\nidentity evidence" :: Text)],
+      object ["caseReference" .= ("INC-1" :: Text)]
+    ]
+    $ \invalid -> do
+      rejected <- post (bearer adminToken) invalid
+      statusOf rejected @?= 400
+  csrf <- post [sessionCookieHeader adminToken, foreignOrigin] valid
+  assertProblem "recovery cookie CSRF" 403 "csrf_rejected" csrf
+  unknown <- genUserId
+  missing <- postRaw' mgr port (path (idText unknown)) (bearer adminToken) valid
+  statusOf missing @?= 404
+  (suspendedId, _) <- signupOver mgr port "recovery-suspended@example.com"
+  _ <- postAuthNoBody mgr port ("/v1/admin/users/" <> T.unpack suspendedId <> "/suspend") (bearer adminToken)
+  inactive <- postRaw' mgr port (path suspendedId) (bearer adminToken) valid
+  statusOf inactive @?= 409
+  rejectedWorld <- readIORef ref
+  rejectedWorld.totpCredentials @?= before.totpCredentials
+  rejectedWorld.recoveryCodes @?= before.recoveryCodes
+  rejectedWorld.pendingCeremonies @?= before.pendingCeremonies
+  length [() | Event.UserSecondFactorsReset _ <- rejectedWorld.publishedEvents] @?= 0
+  success <- post (bearer adminToken) valid
+  statusOf success @?= 200
+  (bodyOf success >>= dig ["counts", "totpCredentialsRemoved"]) @?= Just (toJSON (1 :: Int))
+  (bodyOf success >>= dig ["counts", "recoveryCodesRemoved"]) @?= Just (toJSON (10 :: Int))
+  assertBool "recovery response issues no tokens" (maybe True (\body -> not (isJust (dig ["accessToken"] body)) && not (isJust (dig ["token"] body))) (bodyOf success))
+  (staleEnroll, _) <- postAuthNoBody mgr port "/v1/auth/totp/enroll" (bearer targetToken)
+  staleEnroll @?= 401
+  (staleBegin, _) <- postAuthNoBody mgr port "/v1/auth/passkeys/register/begin" (bearer targetToken)
+  staleBegin @?= 401
+  (staleCodes, _) <- postAuthNoBody mgr port "/v1/auth/recovery-codes" (bearer targetToken)
+  staleCodes @?= 401
+  (passwordStatus, _) <- postJSON mgr port "/v1/auth/login" (object ["loginId" .= ("recovery-target@example.com" :: Text), "password" .= adminPassword])
+  passwordStatus @?= 200
+  world <- readIORef ref
+  case [d | Event.UserSecondFactorsReset d <- world.publishedEvents] of
+    [d] -> d.recoveryActor @?= AuthenticatedAdministrator parsedAdmin
+    _ -> assertFailure "expected one attributed recovery event"
+  -- A revoked administrator JWT still verifies offline; this route requires its backing session.
+  revokeAllSessionsOf ref adminId
+  revoked <- post (bearer adminToken) valid
+  statusOf revoked @?= 401
+
+scenarioServiceRecovery :: IORef World -> Text -> Int -> IO ()
+scenarioServiceRecovery ref adminClient port = do
+  mgr <- newManager defaultManagerSettings
+  (target, _) <- signupOver mgr port "service-recovery-target@example.com"
+  minted <- postForm mgr port "/oauth/token" (Just (adminClient, oauthClientSecret)) [("grant_type", "client_credentials")]
+  statusOf minted @?= 200
+  token <- must "administrator service token" (bodyOf minted >>= dig ["access_token"] >>= asText)
+  result <- postRaw' mgr port ("/v1/admin/users/" <> T.unpack target <> "/mfa/reset") (bearer token) (object ["identityVerified" .= True, "caseReference" .= ("INC-service" :: Text)])
+  statusOf result @?= 200
+  world <- readIORef ref
+  case [d.recoveryActor | Event.UserSecondFactorsReset d <- world.publishedEvents] of
+    [AdministratorService _] -> pure ()
+    other -> assertFailure ("expected service attribution: " <> show other)
diff --git a/test/ResourceServerFixture.hs b/test/ResourceServerFixture.hs
new file mode 100644
--- /dev/null
+++ b/test/ResourceServerFixture.hs
@@ -0,0 +1,103 @@
+-- | A resource server's view of the public introspection response.
+module ResourceServerFixture
+  ( Evidence (..),
+    Refusal (..),
+    inspect,
+    acceptingRoutes,
+  )
+where
+
+import Control.Exception (try)
+import Control.Monad (guard)
+import Data.Aeson (Object, Value, withObject, (.:), (.:?))
+import Data.Aeson.KeyMap qualified as KM
+import Data.Aeson.Types (Parser, parseMaybe)
+import Data.Maybe (fromMaybe, isJust, isNothing)
+import Data.Set (Set)
+import Data.Set qualified as Set
+import Data.Text (Text)
+import Data.Text qualified as T
+import Data.Time (UTCTime)
+import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds)
+import Network.HTTP.Client (HttpException)
+import Network.HTTP.Types (Header)
+import Shomei.Authorization.Claims.Domain (Audience, Issuer, Scope (..), validScopeName)
+import Shomei.Id (SessionId, UserId)
+import Shomei.Session.Domain (SessionKind (..))
+
+data Evidence = Evidence
+  { subject :: UserId,
+    sessionId :: SessionId,
+    kind :: SessionKind,
+    scopes :: Set Scope,
+    actor :: Maybe UserId,
+    -- | the OAuth client holding the token, when it came from an authorization-code grant
+    client :: Maybe Text
+  }
+  deriving stock (Eq, Show)
+
+data Refusal = Inactive | UnsuitableCredential | LookupFailed | MalformedReply
+  deriving stock (Eq, Show)
+
+inspect :: Issuer -> Audience -> UTCTime -> IO (Int, [Header], Maybe Value) -> IO (Either Refusal Evidence)
+inspect issuer audience clock request = do
+  response <- try @HttpException request
+  pure $ case response of
+    Right (200, _, body) -> fromMaybe (Left MalformedReply) (body >>= parseMaybe (withObject "introspection" parseReply))
+    _ -> Left LookupFailed
+  where
+    parseReply obj = do
+      active <- obj .: "active"
+      if active then parseActive obj else pure (Left Inactive)
+
+    parseActive obj = do
+      tokenType <- obj .: "token_type"
+      case tokenType :: Text of
+        "Bearer" -> do
+          iss <- obj .: "iss"
+          aud <- obj .: "aud"
+          expSeconds <- obj .: "exp"
+          if iss == issuer && aud == audience && expSeconds > (floor (utcTimeToPOSIXSeconds clock) :: Integer)
+            then Right <$> parseEvidence obj
+            else pure (Left UnsuitableCredential)
+        _ -> pure (Left UnsuitableCredential)
+
+parseEvidence :: Object -> Parser Evidence
+parseEvidence obj = do
+  subject <- obj .: "sub"
+  sessionId <- obj .: "sid"
+  name <- obj .: "session_kind"
+  kind <- case name :: Text of
+    "interactive" -> pure InteractiveSession
+    "machine" -> pure MachineSession
+    "delegated" -> pure DelegatedSession
+    _ -> fail "unknown session kind"
+  actor <- traverse (withObject "actor" parseActor) (KM.lookup "act" obj)
+  guard (isJust actor == (kind == DelegatedSession))
+  scope <- obj .: "scope"
+  let scopes = Set.fromList [Scope s | s <- T.splitOn " " scope, not (T.null s)]
+  guard (all validScopeName scopes)
+  client <- obj .:? "client_id"
+  pure Evidence {subject, sessionId, kind, scopes, actor, client}
+  where
+    parseActor a = do
+      guard (KM.size a == 1)
+      a .: "sub"
+
+-- | Each route chooses its own accepted kinds and required scopes, and whether a token held by
+-- an OAuth client on the user's behalf is as good as the user's own first-party login.
+acceptingRoutes :: Evidence -> [Text]
+acceptingRoutes evidence =
+  [ route
+  | (route, kinds, required, clientAllowed) <-
+      [ ("first-party-member", [InteractiveSession], [], False),
+        ("member", [InteractiveSession], [], True),
+        ("machine-ingest", [MachineSession], [ingest], True),
+        ("service-ingest", [MachineSession, DelegatedSession], [ingest], True)
+      ],
+    evidence.kind `elem` kinds,
+    all (`Set.member` evidence.scopes) required,
+    clientAllowed || isNothing evidence.client
+  ]
+  where
+    ingest = Scope "kawa:ingest"
