<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.39 (Ruby 3.4.9) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-oauth-deferred-token-response-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.34.0 -->
  <front>
    <title abbrev="DTR">Deferred Token Response</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-deferred-token-response-00"/>
    <author initials="F.K." surname="Jacobsen" fullname="Frederik Krogsdal Jacobsen">
      <organization>Idura</organization>
      <address>
        <email>frederik.krogsdal@idura.eu</email>
      </address>
    </author>
    <author initials="G." surname="de Oliveira Niero" fullname="Guilherme de Oliveira Niero">
      <organization>Itaú</organization>
      <address>
        <email>guilherme.niero@itau-unibanco.com.br</email>
      </address>
    </author>
    <author initials="M." surname="Gerber" fullname="Maxwell Gerber">
      <organization>Twilio</organization>
      <address>
        <email>mgerber@twilio.com</email>
      </address>
    </author>
    <date year="2026" month="September" day="16"/>
    <area>Security</area>
    <workgroup>Web Authorization Protocol</workgroup>
    <keyword>oauth</keyword>
    <keyword>deferred authorization</keyword>
    <keyword>asynchronous token issuance</keyword>
    <keyword>polling</keyword>
    <abstract>
      <?line 80?>

<t>This document defines the Deferred Token Response (DTR) extension
for OAuth 2.1. In existing OAuth grants, the token endpoint either
issues an access token or returns an error.
DTR establishes a generic asynchronous token request mechanism that any
OAuth grant may plug into.
In DTR-aware flows, the authorization server returns a
<tt>deferral_code</tt> and a polling interval, indicating that the final
token response will be available at a later time.
The client retrieves the eventual response by polling the token
endpoint, or by receiving a callback from the authorization server
when one is configured.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://maxwellgerber.github.io/deferred-token-response/draft-gerber-oauth-deferred-token-response.html"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-gerber-oauth-deferred-token-response/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Web Authorization Protocol Working Group mailing list (<eref target="mailto:oauth@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/oauth/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/oauth/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/maxwellgerber/deferred-token-response"/>.</t>
    </note>
  </front>
  <middle>
    <?line 95?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Existing OAuth grants assume the authorization server can decide
synchronously whether to issue an access token.
The Authorization Code Grant (Section 4.1 of <xref target="OAUTH-2.1"/>), Client
Credentials Grant (Section 4.2 of <xref target="OAUTH-2.1"/>), and assertion-based
grants such as <xref target="ID-JAG"/> all respond to a token request with either
a token response or an error response.</t>
      <t>However, some authorization decisions cannot complete synchronously:</t>
      <ul spacing="normal">
        <li>
          <t>Fraud Prevention: Sensitive operations may trigger manual review by
parties other than the resource owner.</t>
        </li>
        <li>
          <t>ID Verification: Users may submit copies of physical credentials
during onboarding or step-up. Verification by the authorization server
(or a third party acting on its behalf) can take hours.</t>
        </li>
        <li>
          <t>Autonomous Agent Authorization: An agent acting on behalf of a user
may request access beyond what was provisioned at enrollment,
requiring out-of-band approval before the request can be granted.</t>
        </li>
        <li>
          <t>Complex Authorization: Enterprise businesses often manage access
controls using governance and administration workflows.
Access requests may need to be approved by parties other than the
resource owner.</t>
        </li>
      </ul>
      <t>In each case, the authorization server today must return an error
response, leaving the client without a mechanism to discover when (or
whether) the request will eventually be approved.</t>
      <t>This specification defines a Deferred Token Response, in which the
authorization server returns a <tt>deferral_code</tt> and a polling
interval in place of an access token.
The <tt>deferral_code</tt> represents the pending token request
and entitles the client to a final token response when the request
resolves.
The client either polls the token endpoint with the <tt>deferral_code</tt>,
or receives a callback from the authorization server when a callback
URI is registered.</t>
      <t>Unlike the Device Authorization Grant <xref target="RFC8628"/>, deferral under DTR
is initiated by the authorization server, not by the client or the
end-user.
This allows an authorization server to apply DTR dynamically, based on
policy or risk analysis, to a request that began under another grant.
The Device Authorization Grant additionally assumes that the same
end-user who initiated the flow is the party who will approve it; DTR
makes no such assumption, and supports use cases in which a different
user, a different system, or no human at all completes the
authorization decision.</t>
      <t>In many of the motivating use cases, the authorization server delegates
the actual verification or decision to an external service — an identity
verification vendor, a fraud analysis platform, or a governance system.
The protocol between the authorization server and any such external
provider is out of scope for this specification; only the interface
between the client and the authorization server is defined here.</t>
    </section>
    <section anchor="conventions-and-definitions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

<t>This specification defines the following terms:</t>
      <dl>
        <dt>deferral code</dt>
        <dd>
          <t>A unique, opaque, server-generated identifier that represents a
single pending token request. The deferral code is carried
in the <tt>deferral_code</tt> member of the deferred response
(<xref target="token-endpoint-deferred-response"/>) and is identified, when
used as a <tt>token_type_hint</tt> at the revocation endpoint, by the URI
<tt>urn:ietf:params:oauth:token-type:deferral-code</tt>. The deferral
code is bound to the issuing client and to a sender-constraining
key per <xref target="sender-constraint-requirements"/>, and entitles the bound
party to retrieve the eventual token response.</t>
        </dd>
        <dt>polling interval</dt>
        <dd>
          <t>The minimum number of seconds, conveyed in the <tt>interval</tt> parameter
of the deferred response, that the client <bcp14>MUST</bcp14> wait between two
consecutive polling requests for the same deferral code.</t>
        </dd>
        <dt>deferred client notification endpoint</dt>
        <dd>
          <t>An HTTPS URI registered by the client at which it accepts callback
notifications from the authorization server when a deferred request
resolves.</t>
        </dd>
        <dt>originating grant</dt>
        <dd>
          <t>The OAuth grant — for example, the Authorization Code Grant
(Section 4.1 of <xref target="OAUTH-2.1"/>), the Client Credentials Grant
(Section 4.2 of <xref target="OAUTH-2.1"/>), or Token Exchange (<xref target="RFC8693"/>) —
on whose token request the deferred response was returned, and
whose successful token response shape is reused when the deferred
request eventually resolves.</t>
        </dd>
        <dt>preceding endpoint</dt>
        <dd>
          <t>Some grant types utilize multiple authorization server endpoints.
For an originating grant whose flow begins at an endpoint other
than the token endpoint, the preceding endpoint is the endpoint
utilized just before the token endpoint. Examples include the
authorization endpoint of the Authorization Code Grant (<xref target="OAUTH-2.1"/>),
the device authorization endpoint of <xref target="RFC8628"/>, and the authorization
challenge endpoint of <xref target="FIPA"/>. A grant that operates entirely at
the token endpoint (for example, the Client Credentials Grant)
has no preceding endpoint.</t>
        </dd>
      </dl>
    </section>
    <section anchor="overview">
      <name>Overview</name>
      <t>The Deferred Token Response flow allows an authorization server to
defer the issuance of an access token for an arbitrarily long time
after the request that would normally produce one.</t>
      <t>The flow proceeds entirely through the originating grant's existing
endpoints. A grant becomes deferred when:</t>
      <ol spacing="normal" type="1"><li>
          <t>The client signals willingness to accept a deferred response by
including <tt>deferred</tt> among the values of the <tt>completion_mode</tt>
parameter on the originating grant's token endpoint request.</t>
        </li>
        <li>
          <t>The authorization server elects, on that token endpoint request,
to return a deferred response in place of the normal token
response. The deferred response carries a <tt>deferral_code</tt> instead
of an access token.</t>
        </li>
        <li>
          <t>The client polls the token endpoint with the <tt>deferral_code</tt>
until the authorization server returns the final token response, or
optionally receives a callback notification when the request
resolves.</t>
        </li>
      </ol>
      <t>For an originating grant with a preceding endpoint — for example, the
authorization endpoint of the Authorization Code Grant of
<xref target="OAUTH-2.1"/>, the device authorization endpoint of <xref target="RFC8628"/>, or
the authorization challenge endpoint of <xref target="FIPA"/> — the client <bcp14>MAY</bcp14> also
send <tt>completion_mode=deferred</tt> on the preceding request as an advance
hint.
The hint allows the authorization server to commit to deferral-aware
behavior before the token request — for example, by collecting different
consent, by showing a different verification UX, or by selecting a different
review path.
An authorization server that acts on the hint depends on
the client's intent at the token endpoint matching it; see
<xref target="pre-token-hints"/>. The authorization server returns its grant's
normal response to the preceding request (for example, an
authorization <tt>code</tt>) regardless of whether the request will be
deferred.</t>
      <artwork><![CDATA[
+--------+                                  +-----+              +----------+
|        |                                  |     |              |          |
|        |--(1) Auth Request--------------->|     |              |          |
|        |   (completion_mode=deferred)     |     |              |          |
|        |                                  |     |<-(2) Obtain->| End-User |
|        |                                  |     |    input     |          |
|        |<-(3) Auth Response (code)--------|     |              |          |
|        |                                  |     |              +----------+
|        |--(4) Token Request-------------->|     |
|        | (code, completion_mode=deferred) |     |
|        |<-(5) Deferred Response-----------|     |
|        |   (deferral_code)                |     |
|        |                                  |     |---------+
| Client |                                  | AS  |         |
|        |--(6) Token Request-------------->|     |         |
|        |   (deferral_code)                |     | (7) Complete request
|        |<-Token Response------------------|     |         |
|        |                                  |     |<--------+
|        |               ...                |     |
|        |                                  |     |
|        |<-(8) Optional Callback-----------|     |
|        |                                  |     |
|        |--(6) Token Request-------------->|     |
|        |   (deferral_code)                |     |
|        |<-Token Response------------------|     |
|        |                                  |     |
+--------+                                  +-----+
]]></artwork>
      <t>For a token-endpoint-only grant the flow is the same with steps (1)
through (3) collapsed into the initial token request.</t>
      <t>Once the authorization server has issued a <tt>deferral_code</tt>, the
remaining flow — polling, callback, eventual token response,
cancellation — is identical regardless of the originating grant.</t>
    </section>
    <section anchor="client-opt-in-signaling">
      <name>Client Opt-In Signaling</name>
      <t>The Deferred Token Response is an opt-in mechanism from the client's
perspective.
An authorization server <bcp14>MUST NOT</bcp14> issue a deferred response to a client
that has not signaled willingness to accept one.
This specification defines the <tt>completion_mode</tt> request parameter for
that purpose.</t>
      <section anchor="the-completion-mode-parameter">
        <name>The <tt>completion_mode</tt> Parameter</name>
        <dl>
          <dt><tt>completion_mode</tt></dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. A space-separated list of completion-mode values registered
