docs(spec): align mid-session auth spec with the token_expired predicate
Copilot review on #2105: specification/v2_auth_mid_session.md still said checkAuthChallengeSatisfied is satisfied for token_expired / unauthorized by any valid non-expired token. Only token_expired can short-circuit, and only for a provably unexpired JWT; invalid_token and unauthorized are always false (which the code already did before this branch). Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
d41e4e1dd7
commit
c20fce9ba2
1 changed files with 2 additions and 1 deletions
|
|
@ -206,7 +206,8 @@ export type AuthChallengeOutcome =
|
|||
|
||||
Read-only check against **current storage** (and token expiry helpers). Used before starting visible OAuth — especially when a background browser tab regains focus and another tab may have already re-authenticated. Does **not** call the authorization server.
|
||||
|
||||
- **`token_expired` / `unauthorized`:** valid non-expired access token in storage.
|
||||
- **`token_expired`:** a **provably** unexpired access token in storage — a JWT whose `exp` is still in the future (60s skew). Storage records no absolute expiry for an opaque token (`expires_in` is relative to an issuance instant that is never persisted), so "expiry unknown" returns **false**: the resource server has said the credential is dead, and no local evidence contradicts it. Otherwise an opaque token would be replayed forever ([#2051](https://github.com/modelcontextprotocol/inspector/issues/2051)).
|
||||
- **`invalid_token` / `unauthorized`:** always **false** — the resource server explicitly rejected the credential.
|
||||
- **`insufficient_scope`:** stored/token scope is a superset of required / union scopes. Empty scope on an `insufficient_scope` challenge returns **false** (do not short-circuit).
|
||||
|
||||
### Strategy by protocol
|
||||
|
|
|
|||
Loading…
Reference in a new issue