in the "OAuth Completion Mode Values" registry (<xref target="iana-considerations"/>).
Order is not significant, and values <bcp14>MUST NOT</bcp14> be repeated. This
specification defines a single value, <tt>deferred</tt>: when it is present
in the list, the client signals that it is willing to accept a
deferred response from the authorization server in place of an
immediate token response or error. If the parameter is absent, or is
present but does not include <tt>deferred</tt>, the client requires
synchronous handling. The authorization server <bcp14>MUST</bcp14> ignore any value
it does not recognize.</t>
          </dd>
        </dl>
        <t>The client signals opt-in to DTR by including <tt>deferred</tt> among the
<tt>completion_mode</tt> values on the originating grant's token endpoint
request.</t>
        <t>For an originating grant with a preceding endpoint — the authorization
endpoint, the device authorization endpoint of <xref target="RFC8628"/>, the
authorization challenge endpoint, or another endpoint introduced by a
future extension — the client <bcp14>MAY</bcp14> additionally send
<tt>completion_mode=deferred</tt> on that preceding request as an advance hint
to the authorization server. The semantics of the hint are defined in
<xref target="pre-token-hints"/>.</t>
        <t>Authorization servers that publish Authorization Server Metadata <xref target="RFC8414"/> <bcp14>MUST</bcp14> include the following property to signal support for deferred token responses as described in this specification:</t>
        <dl>
          <dt><tt>deferred_token_response_supported</tt></dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. Boolean value specifying whether the the authorization server
supports the deferred token response defined in this specification.</t>
          </dd>
        </dl>
        <t>A client <bcp14>MAY</bcp14> discover authorization server support for this
specification through the <tt>deferred_token_response_supported</tt>
authorization server metadata parameter (<xref target="iana-considerations"/>). A
client <bcp14>MAY</bcp14> send <tt>completion_mode=deferred</tt> to an authorization server
that does not advertise support; such an authorization server
<bcp14>SHOULD</bcp14> silently ignore the parameter and complete the request synchronously
per its originating grant's rules.</t>
      </section>
      <section anchor="pre-token-hints">
        <name>Pre-Token Hints</name>
        <t>For an originating grant with a preceding endpoint, the client <bcp14>MAY</bcp14>
send <tt>completion_mode=deferred</tt> on that preceding request to inform the
authorization server in advance that the grant may resolve to a
deferred response at the token endpoint. The hint is optional: a
client that omits it on the preceding request can still opt in at the
token endpoint, and the authorization server <bcp14>MUST NOT</bcp14> reject a token
request carrying <tt>completion_mode=deferred</tt> solely because no hint was
received earlier.</t>
        <t>Where the authorization request is not sent directly to the
authorization endpoint, <tt>completion_mode</tt> is conveyed wherever the
request's other authorization parameters are conveyed — for example, in
the request body of a Pushed Authorization Request (PAR) or as a member
of a JWT-secured authorization request object (JAR).</t>
        <t>An authorization server <bcp14>MAY</bcp14> act on the hint by selecting a
deferral-aware path for the originating grant — for example, by
collecting different consent from the resource owner, by presenting a
different verification UX, by routing the request to a review queue,
or by altering its risk-analysis decision. An authorization server
that does not use the hint <bcp14>MUST</bcp14> treat the preceding request as it
would without DTR; the hint never alters the response shape of the
preceding endpoint.</t>
        <t>A client that has sent <tt>completion_mode=deferred</tt> on the preceding
request <bcp14>MUST</bcp14> also include <tt>deferred</tt> among the <tt>completion_mode</tt> values
on the resulting token request. If the client instead omits <tt>deferred</tt>
(or omits the parameter) at the token endpoint, the authorization
server <bcp14>MUST</bcp14> reject the request with the error <tt>invalid_request</tt>.</t>
        <t>A client that did not send a hint <bcp14>MAY</bcp14> still send
<tt>completion_mode=deferred</tt> at the token endpoint, and the authorization
server <bcp14>MAY</bcp14> return a deferred response.</t>
        <t>Polling requests (<xref target="token-endpoint-polling"/>) are not part of the
originating grant; they continue an already-deferred flow rather than
initiating one and <bcp14>MUST NOT</bcp14> carry the <tt>completion_mode</tt> parameter.</t>
      </section>
      <section anchor="authorization-server-discretion">
        <name>Authorization Server Discretion</name>
        <t>Sending <tt>completion_mode=deferred</tt> does not entitle the client to a
deferred response.
The authorization server retains discretion over whether to defer any
individual request — based on policy, risk analysis, or operational
state — and <bcp14>MAY</bcp14> complete the request synchronously even when the client
has opted in.</t>
        <t>Conversely, an authorization server <bcp14>MUST NOT</bcp14> defer a response to a
request whose <tt>completion_mode</tt> does not include <tt>deferred</tt>. In that
case the authorization server completes the request synchronously per
the originating grant's rules or returns an error per those rules.</t>
        <t>Authorization servers conforming to this specification <bcp14>MUST</bcp14> accept the
<tt>completion_mode</tt> parameter on requests for any grant within this
specification's scope; they <bcp14>MUST NOT</bcp14> reject a <tt>completion_mode</tt> value
they do not recognize as an error. The opt-in semantic is preserved by
the authorization server's choice of whether to defer, not by rejection
of the parameter itself.</t>
      </section>
      <section anchor="examples">
        <name>Examples</name>
        <t>Token endpoint request opting in to DTR (Authorization Code Grant):</t>
        <artwork><![CDATA[
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

grant_type=authorization_code
&code=SplxlOBeZQQYbYS6WxSbIA
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&completion_mode=deferred
]]></artwork>
        <t>Token endpoint request opting in to DTR (Client Credentials Grant):</t>
        <artwork><![CDATA[
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

grant_type=client_credentials
&scope=profile
&completion_mode=deferred
]]></artwork>
        <t>The following requests illustrate the optional pre-token hint
(<xref target="pre-token-hints"/>) on grants with a preceding endpoint. A client
that sends a hint is expected to follow up with
<tt>completion_mode=deferred</tt> on the corresponding token request shown
above.</t>
        <t>Authorization endpoint hint (Authorization Code Grant of <xref target="OAUTH-2.1"/>):</t>
        <artwork><![CDATA[
GET /authorize?response_type=code
  &client_id=s6BhdRkqt3
  &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
  &scope=profile
  &completion_mode=deferred
  &state=af0ifjsldkj HTTP/1.1
Host: server.example.com
]]></artwork>
        <t>Device authorization endpoint hint (Device Authorization Grant of
<xref target="RFC8628"/>):</t>
        <artwork><![CDATA[
POST /device_authorization HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

scope=profile
&completion_mode=deferred
]]></artwork>
        <t>Authorization challenge endpoint hint (<xref target="FIPA"/>):</t>
        <artwork><![CDATA[
POST /authorize-challenge HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

login_hint=%2B1-310-123-4567
&scope=profile
&completion_mode=deferred
]]></artwork>
      </section>
    </section>
    <section anchor="the-deferred-authorization-grant">
      <name>The Deferred Authorization Grant</name>
      <t>This section defines the protocol elements that comprise the deferred
authorization grant: how the originating grant's endpoint behaves
under DTR, the token endpoint request that may yield a
deferred response, the polling request that retrieves the eventual
token response, and the error responses returned during these
exchanges.</t>
      <t>This specification defines one new <tt>grant_type</tt> URN,
<tt>urn:ietf:params:oauth:grant-type:deferred</tt>, used only on polling
requests (<xref target="token-endpoint-polling"/>) to retrieve a deferred token
response. The originating grant's existing <tt>grant_type</tt> (for example,
<tt>authorization_code</tt> or <tt>client_credentials</tt>) is unchanged on the
token endpoint request that may yield a deferred response.</t>
      <section anchor="pre-token-request">
        <name>Pre-Token Request</name>
        <t>For grants that have a preceding endpoint, the client <bcp14>MAY</bcp14> send
<tt>completion_mode=deferred</tt> on the originating grant's request to that
endpoint as the optional pre-token hint defined in <xref target="pre-token-hints"/>.
The preceding endpoint behaves identically with or without
<tt>completion_mode</tt>: the authorization server returns the originating
grant's normal response and does not include any DTR-specific
parameter.</t>
        <t>The following is a non-normative example of an authorization-endpoint
hint under DTR (line wraps within values are for display only):</t>
        <artwork><![CDATA[
GET /authorize?response_type=code
  &client_id=s6BhdRkqt3
  &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
  &scope=profile
  &completion_mode=deferred
  &state=af0ifjsldkj HTTP/1.1
Host: server.example.com
]]></artwork>
        <section anchor="pre-token-request-validation">
          <name>Pre-Token Request Validation</name>
          <t>The authorization server <bcp14>MUST</bcp14> validate the request as it would without
DTR, with the following addition:</t>
          <ul spacing="normal">
            <li>
              <t>Apply the <tt>completion_mode</tt> rules of
<xref target="the-completion-mode-parameter"/>: process recognized values, ignore
unrecognized ones, and treat the request as requiring synchronous
handling if the parameter is absent or does not include <tt>deferred</tt>.</t>
            </li>
          </ul>
          <t>If the authorization server encounters any error, it <bcp14>MUST</bcp14> return the
originating grant's normal error response.</t>
        </section>
      </section>
      <section anchor="pre-token-response">
        <name>Pre-Token Response</name>
        <t>The authorization server returns the originating grant's normal
response to a preceding-endpoint request, regardless of whether the
request carried a <tt>completion_mode=deferred</tt> hint.
For the Authorization Code Grant of <xref target="OAUTH-2.1"/>, this is the
authorization code response of <xref section="4.1.2" sectionFormat="of" target="OAUTH-2.1"/>.</t>
        <t>The client processes the response per the originating grant's rules.</t>
      </section>
      <section anchor="token-endpoint-initial-request">
        <name>Token Endpoint — Initial Request</name>
        <t>The initial token request is the originating grant's token request,
extended with the <tt>completion_mode</tt> parameter from
<xref target="client-opt-in-signaling"/>.</t>
        <t>The client <bcp14>MAY</bcp14> also include the following parameter:</t>
        <dl>
          <dt><tt>client_notification_token</tt></dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. An opaque bearer credential generated by the client. If
present, the authorization server <bcp14>MUST</bcp14> bind it to the resulting
deferral code and <bcp14>MUST</bcp14> present it as a Bearer token on any callback
notification for that deferral code (see <xref target="the-callback-request"/>).
The token <bcp14>MUST</bcp14> contain sufficient entropy to make brute-force
guessing infeasible (a minimum of 128 bits, with 160 bits
<bcp14>RECOMMENDED</bcp14>). A client that registers a
<tt>deferred_client_notification_endpoint</tt> <bcp14>SHOULD</bcp14> include a
<tt>client_notification_token</tt>; without one, the client cannot
authenticate inbound callbacks (see <xref target="callback-endpoint-validation"/>).</t>
          </dd>
        </dl>
        <t>The response to this request is one of:</t>
        <ul spacing="normal">
          <li>
            <t>The originating grant's normal token response per
<xref section="5.1" sectionFormat="of" target="OAUTH-2.1"/>, if the authorization server completes
the request synchronously.</t>
          </li>
          <li>
            <t>The deferred response defined in
<xref target="token-endpoint-deferred-response"/>, if the authorization server
elects to defer the request. The deferred response is an error
response that carries a <tt>deferral_code</tt> the client uses for polling.</t>
          </li>
        </ul>
        <t>The following is a non-normative example of an initial token request
under DTR for the Authorization Code Grant:</t>
        <artwork><![CDATA[
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

grant_type=authorization_code
&code=SplxlOBeZQQYbYS6WxSbIA
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&completion_mode=deferred
&client_notification_token=f4oirNBUlM
]]></artwork>
        <section anchor="initial-request-validation">
          <name>Initial Request Validation</name>
          <t>The authorization server <bcp14>MUST</bcp14> validate the request as it would without
DTR, with the following additions:</t>
          <ul spacing="normal">
            <li>
              <t>Apply the <tt>completion_mode</tt> rules of
<xref target="the-completion-mode-parameter"/>: process recognized values and
ignore unrecognized ones; if the parameter is absent or does not
include <tt>deferred</tt>, treat the request as requiring synchronous
handling.</t>
            </li>
            <li>
              <t>If the originating grant has a preceding endpoint and the client
sent <tt>completion_mode=deferred</tt> on that earlier request, apply the
hint-consistency rule of <xref target="pre-token-hints"/>: if the token request
does not also include <tt>deferred</tt> in <tt>completion_mode</tt>, the
authorization server <bcp14>MUST</bcp14> reject the request with the error
<tt>invalid_request</tt>.</t>
            </li>
            <li>
              <t>If <tt>client_notification_token</tt> is present, verify that the value
conforms to the entropy requirements above. If not, the
authorization server <bcp14>MAY</bcp14> reject the request with <tt>invalid_request</tt>.</t>
            </li>
          </ul>
          <t>If the authorization server encounters any error, it <bcp14>MUST</bcp14> return an
error response per <xref target="token-endpoint-error-responses"/> or per the
originating grant's rules, as appropriate.</t>
        </section>
      </section>
      <section anchor="token-endpoint-deferred-response">
        <name>Token Endpoint — Deferred Response</name>
        <t>When the authorization server elects to defer a token request whose
<tt>completion_mode</tt> includes <tt>deferred</tt>, it returns an error response on
the token endpoint per <xref section="5.2" sectionFormat="of" target="OAUTH-2.1"/> with the HTTP
status code 400 (Bad Request) and the error code <tt>authorization_pending</tt>.
The deferred response is not a token response: it issues no access
token and confers no access to any protected resource. Instead it
carries a <tt>deferral_code</tt> that the client uses to retrieve the
eventual token response once the deferred request resolves.</t>
        <t>A deferral code is a sender-constrained, AS-issued credential that
represents a single pending authorization request. It is not an OAuth
access token, refresh token, or authorization code, and it confers no
access to any protected resource. Its use is strictly limited to
interacting with the same authorization server regarding the pending
authorization request it represents. See
<xref target="token-endpoint-polling"/>.</t>
        <t>In addition to the <tt>error</tt> parameter, the deferred response includes
the following parameters:</t>
        <dl>
          <dt><tt>deferral_code</tt></dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14>. The deferral code issued by the authorization server.
The deferral code <bcp14>MUST</bcp14> contain at least 128 bits of entropy
(160 bits <bcp14>RECOMMENDED</bcp14>) drawn from a cryptographically secure
random source per <xref section="10.10" sectionFormat="of" target="RFC6749"/>. The deferral
code <bcp14>MUST</bcp14> be opaque to the client and <bcp14>MUST NOT</bcp14> carry meaning
visible to the client.
The client uses this value when polling the token endpoint per
<xref target="token-endpoint-polling"/> and, if a
<tt>deferred_client_notification_endpoint</tt> is registered, the
authorization server includes the same value when it notifies the
client.</t>
          </dd>
          <dt><tt>expires_in</tt></dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14>. The lifetime in seconds of the deferral code. After this
interval, the authorization server <bcp14>MUST</bcp14> reject polling requests
that present this deferral code with the error <tt>expired_token</tt>.
This value governs the lifetime of the deferral code, not the
lifetime of any eventual access token; clients <bcp14>MUST NOT</bcp14> use this
value to schedule access-token refresh.</t>
          </dd>
          <dt><tt>interval</tt></dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14>. The minimum number of seconds the client <bcp14>MUST</bcp14> wait
between polling requests, following the semantics of the <tt>interval</tt>
field defined in <xref section="3.2" sectionFormat="of" target="RFC8628"/>. The <tt>interval</tt> is
carried only in the deferred response; subsequent polling responses
with <tt>authorization_pending</tt> do not repeat it, and the client <bcp14>MUST</bcp14>
retain the value from the deferred response for the lifetime of the
deferral code.</t>
          </dd>
          <dt><tt>error_description</tt></dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. Human-readable text as defined in
<xref section="5.2" sectionFormat="of" target="OAUTH-2.1"/>, subject to the data-minimization rules
of <xref target="progress-information-in-errors"/>.</t>
          </dd>
        </dl>
        <t>Example:</t>
        <artwork><![CDATA[
HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store

{
  "error": "authorization_pending",
  "deferral_code": "8d67dc78-7faa-4d41-aabd-67707b374255",
  "expires_in": 10800,
  "interval": 60
}
]]></artwork>
        <t>The authorization server <bcp14>MUST</bcp14> sender-constrain the deferral code
following the rules of <xref section="5" sectionFormat="comma" target="RFC9449"/> for refresh tokens:
when the initial token request that produced the deferred response
was bound to a DPoP key (or to a TLS client certificate per
<xref target="RFC8705"/>), the deferral code is bound to the same key. Polling
requests presenting this deferral code <bcp14>MUST</bcp14> be authenticated with
the same key (see <xref target="token-endpoint-polling"/>).</t>
        <t>Future profiles of this specification <bcp14>MAY</bcp14> add additional response
parameters alongside the parameters defined here.
Such parameters are out of scope for this document.</t>
      </section>
      <section anchor="token-endpoint-polling">
        <name>Token Endpoint — Polling</name>
        <t>Once the client has a <tt>deferral_code</tt> from the deferred response of
<xref target="token-endpoint-deferred-response"/>, the client polls the token
endpoint until the request resolves.</t>
        <t>The polling request is a token endpoint request that does not derive
from the originating grant; it carries only the <tt>deferral_code</tt> and
this specification's polling grant type.</t>
        <t>The client makes an HTTP POST request to the token endpoint with the
parameters using the <tt>application/x-www-form-urlencoded</tt> format:</t>
        <dl>
          <dt><tt>grant_type</tt></dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14>. Value <bcp14>MUST</bcp14> be <tt>urn:ietf:params:oauth:grant-type:deferred</tt>.</t>
          </dd>
          <dt><tt>deferral_code</tt></dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14>. The <tt>deferral_code</tt> issued in the deferred response.</t>
          </dd>
        </dl>
        <t>The client authenticates to the token endpoint as required by its
registered authentication method per <xref section="2.4" sectionFormat="of" target="OAUTH-2.1"/>.</t>
        <t>The client <bcp14>MUST NOT</bcp14> send polling requests faster than the rate
established by the <tt>interval</tt> parameter of the deferred response. The
client <bcp14>MUST</bcp14> increase the interval in response to a <tt>slow_down</tt> error
(<xref target="token-endpoint-error-responses"/>) by at least 5 seconds.</t>
        <t>The following is a non-normative example:</t>
        <artwork><![CDATA[
POST /token HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

grant_type=urn:ietf:params:oauth:grant-type:deferred
&deferral_code=8d67dc78-7faa-4d41-aabd-67707b374255
]]></artwork>
        <section anchor="polling-request-validation">
          <name>Polling Request Validation</name>
          <t>The authorization server <bcp14>MUST</bcp14> validate the request:</t>
          <ol spacing="normal" type="1"><li>
              <t>Authenticate the client per <xref section="2.4" sectionFormat="of" target="OAUTH-2.1"/>.</t>
            </li>
            <li>
              <t>Verify that the <tt>deferral_code</tt> is recognized and was issued to
the authenticated client. If not, return <tt>invalid_grant</tt>.</t>
            </li>
            <li>
              <t>If the request is still pending, verify that <tt>expires_in</tt> has not
elapsed. If it has, return <tt>expired_token</tt>.</t>
            </li>
            <li>
              <t>Evaluate the resolution state of the deferred request:
              </t>
              <ul spacing="normal">
                <li>
                  <t>If the request has resolved successfully, return the token
response defined in <xref target="successful-polling-response"/>.</t>
                </li>
                <li>
                  <t>If the request has resolved with an error or has been cancelled
per <xref target="cancellation"/>, return <tt>access_denied</tt>.</t>
                </li>
              </ul>
            </li>
            <li>
              <t>Verify that no token response has previously been issued for this
<tt>deferral_code</tt>. If it has, return <tt>invalid_grant</tt>.</t>
            </li>
          </ol>
          <t>If the authorization server encounters any error, it <bcp14>MUST</bcp14> return an
error response per <xref target="token-endpoint-error-responses"/>.</t>
        </section>
        <section anchor="successful-polling-response">
          <name>Successful Polling Response</name>
          <t>When the deferred request has resolved successfully, the authorization
server returns the originating grant's successful token response per
<xref section="5.1" sectionFormat="of" target="OAUTH-2.1"/>.
The response includes an <tt>access_token</tt>, a <tt>token_type</tt>, and any other
fields the originating grant defines (such as <tt>refresh_token</tt> or
<tt>scope</tt>).</t>
          <t>When the originating grant defines an <tt>issued_token_type</tt> in its
successful token response (as Token Exchange does, per
<xref section="2.2.1" sectionFormat="of" target="RFC8693"/>), the successful polling response carries
that originating-grant <tt>issued_token_type</tt> value. The successful polling
response is never a deferred response and <bcp14>MUST NOT</bcp14> carry the
<tt>urn:ietf:params:oauth:token-type:deferral-code</tt> type.</t>
          <t>The <tt>expires_in</tt> field of this response carries the access-token
lifetime per <xref section="5.1" sectionFormat="of" target="OAUTH-2.1"/>; it is not the
deferral-code lifetime conveyed by <tt>expires_in</tt> in the earlier
deferred response.</t>
          <t>A <tt>deferral_code</tt> that has been redeemed for a successful response is
no longer valid; subsequent polling requests with the same
<tt>deferral_code</tt> <bcp14>MUST</bcp14> be rejected with <tt>invalid_grant</tt>.</t>
          <t>The following is a non-normative example:</t>
          <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
  "access_token": "SlAV32hkKG",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "8xLOxBtZp8"
}
]]></artwork>
        </section>
      </section>
      <section anchor="token-endpoint-error-responses">
        <name>Token Endpoint — Error Responses</name>
        <t>If a token-endpoint request defined by this specification — the initial
request of <xref target="token-endpoint-initial-request"/> or the polling request of
<xref target="token-endpoint-polling"/> — is invalid, unauthorized, or pending, the
authorization server returns an error response per
<xref section="5.2" sectionFormat="of" target="OAUTH-2.1"/>.</t>
        <t>The authorization server <bcp14>MUST</bcp14> include the <tt>Cache-Control: no-store</tt>
header field from <xref section="5.2.2.3" sectionFormat="of" target="RFC7234"/> in every error response
defined in this section, including the deferred response of
<xref target="token-endpoint-deferred-response"/> and any <tt>authorization_pending</tt> or
<tt>slow_down</tt> response. This prevents an intermediary or the client from
caching a transient <tt>authorization_pending</tt> response and replaying it,
which could otherwise cause the client to poll indefinitely.</t>
        <t>In addition to the error codes defined in <xref section="5.2" sectionFormat="of" target="OAUTH-2.1"/>,
this specification uses the following error codes, with semantics
aligned with the corresponding codes in <xref section="3.5" sectionFormat="of" target="RFC8628"/>:</t>
        <dl>
          <dt><tt>authorization_pending</tt></dt>
          <dd>
            <t>The request has not yet resolved. On the initial token request, this
is the deferred response of <xref target="token-endpoint-deferred-response"/>, which
establishes the <tt>deferral_code</tt> and carries <tt>expires_in</tt> and
<tt>interval</tt>. On a subsequent polling request, it indicates the deferred
request is still pending; such responses reference the established
<tt>deferral_code</tt> and do not repeat it. In either case the client
<bcp14>SHOULD</bcp14> continue polling at the rate established by <tt>interval</tt>.</t>
          </dd>
          <dt><tt>slow_down</tt></dt>
          <dd>
            <t>The client is polling faster than <tt>interval</tt> allows. The client <bcp14>MUST</bcp14>
increase its polling interval as described in <xref target="token-endpoint-polling"/>.</t>
          </dd>
          <dt><tt>expired_token</tt></dt>
          <dd>
            <t>The <tt>deferral_code</tt> has expired. The client <bcp14>MUST</bcp14> stop polling with
this <tt>deferral_code</tt> and <bcp14>MAY</bcp14> initiate a new flow.</t>
          </dd>
          <dt><tt>access_denied</tt></dt>
          <dd>
            <t>The deferred request was denied — for example, because the
authorization could not be granted, or because the request was
cancelled per <xref target="cancellation"/>.</t>
          </dd>
        </dl>
        <t>The following additional rules apply:</t>
        <ul spacing="normal">
          <li>
            <t>A <tt>deferral_code</tt> that is not recognized, was issued to a
different client, or has already been redeemed <bcp14>MUST</bcp14> result in an
<tt>invalid_grant</tt> error per <xref section="3.2.4" sectionFormat="of" target="OAUTH-2.1"/>. When the
server has confirmed that the deferral code was issued to the authenticated
client, the <tt>error_description</tt> <bcp14>SHOULD</bcp14> distinguish between "already
redeemed" and "unknown identifier" for diagnostic purposes. When the
deferral code is unrecognized or was issued to a different client, the server
<bcp14>MUST</bcp14> treat it as unknown and <bcp14>MUST NOT</bcp14> provide detail that would allow
distinguishing these cases. Clients <bcp14>MUST</bcp14> treat all <tt>invalid_grant</tt>
responses as terminal and <bcp14>MUST NOT</bcp14> retry with the same
<tt>deferral_code</tt>.</t>
          </li>
          <li>
            <t>A token request that omits <tt>deferred</tt> from <tt>completion_mode</tt> after
a <tt>completion_mode=deferred</tt> hint was sent on the originating
grant's preceding-endpoint request <bcp14>MUST</bcp14> result in an
<tt>invalid_request</tt> error per <xref target="pre-token-hints"/>.</t>
          </li>
          <li>
            <t>If a client polls faster than <tt>interval</tt> repeatedly, the authorization
server <bcp14>MAY</bcp14> escalate from <tt>slow_down</tt> to <tt>invalid_request</tt>. A client
receiving <tt>invalid_request</tt> <bcp14>MUST NOT</bcp14> make further requests with the
same <tt>deferral_code</tt>.</t>
          </li>
        </ul>
        <t>The data-minimization rules of <xref target="progress-information-in-errors"/>
apply to the <tt>error_description</tt> field of any error response defined
in this section, including <tt>authorization_pending</tt> responses that
carry progress information.</t>
        <t>The following is a non-normative example:</t>
        <artwork><![CDATA[
HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store

{
  "error": "authorization_pending",
  "error_description":
    "The deferred request is still being processed."
}
]]></artwork>
      </section>
    </section>
    <section anchor="callback-notification">
      <name>Callback Notification</name>
      <t>A client that does not wish to poll for the result of a deferred
request <bcp14>MAY</bcp14> register a <tt>deferred_client_notification_endpoint</tt>
(<xref target="client-registration-metadata"/>) at which it accepts callback
notifications from the authorization server.
When the deferred request resolves — successfully, with an error, or by
cancellation — the authorization server sends a callback notification
to that endpoint.</t>
      <t>A callback notification does not itself convey the token response or
any credential. It indicates that polling the token endpoint with the
<tt>deferral_code</tt> will now yield a final response.</t>
      <t>An authorization server <bcp14>MUST NOT</bcp14> initiate a callback notification
before the HTTP response carrying the deferred response that
introduced the <tt>deferral_code</tt> has been written to the network.
Authorization servers <bcp14>SHOULD</bcp14> additionally delay callbacks for a small
implementation-defined period after that point so that the client can
record the <tt>deferral_code</tt> before receiving notice of its
resolution.
The authorization server <bcp14>MUST NOT</bcp14> send a callback notification for a
<tt>deferral_code</tt> that has already expired; the client is informed of
expiration via the <tt>expires_in</tt> value in the deferred response.</t>
      <section anchor="the-callback-request">
        <name>The Callback Request</name>
        <t>The callback is an HTTP POST to the registered
<tt>deferred_client_notification_endpoint</tt> with the following parameter
encoded in <tt>application/json</tt>:</t>
        <dl>
          <dt><tt>deferral_code</tt></dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14>. The <tt>deferral_code</tt> of the deferred request that has
resolved.</t>
          </dd>
        </dl>
        <t>If the client supplied a <tt>client_notification_token</tt> on the initial
token request that produced this deferral code, the authorization
server <bcp14>MUST</bcp14> authenticate the callback request by including the
<tt>client_notification_token</tt> as a Bearer credential in the
<tt>Authorization</tt> header per <xref section="2.1" sectionFormat="of" target="RFC6750"/>. The client
<bcp14>MUST</bcp14> validate that the bearer credential equals the
<tt>client_notification_token</tt> it supplied; on mismatch, the client
<bcp14>MUST</bcp14> respond with HTTP 401 Unauthorized.</t>
        <t>If the client did not supply a <tt>client_notification_token</tt>, the
authorization server <bcp14>MUST</bcp14> omit the <tt>Authorization</tt> header. In that
case the client <bcp14>MUST</bcp14> protect the callback endpoint by some other
means — for example, mutual TLS or network-position assumptions —
and <bcp14>SHOULD</bcp14> treat the callback as advisory until it has confirmed
resolution by polling the token endpoint with the deferral code.</t>
        <t>The following is a non-normative example with <tt>client_notification_token</tt>:</t>
        <artwork><![CDATA[
POST /cb HTTP/1.1
Host: client.example.com
Authorization: Bearer f4oirNBUlM
Content-Type: application/json

{
  "deferral_code": "8d67dc78-7faa-4d41-aabd-67707b374255"
}
]]></artwork>
        <t>For valid requests, the client <bcp14>MUST</bcp14> respond with HTTP 204 No Content.
The client <bcp14>MUST NOT</bcp14> respond with an HTTP 3xx status code; the
authorization server <bcp14>MUST NOT</bcp14> follow redirects.</t>
        <t>Handling of HTTP error codes in the 4xx and 5xx ranges by the
authorization server is out of scope for this specification.</t>
        <t>Clients receiving a callback notification <bcp14>MUST</bcp14> ignore unrecognized
parameters in the callback body.</t>
      </section>
      <section anchor="client-registration-metadata">
        <name>Client Registration Metadata</name>
        <t>The following Client Metadata parameter is defined by this specification
to be used during Client Registration as defined in <xref target="RFC7591"/>:</t>
        <dl>
          <dt><tt>deferred_client_notification_endpoint</tt></dt>
          <dd>
            <t><bcp14>OPTIONAL</bcp14>. URL to which the authorization server sends a notification
when a deferred authorization request resolves. If supplied, it <bcp14>MUST</bcp14>
be an HTTPS URL. A client that does not register this endpoint
retrieves the final token response by polling the token endpoint.</t>
          </dd>
        </dl>
      </section>
    </section>
    <section anchor="cancellation">
      <name>Cancellation</name>
      <t>A client <bcp14>MAY</bcp14> cancel a pending deferred request to release authorization
server resources or because the underlying user intent no longer
applies. Cancellation is performed by revoking the deferral code at
the authorization server's revocation endpoint per <xref target="RFC7009"/>.</t>
      <section anchor="revocation-request">
        <name>Revocation Request</name>
        <t>The client makes an HTTP POST request to the revocation endpoint per
<xref section="2.1" sectionFormat="of" target="RFC7009"/>, with the following parameters using the
<tt>application/x-www-form-urlencoded</tt> format:</t>
        <dl>
          <dt><tt>token</tt></dt>
          <dd>
            <t><bcp14>REQUIRED</bcp14>. The deferral code to cancel, exactly as received in the
<tt>deferral_code</tt> field of the deferred response.</t>
          </dd>
          <dt><tt>token_type_hint</tt></dt>
          <dd>
            <t><bcp14>RECOMMENDED</bcp14>. Value
<tt>urn:ietf:params:oauth:token-type:deferral-code</tt>.</t>
          </dd>
        </dl>
        <t>The client authenticates to the revocation endpoint as required by its
registered authentication method per <xref section="2.4" sectionFormat="of" target="OAUTH-2.1"/>.</t>
        <t>The following is a non-normative example:</t>
        <artwork><![CDATA[
POST /revoke HTTP/1.1
Host: server.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW

token=8d67dc78-7faa-4d41-aabd-67707b374255
&token_type_hint=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Adeferral-code
]]></artwork>
      </section>
      <section anchor="revocation-semantics-for-deferral-codes">
        <name>Revocation Semantics for Deferral Codes</name>
        <t>Authorization servers <bcp14>MUST</bcp14> extend the revocation endpoint to accept
deferral codes, with the following semantics:</t>
        <ol spacing="normal" type="1"><li>
            <t>If the deferral code is recognized and was issued to the
authenticated client, the authorization server <bcp14>MUST</bcp14> atomically
transition the pending request to a cancelled state, <bcp14>MUST</bcp14> suppress
any pending callback notification for the deferral code where
delivery has not yet been initiated, and <bcp14>MUST</bcp14> cause subsequent
polling requests against the deferral code to return
<tt>access_denied</tt> per <xref target="token-endpoint-error-responses"/>.</t>
          </li>
          <li>
            <t>If the deferral code is unrecognized, was issued to a different
authenticated client, or has already been redeemed, cancelled, or
expired — the authorization server <bcp14>MUST</bcp14> return HTTP 200 OK without
modifying state. Invalid tokens do not cause an error response, per
<xref section="2.2" sectionFormat="of" target="RFC7009"/>.</t>
          </li>
          <li>
            <t>If the deferred request has already resolved successfully and the
resulting access token has been delivered to the client, the
authorization server <bcp14>MUST NOT</bcp14> revoke that access token as a side
effect of revoking the deferral code. The two are independent
credentials with independent lifetimes; clients that need to
revoke an issued access token <bcp14>MUST</bcp14> do so explicitly per
<xref target="RFC7009"/>.</t>
          </li>
          <li>
            <t>If the deferred request has resolved successfully but the access
token has not yet been delivered to the client (for example, a
resolution committed between the last poll and the cancellation),
the authorization server <bcp14>MUST</bcp14> treat the deferral code as
redeemed-and-then-cancelled: it <bcp14>MUST NOT</bcp14> issue the access token on
any subsequent polling request and <bcp14>MUST</bcp14> return <tt>access_denied</tt> instead.</t>
          </li>
        </ol>
        <t>The revocation response is governed by <xref section="2.2" sectionFormat="of" target="RFC7009"/>.</t>
        <t>After a successful cancellation, the authorization server <bcp14>MAY</bcp14> retain
the deferral code's identifier for the remainder of <tt>expires_in</tt> to
ensure that subsequent polling requests reliably return
<tt>access_denied</tt> rather than <tt>invalid_grant</tt>. Disposal of any data
collected during the deferred request is out of scope for this
specification.</t>
        <t>To avoid leaking the validity of deferral code identifiers through
response timing, authorization servers <bcp14>SHOULD</bcp14> process revocation
requests in approximately constant time regardless of whether the
supplied <tt>token</tt> value is recognized. This complements the
indistinguishability of the response codes required by clauses 1 and
2 above.</t>
      </section>
      <section anchor="idempotency-and-retry">
        <name>Idempotency and Retry</name>
        <t>Per <xref section="2.2" sectionFormat="of" target="RFC7009"/>, the revocation endpoint is
idempotent. Clients <bcp14>MAY</bcp14> retry revocation requests on transport
failures without risking adverse effects.</t>
      </section>
      <section anchor="cancellation-discovery">
        <name>Discovery</name>
        <t>To allow clients to determine whether the revocation endpoint accepts
deferral codes, this specification registers the authorization server
metadata parameter <tt>revocation_endpoint_token_type_values_supported</tt>
in <xref target="iana-considerations"/>. An authorization server that supports this
specification <bcp14>MUST</bcp14> list
<tt>urn:ietf:params:oauth:token-type:deferral-code</tt> in this array.</t>
        <t>Clients <bcp14>SHOULD</bcp14> check that
<tt>urn:ietf:params:oauth:token-type:deferral-code</tt> is present in
<tt>revocation_endpoint_token_type_values_supported</tt> before relying on
cancellation. An authorization server that does not advertise support
will return HTTP 200 OK for any revocation request per
<xref section="2.2" sectionFormat="of" target="RFC7009"/>, which is indistinguishable from a
successful cancellation. Clients that skip this check risk silently
failing to cancel a pending deferred request.</t>
      </section>
    </section>
    <section anchor="implementation-considerations">
      <name>Implementation Considerations</name>
      <section anchor="polling-and-callback-together">
        <name>Polling and Callback Together</name>
        <t>A client that has registered a <tt>deferred_client_notification_endpoint</tt>
          <bcp14>SHOULD</bcp14> continue to poll the token endpoint at the rate established by
<tt>interval</tt>, rather than rely solely on the callback.
Polling provides resilience against lost or delayed callbacks and
limits the impact of a compromised callback endpoint that suppresses
inbound notifications.</t>
        <t>A client awaiting a deferred request whose <tt>expires_in</tt> is close to
elapsing <bcp14>MAY</bcp14> send a final polling request slightly before the
expiration, to mitigate the risk of a resolution that occurs too late
to fall within the normal polling schedule.</t>
        <t>This specification does not define a way to deliver the final token
response directly via the callback. Long-running, high-value flows
warrant the durability of polling: a single lost push request would
otherwise lose the outcome of the entire deferred request.</t>
      </section>
      <section anchor="obtaining-an-immediate-result-alongside-a-deferred-request">
        <name>Obtaining an Immediate Result Alongside a Deferred Request</name>
        <t>A deferred request may take an arbitrarily long time to resolve. A client
that also requires an immediate result — for example, a basic access token
or an ID token to render initial user experience — can obtain one by
starting a separate, non-deferred grant in parallel, while it continues to
poll the deferred request for the final result.</t>
        <t>How the client obtains the immediate result depends on the originating
grant:</t>
        <ul spacing="normal">
          <li>
            <t>For the Authorization Code Grant, the client can perform a parallel
OpenID Connect authentication with <tt>prompt=none</tt> to obtain an ID token
(and, where applicable, an access token) without further user
interaction.</t>
          </li>
          <li>
            <t>For the Client Credentials Grant or <xref target="ID-JAG"/>, the client can send an
additional token request that omits the <tt>completion_mode</tt> parameter
entirely, which the authorization server completes synchronously per the
originating grant's rules.</t>
          </li>
        </ul>
        <t>The immediate result and the deferred result are independent: the immediate
result reflects what the authorization server can issue synchronously, while
the deferred request continues toward the final, possibly higher-assurance,
token response. This lets a client proceed with available work immediately
rather than blocking on the deferred outcome.</t>
      </section>
      <section anchor="progress-information-in-errors">
        <name>Progress Information in Errors</name>
        <t>When responding to a polling request with <tt>authorization_pending</tt>, the
authorization server <bcp14>SHOULD</bcp14> include progress information in the
<tt>error_description</tt> field where appropriate.
Examples include the current step in a multi-step process, the queue
position of the deferred request, or an estimate of remaining
processing time.</t>
        <t>Authorization servers <bcp14>MUST NOT</bcp14> include personal data, document
identifiers, or any data subject to data-minimization obligations in
the <tt>error_description</tt> field. Progress information <bcp14>SHOULD</bcp14> be
expressed as opaque step identifiers (for example,
<tt>step=document_review</tt>) rather than free-form descriptions of user
content.</t>
        <t>The client <bcp14>MAY</bcp14> surface this information to a human operator if
appropriate. Progress information is informational and the client <bcp14>MUST
NOT</bcp14> depend on its presence or format.</t>
      </section>
      <section anchor="delegation-to-external-services">
        <name>Delegation to External Services</name>
        <t>An authorization server may rely on one or more external services to
resolve a deferred request — for example, an identity verification
vendor, a fraud analysis system, a human review queue, or an enterprise
governance platform. This specification does not define or constrain the trust relationship between the authorization
server and any such service. From the client's
perspective the authorization server remains the sole counterparty: the
client has no direct relationship with, and need not be aware of, any
external service involved in resolving the deferred request.</t>
      </section>
    </section>
    <section anchor="relationship-to-other-specifications">
      <name>Relationship to Other Specifications</name>
      <t>This section is informative.</t>
      <section anchor="relationship-to-ciba">
        <name>Relationship to CIBA</name>
        <t>This specification overlaps in mechanism with OpenID Connect
Client-Initiated Backchannel Authentication (CIBA) <xref target="CIBA"/>: both
issue an opaque identifier (CIBA's <tt>auth_req_id</tt>, this
specification's deferral code), both define a polling mode governed
by an <tt>interval</tt> parameter, and both define a callback notification
that signals the client to retrieve the result. The differences are
intentional.</t>
        <t>Initiation model. CIBA is initiated by the client. DTR is not initiated
by a client at all: an existing grant is initiated by its normal means and the
authorization server elects to defer the resulting token response.
CIBA cannot express deferral of a Client Credentials Grant or a
Token Exchange (<xref target="RFC8693"/>) request, because CIBA's initiation
inherently requires an end-user; this specification can, because
deferral is decided at the token endpoint without regard to the
originating grant's initiation pattern.</t>
        <t>User model. CIBA is a user authentication specification. CIBA
requires the client to identify the user that must be contacted,
using parameters such as <tt>login_hint</tt> or <tt>id_token_hint</tt>. CIBA
cannot express situations where the authorization server wishes
to choose the user or system to contact dynamically.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This specification builds on the security model of OAuth 2.1
(<xref section="7" sectionFormat="of" target="OAUTH-2.1"/>) and the OAuth Security Best Current
Practice (<xref target="RFC9700"/>). The considerations in those documents apply.
The following considerations are specific to this specification.</t>
      <section anchor="sender-constraint-requirements">
        <name>Sender-Constraint Requirements</name>
        <t>Deferral codes have lifetimes that may extend for hours or days. Over
that window, possession alone confers the right to retrieve the
eventual access token. To prevent the substitution attacks this
implies, deferral codes are sender-constrained.</t>
        <t>A client that is a public client per <xref section="2.1" sectionFormat="of" target="OAUTH-2.1"/>, or
that is using an originating grant whose security profile mandates
DPoP (for example, a profile that adopts <xref target="RFC9449"/> as a
requirement), <bcp14>MUST</bcp14> present a DPoP proof on the initial token request
that yields a deferred response. A confidential client using a strong
client authentication method — for example, mutual TLS per
<xref target="RFC8705"/> or <tt>private_key_jwt</tt> — <bcp14>MAY</bcp14> omit DPoP. A confidential
client using a weaker client authentication method (<tt>client_secret_basic</tt>
or <tt>client_secret_post</tt>) <bcp14>SHOULD</bcp14> bind the deferral code with DPoP.</t>
        <t>When DPoP is presented on the initial token request, the
authorization server <bcp14>MUST</bcp14> persist the JWK Thumbprint
(<xref section="6.1" sectionFormat="of" target="RFC9449"/>) of the proof key. Every subsequent
polling request and revocation request that presents the resulting
deferral code <bcp14>MUST</bcp14> carry a DPoP proof signed by the same key. The
authorization server <bcp14>MUST</bcp14> reject any request whose proof does not
chain to the persisted thumbprint with the error <tt>invalid_dpop_proof</tt>
(<xref section="7" sectionFormat="of" target="RFC9449"/>).</t>
        <t>When the deferred request resolves and an access token is issued in
response to a polling request, the issued access token <bcp14>MUST</bcp14> be
DPoP-bound to the same key, consistent with <xref section="5" sectionFormat="of" target="RFC9449"/>.
A confidential client that did not bind the deferral code with DPoP
likewise inherits its originating grant's access-token binding rules
unchanged.</t>
        <t>The callback notification path is not authenticated by DPoP; the
post-callback polling request is the moment of redemption and is
covered by the rules above.</t>
      </section>
      <section anchor="replay-and-theft-of-deferral-codes">
        <name>Replay and Theft of Deferral Codes</name>
        <t>A deferral code is sender-constrained per
<xref target="sender-constraint-requirements"/>, inheriting the binding rules of
<xref section="5" sectionFormat="of" target="RFC9449"/> for refresh tokens. Its threat profile is the
same as a refresh token of equivalent lifetime; the considerations of
<xref target="RFC9449"/> apply unchanged.</t>
        <t>The originating grant's credentials — for example, the authorization
<tt>code</tt> returned to a client that requested <tt>response_type=code</tt> — are
unaffected by DTR and remain subject to the same protections as in
the non-deferred case (<xref section="4.1.3" sectionFormat="of" target="OAUTH-2.1"/>,
<xref section="2.1.1" sectionFormat="of" target="RFC9700"/>).</t>
      </section>
      <section anchor="polling-interval-denial-of-service">
        <name>Polling-Interval Denial of Service</name>
        <t>Misbehaving or compromised clients may poll faster than the announced
<tt>interval</tt>, consuming authorization server resources.
Authorization servers <bcp14>SHOULD</bcp14> respond to faster-than-<tt>interval</tt> polling
with <tt>slow_down</tt> initially and <bcp14>MAY</bcp14> escalate to <tt>invalid_request</tt> for
clients that persist; a client receiving <tt>invalid_request</tt> <bcp14>MUST</bcp14> stop
polling for the affected <tt>deferral_code</tt>.
Authorization servers <bcp14>MAY</bcp14> also impose per-client and per-flow rate
limits independent of the announced <tt>interval</tt>.</t>
      </section>
      <section anchor="callback-endpoint-validation">
        <name>Callback Endpoint Validation</name>
        <t>The <tt>deferred_client_notification_endpoint</tt> registered by a client is
an inbound surface from the authorization server. Authorization
servers <bcp14>MUST</bcp14> require that the registered URI is an HTTPS URL.</t>
        <t>When the client supplies a <tt>client_notification_token</tt> on the initial
token request, the bearer credential presented in the callback's
<tt>Authorization</tt> header authenticates the authorization server to the
client (see <xref target="the-callback-request"/>). Even so, the callback carries
no authorization grant: clients <bcp14>MUST</bcp14> retrieve the resolution by
polling the token endpoint with the deferral code after a callback,
not solely on the basis of having received the callback. Treating the
callback alone as authoritative would allow a denial-of-service
attacker who can cause callbacks to skip polling and miss the actual
authorization decision.</t>
        <t>A client that does not supply a <tt>client_notification_token</tt> cannot
authenticate inbound callbacks at the application layer. Such a
client <bcp14>MUST</bcp14> protect the callback endpoint by other means (mutual TLS,
network-position assumptions, or a private network) and <bcp14>MUST</bcp14> treat
any callback as advisory.</t>
      </section>
      <section anchor="callback-endpoint-ssrf-and-confused-deputy-protections">
        <name>Callback Endpoint SSRF and Confused-Deputy Protections</name>
        <t>The authorization server, on every callback, makes an outbound HTTP
request to a client-controlled URL. Without further protections this
would be a server-side request forgery (SSRF) surface: an attacker
who can register a <tt>deferred_client_notification_endpoint</tt> could
coerce the authorization server into probing internal infrastructure.
The protections below are analogous to the redirect-URI hardening of
<xref section="4.1" sectionFormat="of" target="RFC9700"/> and to common SSRF mitigations from
deployed CIBA (<xref target="CIBA"/>) implementations.</t>
        <t>At registration time, the authorization server <bcp14>SHOULD</bcp14> reject a
<tt>deferred_client_notification_endpoint</tt> whose hostname resolves to a
private (RFC 6890), loopback, link-local, or unspecified address.
Development and test deployments where such addresses are intentional
are an explicit exception; production deployments <bcp14>SHOULD</bcp14> enforce the
restriction.</t>
        <t>At delivery time, the authorization server <bcp14>SHOULD</bcp14> re-resolve the
hostname and verify that all returned addresses are public (subject
to the same exception). To defeat DNS rebinding, the authorization
server <bcp14>SHOULD</bcp14> pin the resolved address for the lifetime of the
callback connection rather than rely on the resolver's cached entry.</t>
        <t>The authorization server <bcp14>SHOULD</bcp14> set a finite connect and read
timeout on the callback request and <bcp14>SHOULD</bcp14> cap the maximum response
body size it is willing to read. The specification already requires
the authorization server to ignore any HTTP response body
(<xref target="the-callback-request"/>); the size cap exists to bound resource
consumption from a misbehaving or malicious endpoint.</t>
        <t>The authorization server <bcp14>MUST NOT</bcp14> include the <tt>deferral_code</tt>, the
<tt>client_notification_token</tt>, or any other token material in the
callback URL path or query string. The <tt>deferral_code</tt> is conveyed
in the JSON request body and the <tt>client_notification_token</tt>, if
present, is conveyed in the <tt>Authorization</tt> header per
<xref target="the-callback-request"/>; placing either in the URL would expose the
value to web-server access logs, intermediary proxies, and Referer
headers on any subsequent request the client emits.</t>
      </section>
      <section anchor="client-notification-token-handling">
        <name>Client Notification Token Handling</name>
        <t>A <tt>client_notification_token</tt> is a long-lived shared secret between
the client and the authorization server: it persists from the initial
token request until the deferral code expires or is revoked, which
may be hours or days. Both parties <bcp14>MUST</bcp14> treat it with the storage and
disposal care appropriate to a refresh token of equivalent lifetime
(<xref section="6" sectionFormat="of" target="RFC9700"/>). Authorization servers <bcp14>MUST</bcp14> dispose of the
token when the deferral code resolves, expires, or is revoked.
Clients <bcp14>MUST NOT</bcp14> log the token or expose it through error messages.</t>
        <t>A <tt>client_notification_token</tt> is bound to a single deferral code.
Clients <bcp14>MUST</bcp14> generate a fresh token for each initial token request
that opts into DTR; reuse across requests collapses the per-request
binding and weakens the protection that the token provides.</t>
      </section>
      <section anchor="consent-staleness-at-resolution">
        <name>Consent Staleness at Resolution</name>
        <t>Deferral codes are designed to allow <tt>expires_in</tt> values measured in
hours or days. Across that window the resource owner's consent at the
moment of the originating grant may diverge from their state at the
moment of resolution: the owner may have changed credentials, revoked
the client, had their account suspended, or otherwise altered the
preconditions that justified the grant.</t>
        <t>Before issuing a token in response to a successful polling request,
the authorization server <bcp14>MUST</bcp14> re-evaluate that the resource owner's
consent and the client's authorization remain valid. If consent has
been revoked, the client has been disabled, the resource owner's
session has been terminated, or any precondition of the originating
grant no longer holds, the authorization server <bcp14>MUST</bcp14> return
<tt>access_denied</tt> per <xref target="token-endpoint-error-responses"/> and <bcp14>MUST NOT</bcp14>
issue an access token. This is the deferred-grant analogue of
<xref section="4.6" sectionFormat="of" target="RFC9700"/>.</t>
      </section>
      <section anchor="logging-and-disposal-of-deferral-codes">
        <name>Logging and Disposal of Deferral Codes</name>
        <t>A deferral code is a bearer-equivalent credential for the duration
of <tt>expires_in</tt>. Authorization servers and clients <bcp14>MUST NOT</bcp14> log
deferral code values in plaintext beyond the code's lifetime, and
<bcp14>SHOULD</bcp14> treat them as secrets equivalent to refresh tokens with
respect to log redaction, transport security, and at-rest storage.
Standard web-server access logs that capture POST bodies retain
deferral code values for the entire log retention window;
implementations <bcp14>SHOULD</bcp14> configure their logging stacks to redact the
<tt>deferral_code</tt> parameter wherever it appears — both as the polling
request parameter and as the response field of deferred responses (see
<xref target="token-endpoint-deferred-response"/>).</t>
      </section>
    </section>
    <section anchor="privacy-considerations">
      <name>Privacy Considerations</name>
      <section anchor="linkability-across-polling">
        <name>Linkability Across Polling</name>
        <t>Each polling request from a client to the token endpoint is identifiable
to the authorization server via the client's authenticated identity and
the <tt>deferral_code</tt>.
For long-running deferred requests, the polling pattern itself
(timing, network origin, user-agent of the client) may be observable to
network intermediaries, even though the <tt>deferral_code</tt> is sent over
TLS.
Clients <bcp14>SHOULD</bcp14> avoid embedding distinguishing information in
client-controlled fields that travel with polling requests.</t>
      </section>
      <section anchor="retention-of-deferralcode">
        <name>Retention of <tt>deferral_code</tt></name>
        <t>Authorization servers retain <tt>deferral_code</tt> values, and any
associated context required to complete the deferred request, for the
lifetime indicated by <tt>expires_in</tt>.
Authorization servers <bcp14>SHOULD</bcp14> retain only the data necessary to complete
the request and to satisfy the cancellation and audit requirements of
this specification, and <bcp14>SHOULD</bcp14> dispose of <tt>deferral_code</tt> values and
their associated state once the request has resolved or expired.
Disposal of any data collected during the deferred request itself is
out of scope.</t>
      </section>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This section requests registrations in IANA registries as listed below.
Final values for <tt>Reference</tt> are this RFC once published.</t>
      <section anchor="oauth-parameters-registration">
        <name>OAuth Parameters Registration</name>
        <t>This specification requests registration of the following parameter in
the IANA "OAuth Parameters" registry:</t>
        <ul spacing="normal">
          <li>
            <t>Parameter name: <tt>completion_mode</tt></t>
          </li>
          <li>
            <t>Parameter usage location: authorization request, token request</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
        </ul>
        <t>The value of <tt>completion_mode</tt> is a space-separated list of values
registered in the "OAuth Completion Mode Values" registry defined below.</t>
      </section>
      <section anchor="oauth-completion-mode-values-registry">
        <name>OAuth Completion Mode Values Registry</name>
        <t>This specification requests the creation of a new IANA registry titled
"OAuth Completion Mode Values" to hold the values that may appear in the
space-separated <tt>completion_mode</tt> request parameter.</t>
        <t>The registry follows the "Specification Required" registration policy
<xref target="RFC8126"/>. Each registration comprises:</t>
        <ul spacing="normal">
          <li>
            <t>Value: the completion-mode value (a single token containing no spaces).</t>
          </li>
          <li>
            <t>Description: a brief description of the value's meaning.</t>
          </li>
          <li>
            <t>Change Controller: for values registered by the IETF, "IETF";
otherwise the registering party.</t>
          </li>
          <li>
            <t>Specification Document(s): a reference to the document defining the
value.</t>
          </li>
        </ul>
        <t>This specification registers the following initial value:</t>
        <ul spacing="normal">
          <li>
            <t>Value: <tt>deferred</tt></t>
          </li>
          <li>
            <t>Description: The client accepts a deferred response
(<xref target="token-endpoint-deferred-response"/>) in place of an immediate token
response or error.</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
        </ul>
      </section>
      <section anchor="oauth-dynamic-client-registration-metadata-registration">
        <name>OAuth Dynamic Client Registration Metadata Registration</name>
        <t>This specification requests registration of the following client metadata
definition in the IANA "OAuth Dynamic Client Registration Metadata"
registry <xref target="RFC7591"/>:</t>
        <ul spacing="normal">
          <li>
            <t>Client Metadata Name: <tt>deferred_client_notification_endpoint</tt></t>
          </li>
          <li>
            <t>Client Metadata Description: HTTPS URL to which the authorization
server sends a notification when a deferred authorization request
resolves.</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
        </ul>
      </section>
      <section anchor="oauth-grant-type-registry">
        <name>OAuth Grant Type Registry</name>
        <t>This specification requests registration of the following grant type
in the IANA "OAuth Grant Type" registry, used as the value of the
<tt>grant_type</tt> parameter on polling token endpoint requests
(<xref target="token-endpoint-polling"/>):</t>
        <ul spacing="normal">
          <li>
            <t>Name: <tt>urn:ietf:params:oauth:grant-type:deferred</tt></t>
          </li>
          <li>
            <t>Description: Polling grant type used to retrieve the eventual token
response for a deferred authorization request, identified by a
deferral code issued in a deferred response per
<xref target="token-endpoint-deferred-response"/>.</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
        </ul>
      </section>
      <section anchor="oauth-authorization-server-metadata-registry">
        <name>OAuth Authorization Server Metadata Registry</name>
        <t>This specification requests registration of the following metadata
parameters in the IANA "OAuth Authorization Server Metadata" registry
defined in <xref target="RFC8414"/>:</t>
        <ul spacing="normal">
          <li>
            <t>Metadata Name: <tt>deferred_token_response_supported</tt></t>
          </li>
          <li>
            <t>Metadata Description: Boolean. If <tt>true</tt>, the authorization server
supports the deferred token response defined in this specification.</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
          <li>
            <t>Metadata Name: <tt>revocation_endpoint_token_type_values_supported</tt></t>
          </li>
          <li>
            <t>Metadata Description: JSON array of token type URIs accepted by the
authorization server's revocation endpoint
(<tt>revocation_endpoint</tt>) as values of the <tt>token_type_hint</tt>
parameter.</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
        </ul>
      </section>
      <section anchor="oauth-uri-registration">
        <name>OAuth URI Registration</name>
        <t>This specification requests registration of the following URIs in the
IANA "OAuth URI" registry:</t>
        <ul spacing="normal">
          <li>
            <t>URI: <tt>urn:ietf:params:oauth:token-type:deferral-code</tt></t>
          </li>
          <li>
            <t>Common Name: Deferral Code</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
          <li>
            <t>URI: <tt>urn:ietf:params:oauth:grant-type:deferred</tt></t>
          </li>
          <li>
            <t>Common Name: Deferred Token Response Polling Grant</t>
          </li>
          <li>
            <t>Change Controller: IETF</t>
          </li>
          <li>
            <t>Specification Document(s): this specification</t>
          </li>
        </ul>
      </section>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC7009">
          <front>
            <title>OAuth 2.0 Token Revocation</title>
            <author fullname="T. Lodderstedt" initials="T." role="editor" surname="Lodderstedt"/>
            <author fullname="S. Dronia" initials="S." surname="Dronia"/>
            <author fullname="M. Scurtescu" initials="M." surname="Scurtescu"/>
            <date month="August" year="2013"/>
            <abstract>
              <t>This document proposes an additional endpoint for OAuth authorization servers, which allows clients to notify the authorization server that a previously obtained refresh or access token is no longer needed. This allows the authorization server to clean up security credentials. A revocation request will invalidate the actual token and, if applicable, other tokens based on the same authorization grant.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7009"/>
          <seriesInfo name="DOI" value="10.17487/RFC7009"/>
        </reference>
        <reference anchor="RFC7234">
          <front>
            <title>Hypertext Transfer Protocol (HTTP/1.1): Caching</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <date month="June" year="2014"/>
            <abstract>
              <t>The Hypertext Transfer Protocol (HTTP) is a stateless \%application- level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7234"/>
          <seriesInfo name="DOI" value="10.17487/RFC7234"/>
        </reference>
        <reference anchor="RFC7591">
          <front>
            <title>OAuth 2.0 Dynamic Client Registration Protocol</title>
            <author fullname="J. Richer" initials="J." role="editor" surname="Richer"/>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="M. Machulak" initials="M." surname="Machulak"/>
            <author fullname="P. Hunt" initials="P." surname="Hunt"/>
            <date month="July" year="2015"/>
            <abstract>
              <t>This specification defines mechanisms for dynamically registering OAuth 2.0 clients with authorization servers. Registration requests send a set of desired client metadata values to the authorization server. The resulting registration responses return a client identifier to use at the authorization server and the client metadata values registered for the client. The client can then use this registration information to communicate with the authorization server using the OAuth 2.0 protocol. This specification also defines a set of common client metadata fields and values for clients to use during registration.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7591"/>
          <seriesInfo name="DOI" value="10.17487/RFC7591"/>
        </reference>
        <reference anchor="RFC8126">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author fullname="M. Cotton" initials="M." surname="Cotton"/>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <author fullname="T. Narten" initials="T." surname="Narten"/>
            <date month="June" year="2017"/>
            <abstract>
              <t>Many protocols make use of points of extensibility that use constants to identify various protocol parameters. To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper. For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t>
              <t>To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed. This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t>
              <t>This is the third edition of this document; it obsoletes RFC 5226.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8414">
          <front>
            <title>OAuth 2.0 Authorization Server Metadata</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <date month="June" year="2018"/>
            <abstract>
              <t>This specification defines a metadata format that an OAuth 2.0 client can use to obtain the information needed to interact with an OAuth 2.0 authorization server, including its endpoint locations and authorization server capabilities.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8414"/>
          <seriesInfo name="DOI" value="10.17487/RFC8414"/>
        </reference>
        <reference anchor="RFC8693">
          <front>
            <title>OAuth 2.0 Token Exchange</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="A. Nadalin" initials="A." surname="Nadalin"/>
            <author fullname="B. Campbell" initials="B." role="editor" surname="Campbell"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="C. Mortimore" initials="C." surname="Mortimore"/>
            <date month="January" year="2020"/>
            <abstract>
              <t>This specification defines a protocol for an HTTP- and JSON-based Security Token Service (STS) by defining how to request and obtain security tokens from OAuth 2.0 authorization servers, including security tokens employing impersonation and delegation.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8693"/>
          <seriesInfo name="DOI" value="10.17487/RFC8693"/>
        </reference>
        <reference anchor="RFC9449">
          <front>
            <title>OAuth 2.0 Demonstrating Proof of Possession (DPoP)</title>
            <author fullname="D. Fett" initials="D." surname="Fett"/>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="T. Lodderstedt" initials="T." surname="Lodderstedt"/>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="D. Waite" initials="D." surname="Waite"/>
            <date month="September" year="2023"/>
            <abstract>
              <t>This document describes a mechanism for sender-constraining OAuth 2.0 tokens via a proof-of-possession mechanism on the application level. This mechanism allows for the detection of replay attacks with access and refresh tokens.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9449"/>
          <seriesInfo name="DOI" value="10.17487/RFC9449"/>
        </reference>
        <reference anchor="RFC9700">
          <front>
            <title>Best Current Practice for OAuth 2.0 Security</title>
            <author fullname="T. Lodderstedt" initials="T." surname="Lodderstedt"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="A. Labunets" initials="A." surname="Labunets"/>
            <author fullname="D. Fett" initials="D." surname="Fett"/>
            <date month="January" year="2025"/>
            <abstract>
              <t>This document describes best current security practice for OAuth 2.0. It updates and extends the threat model and security advice given in RFCs 6749, 6750, and 6819 to incorporate practical experiences gathered since OAuth 2.0 was published and covers new threats relevant due to the broader application of OAuth 2.0. Further, it deprecates some modes of operation that are deemed less secure or even insecure.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="240"/>
          <seriesInfo name="RFC" value="9700"/>
          <seriesInfo name="DOI" value="10.17487/RFC9700"/>
        </reference>
        <reference anchor="RFC6750">
          <front>
            <title>The OAuth 2.0 Authorization Framework: Bearer Token Usage</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="D. Hardt" initials="D." surname="Hardt"/>
            <date month="October" year="2012"/>
            <abstract>
              <t>This specification describes how to use bearer tokens in HTTP requests to access OAuth 2.0 protected resources. Any party in possession of a bearer token (a "bearer") can use it to get access to the associated resources (without demonstrating possession of a cryptographic key). To prevent misuse, bearer tokens need to be protected from disclosure in storage and in transport. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6750"/>
          <seriesInfo name="DOI" value="10.17487/RFC6750"/>
        </reference>
        <reference anchor="RFC8628">
          <front>
            <title>OAuth 2.0 Device Authorization Grant</title>
            <author fullname="W. Denniss" initials="W." surname="Denniss"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
            <date month="August" year="2019"/>
            <abstract>
              <t>The OAuth 2.0 device authorization grant is designed for Internet- connected devices that either lack a browser to perform a user-agent- based authorization or are input constrained to the extent that requiring the user to input text in order to authenticate during the authorization flow is impractical. It enables OAuth clients on such devices (like smart TVs, media consoles, digital picture frames, and printers) to obtain user authorization to access protected resources by using a user agent on a separate device.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8628"/>
          <seriesInfo name="DOI" value="10.17487/RFC8628"/>
        </reference>
        <reference anchor="RFC8705">
          <front>
            <title>OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens</title>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <author fullname="T. Lodderstedt" initials="T." surname="Lodderstedt"/>
            <date month="February" year="2020"/>
            <abstract>
              <t>This document describes OAuth client authentication and certificate-bound access and refresh tokens using mutual Transport Layer Security (TLS) authentication with X.509 certificates. OAuth clients are provided a mechanism for authentication to the authorization server using mutual TLS, based on either self-signed certificates or public key infrastructure (PKI). OAuth authorization servers are provided a mechanism for binding access tokens to a client's mutual-TLS certificate, and OAuth protected resources are provided a method for ensuring that such an access token presented to it was issued to the client presenting the token.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8705"/>
          <seriesInfo name="DOI" value="10.17487/RFC8705"/>
        </reference>
        <reference anchor="OAUTH-2.1">
          <front>
            <title>The OAuth 2.1 Authorization Framework</title>
            <author fullname="Dick Hardt" initials="D." surname="Hardt">
              <organization>Hellō</organization>
            </author>
            <author fullname="Aaron Parecki" initials="A." surname="Parecki">
              <organization>Okta</organization>
            </author>
            <author fullname="Torsten Lodderstedt" initials="T." surname="Lodderstedt">
              <organization>SPRIND</organization>
            </author>
            <date day="2" month="March" year="2026"/>
            <abstract>
              <t>   The OAuth 2.1 authorization framework enables an application to
   obtain limited access to a protected resource, either on behalf of a
   resource owner by orchestrating an approval interaction between the
   resource owner and an authorization service, or by allowing the
   application to obtain access on its own behalf.  This specification
   replaces and obsoletes the OAuth 2.0 Authorization Framework
   described in RFC 6749 and the Bearer Token Usage in RFC 6750.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-v2-1-15"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC6749">
          <front>
            <title>The OAuth 2.0 Authorization Framework</title>
            <author fullname="D. Hardt" initials="D." role="editor" surname="Hardt"/>
            <date month="October" year="2012"/>
            <abstract>
              <t>The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf. This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6749"/>
          <seriesInfo name="DOI" value="10.17487/RFC6749"/>
        </reference>
        <reference anchor="ID-JAG">
          <front>
            <title>Identity Assertion JWT Authorization Grant</title>
            <author fullname="Aaron Parecki" initials="A." surname="Parecki">
              <organization>Okta</organization>
            </author>
            <author fullname="Karl McGuinness" initials="K." surname="McGuinness">
              <organization>Independent</organization>
            </author>
            <author fullname="Brian Campbell" initials="B." surname="Campbell">
              <organization>Ping Identity</organization>
            </author>
            <date day="21" month="May" year="2026"/>
            <abstract>
              <t>   This specification provides a mechanism for an application to use an
   identity assertion to obtain an access token for a third-party API by
   coordinating through an identity provider that the downstream
   Resource Authorization Server already trusts for single sign-on
   (SSO), using Token Exchange [RFC8693] and JWT Profile for OAuth 2.0
   Authorization Grants [RFC7523].  This pattern is informally referred
   to as Cross-App Access (XAA).

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-identity-assertion-authz-grant-04"/>
        </reference>
        <reference anchor="FIPA">
          <front>
            <title>OAuth 2.0 for First-Party Applications</title>
            <author fullname="Aaron Parecki" initials="A." surname="Parecki">
              <organization>Okta</organization>
            </author>
            <author fullname="George Fletcher" initials="G." surname="Fletcher">
              <organization>Practical Identity LLC</organization>
            </author>
            <author fullname="Pieter Kasselman" initials="P." surname="Kasselman">
              <organization>Defakto Security</organization>
            </author>
            <date day="27" month="February" year="2026"/>
            <abstract>
              <t>   This document defines the Authorization Challenge Endpoint, which
   supports clients that want to control the process of obtaining
   authorization from the user using a native experience.

   In many cases, this can provide an entirely browserless OAuth 2.0
   experience suited for native applications, only delegating to the
   browser in unexpected, high risk, or error conditions.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-oauth-first-party-apps-03"/>
        </reference>
        <reference anchor="CIBA" target="https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html">
          <front>
            <title>OpenID Connect Client-Initiated Backchannel Authentication Flow - Core 1.0</title>
            <author initials="G. F." surname="Rodriguez" fullname="Gonzalo Fernandez Rodriguez">
              <organization/>
            </author>
            <author initials="F." surname="Walter" fullname="Florian Walter">
              <organization/>
            </author>
            <author initials="A." surname="Nennker" fullname="Axel Nennker">
              <organization/>
            </author>
            <author initials="D." surname="Tonge" fullname="Dave Tonge">
              <organization/>
            </author>
            <author initials="B." surname="Campbell" fullname="Brian Campbell">
              <organization/>
            </author>
            <date year="2021" month="September" day="01"/>
          </front>
        </reference>
      </references>
    </references>
    <?line 1499?>

<section anchor="use-cases">
      <name>Use Cases</name>
      <t>This section is informative.</t>
      <section anchor="high-risk-transaction-evaluation">
        <name>High-Risk Transaction Evaluation</name>
        <t>An online banking application requires the user to authorize a
high-risk transaction — for example, a large outbound transfer to a
new payee. It is acceptable for the authorization to take from
several minutes to a few hours, because the transfer can settle out
of band; the user does not need to remain engaged with the
application during that time.</t>
        <t>When the user initiates the transaction, the banking application
sends an authorization request to the bank's authorization server with
<tt>completion_mode=deferred</tt>. The authorization server's risk-analysis
system
flags the transaction for additional review. The authorization
server returns a deferred response carrying a deferral code.</t>
        <t>The bank performs additional verification — contacting the user
through alternative channels, performing manual review by a fraud
analyst, or applying other risk controls. During this time the user
is free to close the banking application; on the next session, the
client polls the token endpoint with the deferral code and renders
the result of the transaction. If the bank registered a callback
endpoint, it receives a notification when the result is committed
and prompts the user proactively.</t>
      </section>
      <section anchor="step-up-assurance-during-an-in-session-operation">
        <name>Step-Up Assurance During an In-Session Operation</name>
        <t>A user who signed in earlier with a low-assurance method (a stored
password, for example) attempts an in-session operation that
requires higher assurance — applying for a loan, changing contact
details, or unlocking a sensitive feature. The authorization server
needs to step up the user's assurance before issuing the token; the
step-up may involve biometric verification or document presentation
that is not guaranteed to complete instantly.</t>
        <t>The client sends an authorization request with
<tt>completion_mode=deferred</tt>. The authorization server determines that
the requested operation
requires step-up, collects the relevant information from the user,
returns a deferred response, and proceeds with the
verification asynchronously. The client renders any unblocked steps
of the user's workflow (form fill, preview, draft persistence) while
polling for the eventual token response. This avoids forcing the
user to wait on a single blocking screen during a verification that
may legitimately take hours.</t>
      </section>
      <section anchor="identity-verification-based-on-physical-evidence">
        <name>Identity Verification Based on Physical Evidence</name>
        <t>In jurisdictions without widely deployed digital identity, a common
identity-verification flow scans a physical document — a passport or
driver's license — supplemented by a liveness check (a short video
of the end-user matched against the photograph on the document).</t>
        <t>Most such verifications can be decided automatically. Some require a
human operator to inspect the evidence, and that review can take
hours. Regulation on automated decision-making in identity
verification often makes the human-in-the-loop case mandatory rather
than optional.</t>
        <t>The client sends the originating grant's token request with
<tt>completion_mode=deferred</tt>. When automated verification suffices, the
authorization server completes synchronously. When it does not, the
authorization server returns a deferred response, queues the
evidence for human review, and notifies the client when the review
completes. The client UX continues immediately for users in the
automated path and degrades gracefully — to "we are reviewing your
documents, you will be notified" — for users in the deferred path,
without requiring two separate authorization flows.</t>
      </section>
      <section anchor="autonomous-agent-acting-on-behalf-of-a-user">
        <name>Autonomous Agent Acting on Behalf of a User</name>
        <t>An autonomous agent operates on behalf of a human principal under a
narrow set of pre-approved scopes. The agent encounters a task that
requires authorization beyond what was provisioned at enrollment —
for example, executing a purchase above the per-transaction ceiling
the principal granted.</t>
        <t>The agent sends a token request to the authorization server with
<tt>completion_mode=deferred</tt>. The authorization server, recognizing that
the
requested scope exceeds standing approval, contacts the human
principal out of band — by mobile push, email, or a separate
approval application — and returns a deferred response to the agent.
The agent suspends the affected task and continues with other work.
When the principal approves (or denies) the request out of band, the
authorization server resolves the deferred request; the agent
retrieves the result by polling and either completes the task or
terminates it cleanly.</t>
        <t>This pattern allows the principal to retain effective oversight
without being on the synchronous path of every elevated request.</t>
      </section>
      <section anchor="enterprise-identity-governance-approval">
        <name>Enterprise Identity Governance Approval</name>
        <t>A workforce client requests an access token whose scope corresponds
to a sensitive resource — production database access, financial
system administration, or PII export — that the enterprise gates
through an Identity Governance and Administration (IGA) workflow.
The workflow may involve approvals from the requestor's manager, the
resource owner, and a security reviewer, and may take from several
hours to several business days.</t>
        <t>The client sends a token request with <tt>completion_mode=deferred</tt>. The
authorization server, recognizing that the requested scope is under
IGA control, opens a request in the governance system, returns a
deferred response, and notifies the relevant approvers through their
normal channels. The client polls the token endpoint and surfaces
the request as "pending approval" to the requesting user. As
approvers act, the governance system records its decision; on final
approval, the authorization server resolves the deferred request and
the polling client receives the access token. On rejection or
timeout, polling returns <tt>access_denied</tt> and the client clears the
pending state.</t>
        <t>This pattern lets the authorization server remain the authoritative
issuer of access tokens even when the decision logic lives in a
purpose-built governance system, without requiring the client to
integrate with the governance system directly.</t>
      </section>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The authors would like to thank the following people for their contributions
and reviews of this specification: Karl McGuinness, Mikkel Christensen, Mick Hansen, Vitor Watanabe, Ricardo Pereira</t>
    </section>
  </back>
</rfc>
