<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-ietf-gnap-core-protocol-19" number="9635" obsoletes="" updates="" submissionType="IETF" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" xml:lang="en" prepTime="2024-10-08T14:03:06" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-gnap-core-protocol-19" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9635" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title>Grant Negotiation and Authorization Protocol (GNAP)</title>
    <seriesInfo name="RFC" value="9635" stream="IETF"/>
    <author initials="J." surname="Richer" fullname="Justin Richer" role="editor">
      <organization showOnFrontPage="true">Bespoke Engineering</organization>
      <address>
        <email>ietf@justin.richer.org</email>
        <uri>https://bspk.io/</uri>
      </address>
    </author>
    <author initials="F." surname="Imbault" fullname="Fabien Imbault">
      <organization showOnFrontPage="true">acert.io</organization>
      <address>
        <email>fabien.imbault@acert.io</email>
        <uri>https://acert.io/</uri>
      </address>
    </author>
    <date month="10" year="2024"/>
    <area>SEC</area>
    <workgroup>gnap</workgroup>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">The Grant Negotiation and Authorization Protocol (GNAP) defines a mechanism for delegating authorization to a piece of
      software and conveying the results and artifacts of that delegation to
      the software. This delegation can include access to a set of APIs as
      well as subject information passed directly to the software.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9635" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2024 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-roles">Roles</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.3">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-elements">Elements</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.4">
                <t indent="0" pn="section-toc.1-1.1.2.4.1"><xref derivedContent="1.4" format="counter" sectionFormat="of" target="section-1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-trust-relationships">Trust Relationships</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.5">
                <t indent="0" pn="section-toc.1-1.1.2.5.1"><xref derivedContent="1.5" format="counter" sectionFormat="of" target="section-1.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protocol-flow">Protocol Flow</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.6">
                <t indent="0" pn="section-toc.1-1.1.2.6.1"><xref derivedContent="1.6" format="counter" sectionFormat="of" target="section-1.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sequences">Sequences</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2.6.2">
                  <li pn="section-toc.1-1.1.2.6.2.1">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.1.1"><xref derivedContent="1.6.1" format="counter" sectionFormat="of" target="section-1.6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-overall-protocol-sequence">Overall Protocol Sequence</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.6.2.2">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.2.1"><xref derivedContent="1.6.2" format="counter" sectionFormat="of" target="section-1.6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-redirect-based-interaction">Redirect-Based Interaction</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.6.2.3">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.3.1"><xref derivedContent="1.6.3" format="counter" sectionFormat="of" target="section-1.6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-user-code-interaction">User Code Interaction</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.6.2.4">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.4.1"><xref derivedContent="1.6.4" format="counter" sectionFormat="of" target="section-1.6.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-asynchronous-authorization">Asynchronous Authorization</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.6.2.5">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.5.1"><xref derivedContent="1.6.5" format="counter" sectionFormat="of" target="section-1.6.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-software-only-authorization">Software-Only Authorization</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.6.2.6">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.6.1"><xref derivedContent="1.6.6" format="counter" sectionFormat="of" target="section-1.6.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-refreshing-an-expired-acces">Refreshing an Expired Access Token</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.6.2.7">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.7.1"><xref derivedContent="1.6.7" format="counter" sectionFormat="of" target="section-1.6.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-subject-informat">Requesting Subject Information Only</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.6.2.8">
                    <t indent="0" pn="section-toc.1-1.1.2.6.2.8.1"><xref derivedContent="1.6.8" format="counter" sectionFormat="of" target="section-1.6.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-cross-user-authentication">Cross-User Authentication</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-access">Requesting Access</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-access-to-resour">Requesting Access to Resources</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.1.2">
                  <li pn="section-toc.1-1.2.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.1.2.1.1"><xref derivedContent="2.1.1" format="counter" sectionFormat="of" target="section-2.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-a-single-access-">Requesting a Single Access Token</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.2.2.1.2.2.1"><xref derivedContent="2.1.2" format="counter" sectionFormat="of" target="section-2.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-multiple-access-">Requesting Multiple Access Tokens</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-subject-informati">Requesting Subject Information</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-identifying-the-client-inst">Identifying the Client Instance</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.3.2">
                  <li pn="section-toc.1-1.2.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.3.2.1.1"><xref derivedContent="2.3.1" format="counter" sectionFormat="of" target="section-2.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-identifying-the-client-insta">Identifying the Client Instance by Reference</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.2.2.3.2.2.1"><xref derivedContent="2.3.2" format="counter" sectionFormat="of" target="section-2.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-providing-displayable-clien">Providing Displayable Client Instance Information</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.2.2.3.2.3.1"><xref derivedContent="2.3.3" format="counter" sectionFormat="of" target="section-2.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authenticating-the-client-i">Authenticating the Client Instance</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.4">
                <t indent="0" pn="section-toc.1-1.2.2.4.1"><xref derivedContent="2.4" format="counter" sectionFormat="of" target="section-2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-identifying-the-user">Identifying the User</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.4.2">
                  <li pn="section-toc.1-1.2.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.4.2.1.1"><xref derivedContent="2.4.1" format="counter" sectionFormat="of" target="section-2.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-identifying-the-user-by-ref">Identifying the User by Reference</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.5">
                <t indent="0" pn="section-toc.1-1.2.2.5.1"><xref derivedContent="2.5" format="counter" sectionFormat="of" target="section-2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interacting-with-the-user">Interacting with the User</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.5.2">
                  <li pn="section-toc.1-1.2.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.5.2.1.1"><xref derivedContent="2.5.1" format="counter" sectionFormat="of" target="section-2.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-start-mode-definitions">Start Mode Definitions</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.2.2.5.2.2.1"><xref derivedContent="2.5.2" format="counter" sectionFormat="of" target="section-2.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-finish-methods">Interaction Finish Methods</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.5.2.3">
                    <t indent="0" pn="section-toc.1-1.2.2.5.2.3.1"><xref derivedContent="2.5.3" format="counter" sectionFormat="of" target="section-2.5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-hints">Hints</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-grant-response">Grant Response</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-request-continuation">Request Continuation</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-access-tokens">Access Tokens</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.2.2">
                  <li pn="section-toc.1-1.3.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.3.2.2.2.1.1"><xref derivedContent="3.2.1" format="counter" sectionFormat="of" target="section-3.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-single-access-token">Single Access Token</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.3.2.2.2.2.1"><xref derivedContent="3.2.2" format="counter" sectionFormat="of" target="section-3.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-multiple-access-tokens">Multiple Access Tokens</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.3.2.3">
                <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-modes">Interaction Modes</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.3.2">
                  <li pn="section-toc.1-1.3.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.3.2.3.2.1.1"><xref derivedContent="3.3.1" format="counter" sectionFormat="of" target="section-3.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-redirection-to-an-arbitrary">Redirection to an Arbitrary URI</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.3.2.3.2.2.1"><xref derivedContent="3.3.2" format="counter" sectionFormat="of" target="section-3.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-launch-of-an-application-ur">Launch of an Application URI</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.3.2.3.2.3.1"><xref derivedContent="3.3.3" format="counter" sectionFormat="of" target="section-3.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-display-of-a-short-user-cod">Display of a Short User Code</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.3.2.4">
                    <t indent="0" pn="section-toc.1-1.3.2.3.2.4.1"><xref derivedContent="3.3.4" format="counter" sectionFormat="of" target="section-3.3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-display-of-a-short-user-code">Display of a Short User Code and URI</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.3.2.5">
                    <t indent="0" pn="section-toc.1-1.3.2.3.2.5.1"><xref derivedContent="3.3.5" format="counter" sectionFormat="of" target="section-3.3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-finish">Interaction Finish</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.3.2.4">
                <t indent="0" pn="section-toc.1-1.3.2.4.1"><xref derivedContent="3.4" format="counter" sectionFormat="of" target="section-3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-returning-subject-informati">Returning Subject Information</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.4.2">
                  <li pn="section-toc.1-1.3.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.3.2.4.2.1.1"><xref derivedContent="3.4.1" format="counter" sectionFormat="of" target="section-3.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-assertion-formats">Assertion Formats</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.3.2.5">
                <t indent="0" pn="section-toc.1-1.3.2.5.1"><xref derivedContent="3.5" format="counter" sectionFormat="of" target="section-3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-returning-a-dynamically-bou">Returning a Dynamically Bound Client Instance Identifier</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.6">
                <t indent="0" pn="section-toc.1-1.3.2.6.1"><xref derivedContent="3.6" format="counter" sectionFormat="of" target="section-3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-error-response">Error Response</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-determining-authorization-a">Determining Authorization and Consent</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-starting-interaction-with-t">Starting Interaction with the End User</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.1.2">
                  <li pn="section-toc.1-1.4.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.1.1"><xref derivedContent="4.1.1" format="counter" sectionFormat="of" target="section-4.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-at-a-redirected">Interaction at a Redirected URI</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.2.1"><xref derivedContent="4.1.2" format="counter" sectionFormat="of" target="section-4.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-at-the-static-u">Interaction at the Static User Code URI</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.3.1"><xref derivedContent="4.1.3" format="counter" sectionFormat="of" target="section-4.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-at-a-dynamic-us">Interaction at a Dynamic User Code URI</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.4">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.4.1"><xref derivedContent="4.1.4" format="counter" sectionFormat="of" target="section-4.1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-through-an-appl">Interaction through an Application URI</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-post-interaction-completion">Post-Interaction Completion</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2">
                  <li pn="section-toc.1-1.4.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.1.1"><xref derivedContent="4.2.1" format="counter" sectionFormat="of" target="section-4.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-completing-interaction-with">Completing Interaction with a Browser Redirect to the Callback URI</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.2.1"><xref derivedContent="4.2.2" format="counter" sectionFormat="of" target="section-4.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-completing-interaction-with-">Completing Interaction with a Direct HTTP Request Callback</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.3.1"><xref derivedContent="4.2.3" format="counter" sectionFormat="of" target="section-4.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-calculating-the-interaction">Calculating the Interaction Hash</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-continuing-a-grant-request">Continuing a Grant Request</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-continuing-after-a-complete">Continuing after a Completed Interaction</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-continuing-during-pending-i">Continuing during Pending Interaction (Polling)</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-modifying-an-existing-reque">Modifying an Existing Request</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.4">
                <t indent="0" pn="section-toc.1-1.5.2.4.1"><xref derivedContent="5.4" format="counter" sectionFormat="of" target="section-5.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-revoking-a-grant-request">Revoking a Grant Request</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-token-management">Token Management</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rotating-the-access-token-v">Rotating the Access Token Value</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2.1.2">
                  <li pn="section-toc.1-1.6.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.6.2.1.2.1.1"><xref derivedContent="6.1.1" format="counter" sectionFormat="of" target="section-6.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-binding-a-new-key-to-the-ro">Binding a New Key to the Rotated Access Token</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-revoking-the-access-token">Revoking the Access Token</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-securing-requests-from-the-">Securing Requests from the Client Instance</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-formats">Key Formats</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2.1.2">
                  <li pn="section-toc.1-1.7.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.7.2.1.2.1.1"><xref derivedContent="7.1.1" format="counter" sectionFormat="of" target="section-7.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-references">Key References</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.7.2.1.2.2.1"><xref derivedContent="7.1.2" format="counter" sectionFormat="of" target="section-7.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-protection">Key Protection</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-presenting-access-tokens">Presenting Access Tokens</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.3">
                <t indent="0" pn="section-toc.1-1.7.2.3.1"><xref derivedContent="7.3" format="counter" sectionFormat="of" target="section-7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-proving-possession-of-a-key">Proving Possession of a Key with a Request</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2.3.2">
                  <li pn="section-toc.1-1.7.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.7.2.3.2.1.1"><xref derivedContent="7.3.1" format="counter" sectionFormat="of" target="section-7.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-http-message-signatures">HTTP Message Signatures</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.7.2.3.2.2.1"><xref derivedContent="7.3.2" format="counter" sectionFormat="of" target="section-7.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mutual-tls">Mutual TLS</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.3.2.3">
                    <t indent="0" pn="section-toc.1-1.7.2.3.2.3.1"><xref derivedContent="7.3.3" format="counter" sectionFormat="of" target="section-7.3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-detached-jws">Detached JWS</xref></t>
                  </li>
                  <li pn="section-toc.1-1.7.2.3.2.4">
                    <t indent="0" pn="section-toc.1-1.7.2.3.2.4.1"><xref derivedContent="7.3.4" format="counter" sectionFormat="of" target="section-7.3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-attached-jws">Attached JWS</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-resource-access-rights">Resource Access Rights</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requesting-resources-by-ref">Requesting Resources by Reference</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="9" format="counter" sectionFormat="of" target="section-9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-discovery">Discovery</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="9.1" format="counter" sectionFormat="of" target="section-9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rs-first-method-of-as-disco">RS-First Method of AS Discovery</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="9.2" format="counter" sectionFormat="of" target="section-9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dynamic-grant-endpoint-disc">Dynamic Grant Endpoint Discovery</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="10" format="counter" sectionFormat="of" target="section-10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2">
              <li pn="section-toc.1-1.10.2.1">
                <t indent="0" pn="section-toc.1-1.10.2.1.1"><xref derivedContent="10.1" format="counter" sectionFormat="of" target="section-10.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-http-authentication-scheme-">HTTP Authentication Scheme Registration</xref></t>
              </li>
              <li pn="section-toc.1-1.10.2.2">
                <t indent="0" pn="section-toc.1-1.10.2.2.1"><xref derivedContent="10.2" format="counter" sectionFormat="of" target="section-10.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-media-type-registration">Media Type Registration</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.2.2">
                  <li pn="section-toc.1-1.10.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.2.2.1.1"><xref derivedContent="10.2.1" format="counter" sectionFormat="of" target="section-10.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-application-gnap-binding-jw">application/gnap-binding-jwsd</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.2.2.2.1"><xref derivedContent="10.2.2" format="counter" sectionFormat="of" target="section-10.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-application-gnap-binding-jws">application/gnap-binding-jws</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.10.2.2.2.3.1"><xref derivedContent="10.2.3" format="counter" sectionFormat="of" target="section-10.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-application-gnap-binding-ro">application/gnap-binding-rotation-jwsd</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.2.2.4">
                    <t indent="0" pn="section-toc.1-1.10.2.2.2.4.1"><xref derivedContent="10.2.4" format="counter" sectionFormat="of" target="section-10.2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-application-gnap-binding-rot">application/gnap-binding-rotation-jws</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.3">
                <t indent="0" pn="section-toc.1-1.10.2.3.1"><xref derivedContent="10.3" format="counter" sectionFormat="of" target="section-10.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-grant-request-paramete">GNAP Grant Request Parameters</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.3.2">
                  <li pn="section-toc.1-1.10.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.3.2.1.1"><xref derivedContent="10.3.1" format="counter" sectionFormat="of" target="section-10.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.3.2.2.1"><xref derivedContent="10.3.2" format="counter" sectionFormat="of" target="section-10.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.4">
                <t indent="0" pn="section-toc.1-1.10.2.4.1"><xref derivedContent="10.4" format="counter" sectionFormat="of" target="section-10.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-access-token-flags">GNAP Access Token Flags</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.4.2">
                  <li pn="section-toc.1-1.10.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.4.2.1.1"><xref derivedContent="10.4.1" format="counter" sectionFormat="of" target="section-10.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-2">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.4.2.2.1"><xref derivedContent="10.4.2" format="counter" sectionFormat="of" target="section-10.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-2">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.5">
                <t indent="0" pn="section-toc.1-1.10.2.5.1"><xref derivedContent="10.5" format="counter" sectionFormat="of" target="section-10.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-subject-information-re">GNAP Subject Information Request Fields</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.5.2">
                  <li pn="section-toc.1-1.10.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.5.2.1.1"><xref derivedContent="10.5.1" format="counter" sectionFormat="of" target="section-10.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-3">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.5.2.2.1"><xref derivedContent="10.5.2" format="counter" sectionFormat="of" target="section-10.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-3">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.6">
                <t indent="0" pn="section-toc.1-1.10.2.6.1"><xref derivedContent="10.6" format="counter" sectionFormat="of" target="section-10.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-assertion-formats">GNAP Assertion Formats</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.6.2">
                  <li pn="section-toc.1-1.10.2.6.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.6.2.1.1"><xref derivedContent="10.6.1" format="counter" sectionFormat="of" target="section-10.6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-4">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.6.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.6.2.2.1"><xref derivedContent="10.6.2" format="counter" sectionFormat="of" target="section-10.6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-4">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.7">
                <t indent="0" pn="section-toc.1-1.10.2.7.1"><xref derivedContent="10.7" format="counter" sectionFormat="of" target="section-10.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-client-instance-fields">GNAP Client Instance Fields</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.7.2">
                  <li pn="section-toc.1-1.10.2.7.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.7.2.1.1"><xref derivedContent="10.7.1" format="counter" sectionFormat="of" target="section-10.7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-5">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.7.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.7.2.2.1"><xref derivedContent="10.7.2" format="counter" sectionFormat="of" target="section-10.7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-5">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.8">
                <t indent="0" pn="section-toc.1-1.10.2.8.1"><xref derivedContent="10.8" format="counter" sectionFormat="of" target="section-10.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-client-instance-displa">GNAP Client Instance Display Fields</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.8.2">
                  <li pn="section-toc.1-1.10.2.8.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.8.2.1.1"><xref derivedContent="10.8.1" format="counter" sectionFormat="of" target="section-10.8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-6">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.8.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.8.2.2.1"><xref derivedContent="10.8.2" format="counter" sectionFormat="of" target="section-10.8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-6">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.9">
                <t indent="0" pn="section-toc.1-1.10.2.9.1"><xref derivedContent="10.9" format="counter" sectionFormat="of" target="section-10.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-interaction-start-mode">GNAP Interaction Start Modes</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.9.2">
                  <li pn="section-toc.1-1.10.2.9.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.9.2.1.1"><xref derivedContent="10.9.1" format="counter" sectionFormat="of" target="section-10.9.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-7">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.9.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.9.2.2.1"><xref derivedContent="10.9.2" format="counter" sectionFormat="of" target="section-10.9.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-7">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.10">
                <t indent="0" pn="section-toc.1-1.10.2.10.1"><xref derivedContent="10.10" format="counter" sectionFormat="of" target="section-10.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-interaction-finish-met">GNAP Interaction Finish Methods</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.10.2">
                  <li pn="section-toc.1-1.10.2.10.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.10.2.1.1"><xref derivedContent="10.10.1" format="counter" sectionFormat="of" target="section-10.10.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-8">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.10.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.10.2.2.1"><xref derivedContent="10.10.2" format="counter" sectionFormat="of" target="section-10.10.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-8">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.11">
                <t indent="0" pn="section-toc.1-1.10.2.11.1"><xref derivedContent="10.11" format="counter" sectionFormat="of" target="section-10.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-interaction-hints">GNAP Interaction Hints</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.11.2">
                  <li pn="section-toc.1-1.10.2.11.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.11.2.1.1"><xref derivedContent="10.11.1" format="counter" sectionFormat="of" target="section-10.11.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-9">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.11.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.11.2.2.1"><xref derivedContent="10.11.2" format="counter" sectionFormat="of" target="section-10.11.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-9">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.12">
                <t indent="0" pn="section-toc.1-1.10.2.12.1"><xref derivedContent="10.12" format="counter" sectionFormat="of" target="section-10.12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-grant-response-paramet">GNAP Grant Response Parameters</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.12.2">
                  <li pn="section-toc.1-1.10.2.12.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.12.2.1.1"><xref derivedContent="10.12.1" format="counter" sectionFormat="of" target="section-10.12.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-10">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.12.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.12.2.2.1"><xref derivedContent="10.12.2" format="counter" sectionFormat="of" target="section-10.12.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-10">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.13">
                <t indent="0" pn="section-toc.1-1.10.2.13.1"><xref derivedContent="10.13" format="counter" sectionFormat="of" target="section-10.13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-interaction-mode-respo">GNAP Interaction Mode Responses</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.13.2">
                  <li pn="section-toc.1-1.10.2.13.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.13.2.1.1"><xref derivedContent="10.13.1" format="counter" sectionFormat="of" target="section-10.13.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-11">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.13.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.13.2.2.1"><xref derivedContent="10.13.2" format="counter" sectionFormat="of" target="section-10.13.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-11">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.14">
                <t indent="0" pn="section-toc.1-1.10.2.14.1"><xref derivedContent="10.14" format="counter" sectionFormat="of" target="section-10.14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-subject-information-res">GNAP Subject Information Response Fields</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.14.2">
                  <li pn="section-toc.1-1.10.2.14.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.14.2.1.1"><xref derivedContent="10.14.1" format="counter" sectionFormat="of" target="section-10.14.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-12">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.14.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.14.2.2.1"><xref derivedContent="10.14.2" format="counter" sectionFormat="of" target="section-10.14.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-12">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.15">
                <t indent="0" pn="section-toc.1-1.10.2.15.1"><xref derivedContent="10.15" format="counter" sectionFormat="of" target="section-10.15"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-error-codes">GNAP Error Codes</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.15.2">
                  <li pn="section-toc.1-1.10.2.15.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.15.2.1.1"><xref derivedContent="10.15.1" format="counter" sectionFormat="of" target="section-10.15.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-13">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.15.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.15.2.2.1"><xref derivedContent="10.15.2" format="counter" sectionFormat="of" target="section-10.15.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-13">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.16">
                <t indent="0" pn="section-toc.1-1.10.2.16.1"><xref derivedContent="10.16" format="counter" sectionFormat="of" target="section-10.16"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-key-proofing-methods">GNAP Key Proofing Methods</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.16.2">
                  <li pn="section-toc.1-1.10.2.16.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.16.2.1.1"><xref derivedContent="10.16.1" format="counter" sectionFormat="of" target="section-10.16.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-14">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.16.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.16.2.2.1"><xref derivedContent="10.16.2" format="counter" sectionFormat="of" target="section-10.16.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-14">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.17">
                <t indent="0" pn="section-toc.1-1.10.2.17.1"><xref derivedContent="10.17" format="counter" sectionFormat="of" target="section-10.17"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-key-formats">GNAP Key Formats</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.17.2">
                  <li pn="section-toc.1-1.10.2.17.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.17.2.1.1"><xref derivedContent="10.17.1" format="counter" sectionFormat="of" target="section-10.17.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-15">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.17.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.17.2.2.1"><xref derivedContent="10.17.2" format="counter" sectionFormat="of" target="section-10.17.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-15">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.10.2.18">
                <t indent="0" pn="section-toc.1-1.10.2.18.1"><xref derivedContent="10.18" format="counter" sectionFormat="of" target="section-10.18"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-gnap-authorization-server-d">GNAP Authorization Server Discovery Fields</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.10.2.18.2">
                  <li pn="section-toc.1-1.10.2.18.2.1">
                    <t indent="0" pn="section-toc.1-1.10.2.18.2.1.1"><xref derivedContent="10.18.1" format="counter" sectionFormat="of" target="section-10.18.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-template-16">Registration Template</xref></t>
                  </li>
                  <li pn="section-toc.1-1.10.2.18.2.2">
                    <t indent="0" pn="section-toc.1-1.10.2.18.2.2.1"><xref derivedContent="10.18.2" format="counter" sectionFormat="of" target="section-10.18.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-initial-contents-16">Initial Contents</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="11" format="counter" sectionFormat="of" target="section-11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.11.2">
              <li pn="section-toc.1-1.11.2.1">
                <t indent="0" pn="section-toc.1-1.11.2.1.1"><xref derivedContent="11.1" format="counter" sectionFormat="of" target="section-11.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-tls-protection-in-transit">TLS Protection in Transit</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.2">
                <t indent="0" pn="section-toc.1-1.11.2.2.1"><xref derivedContent="11.2" format="counter" sectionFormat="of" target="section-11.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-signing-requests-from-the-c">Signing Requests from the Client Software</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.3">
                <t indent="0" pn="section-toc.1-1.11.2.3.1"><xref derivedContent="11.3" format="counter" sectionFormat="of" target="section-11.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mtls-message-integrity">MTLS Message Integrity</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.4">
                <t indent="0" pn="section-toc.1-1.11.2.4.1"><xref derivedContent="11.4" format="counter" sectionFormat="of" target="section-11.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-mtls-deployment-patterns">MTLS Deployment Patterns</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.5">
                <t indent="0" pn="section-toc.1-1.11.2.5.1"><xref derivedContent="11.5" format="counter" sectionFormat="of" target="section-11.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protection-of-client-instan">Protection of Client Instance Key Material</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.6">
                <t indent="0" pn="section-toc.1-1.11.2.6.1"><xref derivedContent="11.6" format="counter" sectionFormat="of" target="section-11.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protection-of-authorization">Protection of Authorization Server</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.7">
                <t indent="0" pn="section-toc.1-1.11.2.7.1"><xref derivedContent="11.7" format="counter" sectionFormat="of" target="section-11.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-symmetric-and-asymmetric-cl">Symmetric and Asymmetric Client Instance Keys</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.8">
                <t indent="0" pn="section-toc.1-1.11.2.8.1"><xref derivedContent="11.8" format="counter" sectionFormat="of" target="section-11.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-generation-of-access-tokens">Generation of Access Tokens</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.9">
                <t indent="0" pn="section-toc.1-1.11.2.9.1"><xref derivedContent="11.9" format="counter" sectionFormat="of" target="section-11.9"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-bearer-access-tokens">Bearer Access Tokens</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.10">
                <t indent="0" pn="section-toc.1-1.11.2.10.1"><xref derivedContent="11.10" format="counter" sectionFormat="of" target="section-11.10"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-key-bound-access-tokens">Key-Bound Access Tokens</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.11">
                <t indent="0" pn="section-toc.1-1.11.2.11.1"><xref derivedContent="11.11" format="counter" sectionFormat="of" target="section-11.11"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-exposure-of-end-user-creden">Exposure of End-User Credentials to Client Instance</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.12">
                <t indent="0" pn="section-toc.1-1.11.2.12.1"><xref derivedContent="11.12" format="counter" sectionFormat="of" target="section-11.12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-mixing-up-authorization-ser">Mixing Up Authorization Servers</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.13">
                <t indent="0" pn="section-toc.1-1.11.2.13.1"><xref derivedContent="11.13" format="counter" sectionFormat="of" target="section-11.13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-processing-of-client-presen">Processing of Client-Presented User Information</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.14">
                <t indent="0" pn="section-toc.1-1.11.2.14.1"><xref derivedContent="11.14" format="counter" sectionFormat="of" target="section-11.14"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-client-instance-pre-registr">Client Instance Pre-registration</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.15">
                <t indent="0" pn="section-toc.1-1.11.2.15.1"><xref derivedContent="11.15" format="counter" sectionFormat="of" target="section-11.15"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-client-instance-impersonati">Client Instance Impersonation</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.16">
                <t indent="0" pn="section-toc.1-1.11.2.16.1"><xref derivedContent="11.16" format="counter" sectionFormat="of" target="section-11.16"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-client-hosted-logo-uri">Client-Hosted Logo URI</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.17">
                <t indent="0" pn="section-toc.1-1.11.2.17.1"><xref derivedContent="11.17" format="counter" sectionFormat="of" target="section-11.17"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-interception-of-information">Interception of Information in the Browser</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.18">
                <t indent="0" pn="section-toc.1-1.11.2.18.1"><xref derivedContent="11.18" format="counter" sectionFormat="of" target="section-11.18"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-callback-uri-manipulation">Callback URI Manipulation</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.19">
                <t indent="0" pn="section-toc.1-1.11.2.19.1"><xref derivedContent="11.19" format="counter" sectionFormat="of" target="section-11.19"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-redirection-status-codes">Redirection Status Codes</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.20">
                <t indent="0" pn="section-toc.1-1.11.2.20.1"><xref derivedContent="11.20" format="counter" sectionFormat="of" target="section-11.20"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-interception-of-responses-f">Interception of Responses from the AS</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.21">
                <t indent="0" pn="section-toc.1-1.11.2.21.1"><xref derivedContent="11.21" format="counter" sectionFormat="of" target="section-11.21"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-key-distribution">Key Distribution</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.22">
                <t indent="0" pn="section-toc.1-1.11.2.22.1"><xref derivedContent="11.22" format="counter" sectionFormat="of" target="section-11.22"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-key-rotation-policy">Key Rotation Policy</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.23">
                <t indent="0" pn="section-toc.1-1.11.2.23.1"><xref derivedContent="11.23" format="counter" sectionFormat="of" target="section-11.23"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-interaction-finish-modes-an">Interaction Finish Modes and Polling</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.24">
                <t indent="0" pn="section-toc.1-1.11.2.24.1"><xref derivedContent="11.24" format="counter" sectionFormat="of" target="section-11.24"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-session-management-for-inte">Session Management for Interaction Finish Methods</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.25">
                <t indent="0" pn="section-toc.1-1.11.2.25.1"><xref derivedContent="11.25" format="counter" sectionFormat="of" target="section-11.25"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-calculating-interaction-has">Calculating Interaction Hash</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.26">
                <t indent="0" pn="section-toc.1-1.11.2.26.1"><xref derivedContent="11.26" format="counter" sectionFormat="of" target="section-11.26"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-storage-of-information-duri">Storage of Information during Interaction and Continuation</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.27">
                <t indent="0" pn="section-toc.1-1.11.2.27.1"><xref derivedContent="11.27" format="counter" sectionFormat="of" target="section-11.27"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-denial-of-service-dos-throu">Denial of Service (DoS) through Grant Continuation</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.28">
                <t indent="0" pn="section-toc.1-1.11.2.28.1"><xref derivedContent="11.28" format="counter" sectionFormat="of" target="section-11.28"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-exhaustion-of-random-value-">Exhaustion of Random Value Space</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.29">
                <t indent="0" pn="section-toc.1-1.11.2.29.1"><xref derivedContent="11.29" format="counter" sectionFormat="of" target="section-11.29"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-front-channel-uris">Front-Channel URIs</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.30">
                <t indent="0" pn="section-toc.1-1.11.2.30.1"><xref derivedContent="11.30" format="counter" sectionFormat="of" target="section-11.30"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-processing-assertions">Processing Assertions</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.31">
                <t indent="0" pn="section-toc.1-1.11.2.31.1"><xref derivedContent="11.31" format="counter" sectionFormat="of" target="section-11.31"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-stolen-token-replay">Stolen Token Replay</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.32">
                <t indent="0" pn="section-toc.1-1.11.2.32.1"><xref derivedContent="11.32" format="counter" sectionFormat="of" target="section-11.32"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-self-contained-stateless-ac">Self-Contained Stateless Access Tokens</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.33">
                <t indent="0" pn="section-toc.1-1.11.2.33.1"><xref derivedContent="11.33" format="counter" sectionFormat="of" target="section-11.33"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-network-problems-and-token-">Network Problems and Token and Grant Management</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.34">
                <t indent="0" pn="section-toc.1-1.11.2.34.1"><xref derivedContent="11.34" format="counter" sectionFormat="of" target="section-11.34"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-server-side-request-forgery">Server-Side Request Forgery (SSRF)</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.35">
                <t indent="0" pn="section-toc.1-1.11.2.35.1"><xref derivedContent="11.35" format="counter" sectionFormat="of" target="section-11.35"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-multiple-key-formats">Multiple Key Formats</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.36">
                <t indent="0" pn="section-toc.1-1.11.2.36.1"><xref derivedContent="11.36" format="counter" sectionFormat="of" target="section-11.36"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-asynchronous-interactions">Asynchronous Interactions</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.37">
                <t indent="0" pn="section-toc.1-1.11.2.37.1"><xref derivedContent="11.37" format="counter" sectionFormat="of" target="section-11.37"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-compromised-rs">Compromised RS</xref></t>
              </li>
              <li pn="section-toc.1-1.11.2.38">
                <t indent="0" pn="section-toc.1-1.11.2.38.1"><xref derivedContent="11.38" format="counter" sectionFormat="of" target="section-11.38"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-as-provided-token-keys">AS-Provided Token Keys</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="12" format="counter" sectionFormat="of" target="section-12"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-privacy-considerations">Privacy Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2">
              <li pn="section-toc.1-1.12.2.1">
                <t indent="0" pn="section-toc.1-1.12.2.1.1"><xref derivedContent="12.1" format="counter" sectionFormat="of" target="section-12.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-surveillance">Surveillance</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.1.2">
                  <li pn="section-toc.1-1.12.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.1.2.1.1"><xref derivedContent="12.1.1" format="counter" sectionFormat="of" target="section-12.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-surveillance-by-the-client">Surveillance by the Client</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.1.2.2.1"><xref derivedContent="12.1.2" format="counter" sectionFormat="of" target="section-12.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-surveillance-by-the-authori">Surveillance by the Authorization Server</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.2">
                <t indent="0" pn="section-toc.1-1.12.2.2.1"><xref derivedContent="12.2" format="counter" sectionFormat="of" target="section-12.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-stored-data">Stored Data</xref></t>
              </li>
              <li pn="section-toc.1-1.12.2.3">
                <t indent="0" pn="section-toc.1-1.12.2.3.1"><xref derivedContent="12.3" format="counter" sectionFormat="of" target="section-12.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-intrusion">Intrusion</xref></t>
              </li>
              <li pn="section-toc.1-1.12.2.4">
                <t indent="0" pn="section-toc.1-1.12.2.4.1"><xref derivedContent="12.4" format="counter" sectionFormat="of" target="section-12.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-correlation">Correlation</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.12.2.4.2">
                  <li pn="section-toc.1-1.12.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.12.2.4.2.1.1"><xref derivedContent="12.4.1" format="counter" sectionFormat="of" target="section-12.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-correlation-by-clients">Correlation by Clients</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.12.2.4.2.2.1"><xref derivedContent="12.4.2" format="counter" sectionFormat="of" target="section-12.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-correlation-by-resource-ser">Correlation by Resource Servers</xref></t>
                  </li>
                  <li pn="section-toc.1-1.12.2.4.2.3">
                    <t indent="0" pn="section-toc.1-1.12.2.4.2.3.1"><xref derivedContent="12.4.3" format="counter" sectionFormat="of" target="section-12.4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-correlation-by-authorizatio">Correlation by Authorization Servers</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.12.2.5">
                <t indent="0" pn="section-toc.1-1.12.2.5.1"><xref derivedContent="12.5" format="counter" sectionFormat="of" target="section-12.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-disclosure-in-shared-refere">Disclosure in Shared References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.13">
            <t indent="0" pn="section-toc.1-1.13.1"><xref derivedContent="13" format="counter" sectionFormat="of" target="section-13"/>. <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.13.2">
              <li pn="section-toc.1-1.13.2.1">
                <t indent="0" pn="section-toc.1-1.13.2.1.1"><xref derivedContent="13.1" format="counter" sectionFormat="of" target="section-13.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.13.2.2">
                <t indent="0" pn="section-toc.1-1.13.2.2.1"><xref derivedContent="13.2" format="counter" sectionFormat="of" target="section-13.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.14">
            <t indent="0" pn="section-toc.1-1.14.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-comparison-with-oauth-20">Comparison with OAuth 2.0</xref></t>
          </li>
          <li pn="section-toc.1-1.15">
            <t indent="0" pn="section-toc.1-1.15.1"><xref derivedContent="Appendix B" format="default" sectionFormat="of" target="section-appendix.b"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-example-protocol-flows">Example Protocol Flows</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.15.2">
              <li pn="section-toc.1-1.15.2.1">
                <t indent="0" pn="section-toc.1-1.15.2.1.1"><xref derivedContent="B.1" format="counter" sectionFormat="of" target="section-appendix.b.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-redirect-based-user-interac">Redirect-Based User Interaction</xref></t>
              </li>
              <li pn="section-toc.1-1.15.2.2">
                <t indent="0" pn="section-toc.1-1.15.2.2.1"><xref derivedContent="B.2" format="counter" sectionFormat="of" target="section-appendix.b.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-secondary-device-interactio">Secondary Device Interaction</xref></t>
              </li>
              <li pn="section-toc.1-1.15.2.3">
                <t indent="0" pn="section-toc.1-1.15.2.3.1"><xref derivedContent="B.3" format="counter" sectionFormat="of" target="section-appendix.b.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-no-user-involvement">No User Involvement</xref></t>
              </li>
              <li pn="section-toc.1-1.15.2.4">
                <t indent="0" pn="section-toc.1-1.15.2.4.1"><xref derivedContent="B.4" format="counter" sectionFormat="of" target="section-appendix.b.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-asynchronous-authorization-2">Asynchronous Authorization</xref></t>
              </li>
              <li pn="section-toc.1-1.15.2.5">
                <t indent="0" pn="section-toc.1-1.15.2.5.1"><xref derivedContent="B.5" format="counter" sectionFormat="of" target="section-appendix.b.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-applying-oauth-20-scopes-an">Applying OAuth 2.0 Scopes and Client IDs</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.16">
            <t indent="0" pn="section-toc.1-1.16.1"><xref derivedContent="Appendix C" format="default" sectionFormat="of" target="section-appendix.c"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interoperability-profiles">Interoperability Profiles</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.16.2">
              <li pn="section-toc.1-1.16.2.1">
                <t indent="0" pn="section-toc.1-1.16.2.1.1"><xref derivedContent="C.1" format="counter" sectionFormat="of" target="section-appendix.c.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-web-based-redirection">Web-Based Redirection</xref></t>
              </li>
              <li pn="section-toc.1-1.16.2.2">
                <t indent="0" pn="section-toc.1-1.16.2.2.1"><xref derivedContent="C.2" format="counter" sectionFormat="of" target="section-appendix.c.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-secondary-device">Secondary Device</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.17">
            <t indent="0" pn="section-toc.1-1.17.1"><xref derivedContent="Appendix D" format="default" sectionFormat="of" target="section-appendix.d"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-guidance-for-extensions">Guidance for Extensions</xref></t>
          </li>
          <li pn="section-toc.1-1.18">
            <t indent="0" pn="section-toc.1-1.18.1"><xref derivedContent="Appendix E" format="default" sectionFormat="of" target="section-appendix.e"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-json-structures-and-polymor">JSON Structures and Polymorphism</xref></t>
          </li>
          <li pn="section-toc.1-1.19">
            <t indent="0" pn="section-toc.1-1.19.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.f"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.20">
            <t indent="0" pn="section-toc.1-1.20.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.g"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">GNAP allows a piece of software, the client instance, to request delegated
authorization to resource servers and subject information. The delegated access to
the resource server can be used by the client instance to access resources and APIs
on behalf a resource owner, and delegated access to
subject information can in turn be used by the client instance to make authentication decisions.
This delegation is facilitated by an authorization server, usually on
behalf of a resource owner. The end user operating the software can interact
with the authorization server to authenticate, provide consent, and
authorize the request as a resource owner.</t>
      <t indent="0" pn="section-1-2">The process by which the delegation happens is known as a grant, and
GNAP allows for the negotiation of the grant process
over time by multiple parties acting in distinct roles.</t>
      <t indent="0" pn="section-1-3">This specification focuses on the portions of the delegation process facing the client instance.
In particular, this specification defines interoperable methods for a client instance to request, negotiate,
and receive access to information facilitated by the authorization server.
This specification additionally defines methods for the client instance to access
protected resources at a resource server.
This specification also discusses discovery mechanisms that enable the client instance to
configure itself dynamically.
The means for an authorization server and resource server to interoperate are
discussed in <xref target="I-D.ietf-gnap-resource-servers" format="default" sectionFormat="of" derivedContent="GNAP-RS"/>.</t>
      <t indent="0" pn="section-1-4">The focus of this protocol is to provide interoperability between the different
parties acting in each role, not to specify implementation details of each.
Where appropriate, GNAP may make recommendations about internal implementation
details, but these recommendations are to ensure the security of the overall
deployment rather than to be prescriptive in the implementation.</t>
      <t indent="0" pn="section-1-5">This protocol solves many of the same use cases as OAuth 2.0 <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>,
OpenID Connect <xref target="OIDC" format="default" sectionFormat="of" derivedContent="OIDC"/>, and the family of protocols that have grown up
around that ecosystem. However, GNAP is not an extension of OAuth 2.0
and is not intended to be directly compatible with OAuth 2.0. GNAP seeks to
provide functionality and solve use cases that OAuth 2.0 cannot easily
or cleanly address. <xref target="vs-oauth2" format="default" sectionFormat="of" derivedContent="Appendix A"/> further details the protocol rationale compared to OAuth 2.0.
GNAP and OAuth 2.0 will likely exist in parallel
for many deployments, and considerations have been taken to facilitate
the mapping and transition from existing OAuth 2.0 systems to GNAP. Some examples
of these can be found in <xref target="example-oauth2" format="default" sectionFormat="of" derivedContent="Appendix B.5"/>.</t>
      <section anchor="terminology" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.1-1">
    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" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.
        </t>
        <t indent="0" pn="section-1.1-2">This document contains non-normative examples of partial and complete HTTP messages, JSON structures, URIs, query components, keys, and other elements. Whenever possible, the document uses URI as a generic term, since it aligns with the recommendations in <xref target="RFC3986" format="default" sectionFormat="of" derivedContent="RFC3986"/> and better matches the intent that the identifier may be reachable through various/generic means (compared to URLs). Some examples use a single trailing backslash (<tt>\</tt>) to indicate line wrapping for long values, as per <xref target="RFC8792" format="default" sectionFormat="of" derivedContent="RFC8792"/>. The <tt>\</tt> character and leading spaces on wrapped lines are not part of the value.</t>
        <t indent="0" pn="section-1.1-3">This document uses the term "mutual TLS" as defined by <xref target="RFC8705" format="default" sectionFormat="of" derivedContent="RFC8705"/>. The shortened form "MTLS" is used to mean the same thing.</t>
        <t indent="0" pn="section-1.1-4">For brevity, the term "signature" on its own is used in this document to refer to both digital signatures (which use asymmetric cryptography) and keyed Message Authentication Codes (MACs) (which use symmetric cryptography). Similarly, the verb "sign" refers to the generation of either a digital signature or a keyed MAC over a given signature base. The qualified term "digital signature" refers specifically to the output of an asymmetric cryptographic signing operation.</t>
      </section>
      <section anchor="roles" numbered="true" removeInRFC="false" toc="include" pn="section-1.2">
        <name slugifiedName="name-roles">Roles</name>
        <t indent="0" pn="section-1.2-1">The parties in GNAP perform actions under different roles.
Roles are defined by the actions taken and the expectations leveraged
on the role by the overall protocol.</t>
        <figure align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-roles-in-gnap">Roles in GNAP</name>
          <artset pn="section-1.2-2.1">
            <artwork type="svg" align="left" pn="section-1.2-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="432" width="472" viewBox="0 0 472 432" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                <path d="M 8,32 L 8,112" fill="none" stroke="black"/>
                <path d="M 8,240 L 8,288" fill="none" stroke="black"/>
                <path d="M 58,112 L 58,224" fill="none" stroke="black"/>
                <path d="M 54,112 L 54,224" fill="none" stroke="black"/>
                <path d="M 104,240 L 104,288" fill="none" stroke="black"/>
                <path d="M 120,32 L 120,112" fill="none" stroke="black"/>
                <path d="M 128,144 L 128,192" fill="none" stroke="black"/>
                <path d="M 152,96 L 152,144" fill="none" stroke="black"/>
                <path d="M 170,192 L 170,240" fill="none" stroke="black"/>
                <path d="M 166,192 L 166,240" fill="none" stroke="black"/>
                <path d="M 184,96 L 184,144" fill="none" stroke="black"/>
                <path d="M 216,144 L 216,192" fill="none" stroke="black"/>
                <path d="M 216,240 L 216,288" fill="none" stroke="black"/>
                <path d="M 224,32 L 224,112" fill="none" stroke="black"/>
                <path d="M 320,240 L 320,288" fill="none" stroke="black"/>
                <path d="M 328,32 L 328,112" fill="none" stroke="black"/>
                <path d="M 8,32 L 120,32" fill="none" stroke="black"/>
                <path d="M 224,32 L 328,32" fill="none" stroke="black"/>
                <path d="M 128,96 L 152,96" fill="none" stroke="black"/>
                <path d="M 184,96 L 216,96" fill="none" stroke="black"/>
                <path d="M 8,112 L 120,112" fill="none" stroke="black"/>
                <path d="M 224,112 L 328,112" fill="none" stroke="black"/>
                <path d="M 128,144 L 216,144" fill="none" stroke="black"/>
                <path d="M 128,192 L 216,192" fill="none" stroke="black"/>
                <path d="M 24,224 L 88,224" fill="none" stroke="black"/>
                <path d="M 232,224 L 304,224" fill="none" stroke="black"/>
                <path d="M 168,238 L 216,238" fill="none" stroke="black"/>
                <path d="M 168,242 L 216,242" fill="none" stroke="black"/>
                <path d="M 24,304 L 88,304" fill="none" stroke="black"/>
                <path d="M 232,304 L 304,304" fill="none" stroke="black"/>
                <path d="M 8,366 L 40,366" fill="none" stroke="black"/>
                <path d="M 8,370 L 40,370" fill="none" stroke="black"/>
                <path d="M 8,384 L 40,384" fill="none" stroke="black"/>
                <path d="M 24,224 C 15.16936,224 8,231.16936 8,240" fill="none" stroke="black"/>
                <path d="M 88,224 C 96.83064,224 104,231.16936 104,240" fill="none" stroke="black"/>
                <path d="M 232,224 C 223.16936,224 216,231.16936 216,240" fill="none" stroke="black"/>
                <path d="M 304,224 C 312.83064,224 320,231.16936 320,240" fill="none" stroke="black"/>
                <path d="M 24,304 C 15.16936,304 8,296.83064 8,288" fill="none" stroke="black"/>
                <path d="M 88,304 C 96.83064,304 104,296.83064 104,288" fill="none" stroke="black"/>
                <path d="M 232,304 C 223.16936,304 216,296.83064 216,288" fill="none" stroke="black"/>
                <path d="M 304,304 C 312.83064,304 320,296.83064 320,288" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="224,96 212,90.4 212,101.6" fill="black" transform="rotate(0,216,96)"/>
                <polygon class="arrowhead" points="136,96 124,90.4 124,101.6" fill="black" transform="rotate(180,128,96)"/>
                <g class="text">
                  <text x="64" y="68">Authorization</text>
                  <text x="276" y="68">Resource</text>
                  <text x="60" y="84">Server</text>
                  <text x="276" y="84">Server</text>
                  <text x="172" y="164">Client</text>
                  <text x="172" y="180">Instance</text>
                  <text x="60" y="260">Resource</text>
                  <text x="264" y="260">End</text>
                  <text x="56" y="276">Owner</text>
                  <text x="120" y="276">~</text>
                  <text x="136" y="276">~</text>
                  <text x="152" y="276">~</text>
                  <text x="168" y="276">~</text>
                  <text x="184" y="276">~</text>
                  <text x="200" y="276">~</text>
                  <text x="268" y="276">User</text>
                  <text x="28" y="340">Legend:</text>
                  <text x="88" y="372">indicates</text>
                  <text x="176" y="372">interaction</text>
                  <text x="256" y="372">between</text>
                  <text x="296" y="372">a</text>
                  <text x="328" y="372">human</text>
                  <text x="368" y="372">and</text>
                  <text x="420" y="372">computer</text>
                  <text x="88" y="388">indicates</text>
                  <text x="176" y="388">interaction</text>
                  <text x="256" y="388">between</text>
                  <text x="304" y="388">two</text>
                  <text x="348" y="388">pieces</text>
                  <text x="388" y="388">of</text>
                  <text x="436" y="388">software</text>
                  <text x="8" y="404">~</text>
                  <text x="24" y="404">~</text>
                  <text x="40" y="404">~</text>
                  <text x="88" y="404">indicates</text>
                  <text x="136" y="404">a</text>
                  <text x="184" y="404">potential</text>
                  <text x="272" y="404">equivalence</text>
                  <text x="332" y="404">or</text>
                  <text x="392" y="404">out-of-band</text>
                  <text x="136" y="420">communication</text>
                  <text x="224" y="420">between</text>
                  <text x="280" y="420">roles</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="left" pn="section-1.2-2.1.2">
+-------------+            +------------+
|             |            |            |
|Authorization|            |  Resource  |
|   Server    |            |   Server   |
|             |&lt;--+   +---&gt;|            |
+-----+-------+   |   |    +------------+
      ║           |   |
      ║        +--+---+---+
      ║        |  Client  |
      ║        | Instance |
      ║        +----+-----+
      ║             ║
 .----+----.        ║      .----------.
|           |       +=====+            |
|  Resource |             |    End     |
|   Owner   | ~ ~ ~ ~ ~ ~ |    User    |
|           |             |            |
 `---------`               `----------`

Legend:
===== indicates interaction between a human and computer
----- indicates interaction between two pieces of software
~ ~ ~ indicates a potential equivalence or out-of-band
        communication between roles
</artwork>
          </artset>
        </figure>
        <dl indent="3" newline="false" spacing="normal" pn="section-1.2-3">
          <dt pn="section-1.2-3.1">Authorization Server (AS):</dt>
          <dd pn="section-1.2-3.2">
            <t indent="0" pn="section-1.2-3.2.1">Server that grants delegated privileges to a particular instance of client software in the form of access tokens or other information (such as subject information). The AS is uniquely defined by the grant endpoint URI, which is the absolute URI where grant requests are started by clients.</t>
          </dd>
          <dt pn="section-1.2-3.3">Client:</dt>
          <dd pn="section-1.2-3.4">
            <t indent="0" pn="section-1.2-3.4.1">Application that consumes resources from one or several resource servers, possibly requiring access privileges from one or several ASes. The client is operated by the end user, or it runs autonomously on behalf of a resource owner.
</t>
            <t indent="0" pn="section-1.2-3.4.2">For example, a client can be a mobile application, a web application, a backend data processor, etc.</t>
            <t indent="0" pn="section-1.2-3.4.3">Note: This specification differentiates between a specific instance (the client instance, identified by its unique key) and the software running the instance (the client software). For some kinds of client software, there could be many instances of that software, each instance with a different key.</t>
          </dd>
          <dt pn="section-1.2-3.5">Resource Server (RS):</dt>
          <dd pn="section-1.2-3.6">
            <t indent="0" pn="section-1.2-3.6.1">Server that provides an API on protected resources, where operations on the API require a valid access token issued by a trusted AS.</t>
          </dd>
          <dt pn="section-1.2-3.7">Resource Owner (RO):</dt>
          <dd pn="section-1.2-3.8">
            <t indent="0" pn="section-1.2-3.8.1">Subject entity that may grant or deny operations on resources it has authority upon.
</t>
            <t indent="0" pn="section-1.2-3.8.2">Note: The act of granting or denying an operation may be manual (i.e., through an interaction with a physical person) or automatic (i.e., through predefined organizational rules).</t>
          </dd>
          <dt pn="section-1.2-3.9">End user:</dt>
          <dd pn="section-1.2-3.10">
            <t indent="0" pn="section-1.2-3.10.1">Natural person that operates a client instance.
</t>
            <t indent="0" pn="section-1.2-3.10.2">Note: That natural person may or may not be the same entity as the RO.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-1.2-4">The design of GNAP does not assume any one deployment architecture
but instead attempts to define roles that can be fulfilled in a number
of different ways for different use cases. As long as a given role fulfills
all of its obligations and behaviors as defined by the protocol, GNAP does
not make additional requirements on its structure or setup.</t>
        <t indent="0" pn="section-1.2-5">Multiple roles can be fulfilled by the same party, and a given party
can switch roles in different instances of the protocol. For example, in many instances,
the RO and end user are the same person, where a user
authorizes the client instance to act on their own behalf at the RS. In this case,
one party fulfills the roles of both RO and end user, but the roles themselves
are still defined separately from each other to allow for other
use cases where they are fulfilled by different parties.</t>
        <t indent="0" pn="section-1.2-6">As another example,
in some complex scenarios, an RS receiving requests from one client instance can act as
a client instance for a downstream secondary RS in order to fulfill the
original request. In this case, one piece of software is both an
RS and a client instance from different perspectives, and it fulfills these
roles separately as far as the overall protocol is concerned.</t>
        <t indent="0" pn="section-1.2-7">A single role need not be deployed as a monolithic service. For example,
a client instance could have frontend components that are installed on the end user's device as
well as a backend system that the frontend communicates with. If both of these
components participate in the delegation protocol, they are both considered
part of the client instance. If there are several copies of the client software
that run separately but all share the same key material, such as a
deployed cluster, then this cluster is considered a single client instance.
In these cases, the distinct components of what is considered a GNAP client instance
may use any number of different communication mechanisms between them, all of which
would be considered an implementation detail of the client instances and out of scope of GNAP.</t>
        <t indent="0" pn="section-1.2-8">As another example, an AS could likewise be built out of many constituent
components in a distributed architecture. The component that the client instance
calls directly could be different from the component that the
RO interacts with to drive consent, since API calls and user interaction
have different security considerations in many environments. Furthermore,
the AS could need to collect identity claims about the RO from one system
that deals with user attributes while generating access tokens at
another system that deals with security rights. From the perspective of
GNAP, all of these are pieces of the AS and together fulfill the
role of the AS as defined by the protocol. These pieces may have their own internal
communications mechanisms, which are considered out of scope of GNAP.</t>
      </section>
      <section anchor="elements" numbered="true" removeInRFC="false" toc="include" pn="section-1.3">
        <name slugifiedName="name-elements">Elements</name>
        <t indent="0" pn="section-1.3-1">In addition to the roles above, the protocol also involves several
elements that are acted upon by the roles throughout the process.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-1.3-2">
          <dt pn="section-1.3-2.1">Access Token:</dt>
          <dd pn="section-1.3-2.2">
            <t indent="0" pn="section-1.3-2.2.1">A data artifact representing a set of rights and/or attributes.
</t>
            <t indent="0" pn="section-1.3-2.2.2">Note: An access token can be first issued to a client instance (requiring authorization by the RO) and subsequently rotated.</t>
          </dd>
          <dt pn="section-1.3-2.3">Grant:</dt>
          <dd pn="section-1.3-2.4">
            <t indent="0" pn="section-1.3-2.4.1">(verb): To permit an instance of client software to receive some attributes at a specific time and with a specific duration of validity and/or to exercise some set of delegated rights to access a protected resource.</t>
          </dd>
          <dt pn="section-1.3-2.5"/>
          <dd pn="section-1.3-2.6">
            <t indent="0" pn="section-1.3-2.6.1">(noun): The act of granting permission to a client instance.</t>
          </dd>
          <dt pn="section-1.3-2.7">Privilege:</dt>
          <dd pn="section-1.3-2.8">
            <t indent="0" pn="section-1.3-2.8.1">Right or attribute associated with a subject.
</t>
            <t indent="0" pn="section-1.3-2.8.2">Note: The RO defines and maintains the rights and attributes associated to the protected resource and might temporarily delegate some set of those privileges to an end user. This process is referred to as "privilege delegation".</t>
          </dd>
          <dt pn="section-1.3-2.9">Protected Resource:</dt>
          <dd pn="section-1.3-2.10">
            <t indent="0" pn="section-1.3-2.10.1">Protected API that is served by an RS and that can be accessed by a client, if and only if a valid and sufficient access token is provided.
</t>
            <t indent="0" pn="section-1.3-2.10.2">Note: To avoid complex sentences, the specification document may simply refer to "resource" instead of "protected resource".</t>
          </dd>
          <dt pn="section-1.3-2.11">Right:</dt>
          <dd pn="section-1.3-2.12">
            <t indent="0" pn="section-1.3-2.12.1">Ability given to a subject to perform a given operation on a resource under the control of an RS.</t>
          </dd>
          <dt pn="section-1.3-2.13">Subject:</dt>
          <dd pn="section-1.3-2.14">
            <t indent="0" pn="section-1.3-2.14.1">Person or organization. The subject decides whether and under which conditions its attributes can be disclosed to other parties.</t>
          </dd>
          <dt pn="section-1.3-2.15">Subject Information:</dt>
          <dd pn="section-1.3-2.16">
            <t indent="0" pn="section-1.3-2.16.1">Set of statements and attributes asserted by an AS about a subject. These statements can be used by the client instance as part of an authentication decision.</t>
          </dd>
        </dl>
      </section>
      <section anchor="trust" numbered="true" removeInRFC="false" toc="include" pn="section-1.4">
        <name slugifiedName="name-trust-relationships">Trust Relationships</name>
        <t indent="0" pn="section-1.4-1">GNAP defines its trust objective as follows: the RO trusts the AS to ensure access validation and delegation of protected resources to end users, through third party clients.</t>
        <t indent="0" pn="section-1.4-2">This trust objective can be decomposed into trust relationships between software elements and roles, especially the pairs end user/RO, end user/client, client/AS, RS/RO, AS/RO, and AS/RS. Trust of an agent by its pair can exist if the pair is informed that the agent has made a promise to follow the protocol in the past (e.g., pre-registration and uncompromised cryptographic components) or if the pair is able to infer by indirect means that the agent has made such a promise (e.g., a compliant client request). Each agent defines its own valuation function of promises given or received. Examples of such valuations can be the benefits from interacting with other agents (e.g., safety in client access and interoperability with identity standards), the cost of following the protocol (including its security and privacy requirements and recommendations), a ranking of promise importance (e.g., a policy decision made by the AS), the assessment of one's vulnerability or risk of not being able to defend against threats, etc. Those valuations may depend on the context of the request. For instance, depending on the specific case in which GNAP is used, the AS may decide to either take into account or discard hints provided by the client, or the RS may refuse bearer tokens. Some promises can be affected by previous interactions (e.g., repeated requests).</t>
        <t indent="0" pn="section-1.4-3">Below are details of each trust relationship:</t>
        <dl spacing="normal" indent="3" newline="false" pn="section-1.4-4">
          <dt pn="section-1.4-4.1">end user/RO:</dt>
          <dd pn="section-1.4-4.2">This relationship exists only when the end user and the RO are different, in which case the end user needs some out-of-band mechanism of getting the RO consent (see <xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"/>). GNAP generally assumes that humans can be authenticated, thanks to identity protocols (for instance, through an id_token assertion as described in <xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"/>).</dd>
          <dt pn="section-1.4-4.3">end user/client:</dt>
          <dd pn="section-1.4-4.4">The client acts as a user agent. Depending on the technology used (browser, single-page application (SPA), mobile application, Internet of Things (IoT) device, etc.), some interactions may or may not be possible (as described in <xref target="request-interact-start" format="default" sectionFormat="of" derivedContent="Section 2.5.1"/>). Client developers implement requirements and generally some recommendations or best practices, so that the end users may confidently use their software. However, end users might also face an attacker's client software or a poorly implemented client without even realizing it.</dd>
          <dt pn="section-1.4-4.5">end user/AS:</dt>
          <dd pn="section-1.4-4.6">When the client supports the interaction feature (see <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/>), the end user interacts with the AS through an AS-provided interface. In many cases, this happens through a front-channel interaction through the end user's browser. See <xref target="security-front-channel" format="default" sectionFormat="of" derivedContent="Section 11.29"/> for some considerations in trusting these interactions.</dd>
          <dt pn="section-1.4-4.7">client/AS:</dt>
          <dd pn="section-1.4-4.8">An honest AS may face an attacker's client (as discussed just above), or the reverse, and GNAP aims to make common attacks impractical. This specification makes access tokens opaque to the client and defines the request/response scheme in detail, therefore avoiding extra trust hypotheses from this critical piece of software. Yet, the AS may further define cryptographic attestations or optional rules to simplify the access of clients it already trusts, due to past behavior or organizational policies (see <xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"/>).</dd>
          <dt pn="section-1.4-4.9">RS/RO:</dt>
          <dd pn="section-1.4-4.10">On behalf of the RO, the RS promises to protect its resources from unauthorized access and only accepts valid access tokens issued by a trusted AS. In case tokens are key bound, proper validation of the proofing method is expected from the RS.</dd>
          <dt pn="section-1.4-4.11">AS/RO:</dt>
          <dd pn="section-1.4-4.12">The AS is expected to follow the decisions made by the RO, through either interactive consent requests, repeated interactions, or automated rules (as described in <xref target="sequence" format="default" sectionFormat="of" derivedContent="Section 1.6"/>). Privacy considerations aim to reduce the risk of an honest but too-curious AS or the consequences of an unexpected user data exposure.</dd>
          <dt pn="section-1.4-4.13">AS/RS:</dt>
          <dd pn="section-1.4-4.14">The AS promises to issue valid access tokens to legitimate client requests (i.e., after carrying out appropriate due diligence, as defined in the GNAP). Some optional configurations are covered by <xref target="I-D.ietf-gnap-resource-servers" format="default" sectionFormat="of" derivedContent="GNAP-RS"/>.</dd>
        </dl>
        <t indent="0" pn="section-1.4-5">A global assumption made by GNAP is that authorization requests are security and privacy sensitive, and appropriate measures are detailed in Sections <xref target="security" format="counter" sectionFormat="of" derivedContent="11"/> and <xref target="privacy" format="counter" sectionFormat="of" derivedContent="12"/>, respectively.</t>
        <t indent="0" pn="section-1.4-6">A formal trust model is out of scope of this specification, but one could be developed using techniques such as the Promise Theory <xref target="promise-theory" format="default" sectionFormat="of" derivedContent="promise-theory"/>.</t>
      </section>
      <section anchor="protocol" numbered="true" removeInRFC="false" toc="include" pn="section-1.5">
        <name slugifiedName="name-protocol-flow">Protocol Flow</name>
        <t indent="0" pn="section-1.5-1">GNAP is fundamentally designed to allow delegated access to APIs and other information, such as subject information, using a multi-stage, stateful process. This process allows different parties to provide information into the system to alter and augment the state of the delegated access and its artifacts.</t>
        <t indent="0" pn="section-1.5-2">The underlying requested grant moves through several states as different actions take place during the protocol, as shown in <xref target="state-diagram" format="default" sectionFormat="of" derivedContent="Figure 2"/>.</t>
        <figure anchor="state-diagram" align="left" suppress-title="false" pn="figure-2">
          <name slugifiedName="name-state-diagram-of-a-grant-re">State Diagram of a Grant Request in GNAP</name>
          <artset pn="section-1.5-3.1">
            <artwork type="svg" align="left" pn="section-1.5-3.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="432" width="584" viewBox="0 0 584 432" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                <path d="M 112,192 L 112,256" fill="none" stroke="black"/>
                <path d="M 216,192 L 216,256" fill="none" stroke="black"/>
                <path d="M 378,192 L 378,256" fill="none" stroke="black"/>
                <path d="M 374,192 L 374,256" fill="none" stroke="black"/>
                <path d="M 376,320 L 376,384" fill="none" stroke="black"/>
                <path d="M 384,64 L 384,128" fill="none" stroke="black"/>
                <path d="M 424,128 L 424,176" fill="none" stroke="black"/>
                <path d="M 424,272 L 424,320" fill="none" stroke="black"/>
                <path d="M 440,48 L 440,64" fill="none" stroke="black"/>
                <path d="M 440,384 L 440,400" fill="none" stroke="black"/>
                <path d="M 464,64 L 464,128" fill="none" stroke="black"/>
                <path d="M 464,320 L 464,384" fill="none" stroke="black"/>
                <path d="M 474,192 L 474,256" fill="none" stroke="black"/>
                <path d="M 470,192 L 470,256" fill="none" stroke="black"/>
                <path d="M 504,48 L 504,80" fill="none" stroke="black"/>
                <path d="M 504,368 L 504,400" fill="none" stroke="black"/>
                <path d="M 456,32 L 488,32" fill="none" stroke="black"/>
                <path d="M 384,64 L 464,64" fill="none" stroke="black"/>
                <path d="M 184,80 L 208,80" fill="none" stroke="black"/>
                <path d="M 344,80 L 376,80" fill="none" stroke="black"/>
                <path d="M 472,96 L 488,96" fill="none" stroke="black"/>
                <path d="M 200,112 L 216,112" fill="none" stroke="black"/>
                <path d="M 368,112 L 384,112" fill="none" stroke="black"/>
                <path d="M 384,128 L 464,128" fill="none" stroke="black"/>
                <path d="M 112,192 L 216,192" fill="none" stroke="black"/>
                <path d="M 376,190 L 472,190" fill="none" stroke="black"/>
                <path d="M 376,194 L 472,194" fill="none" stroke="black"/>
                <path d="M 8,224 L 24,224" fill="none" stroke="black"/>
                <path d="M 88,224 L 104,224" fill="none" stroke="black"/>
                <path d="M 216,224 L 264,224" fill="none" stroke="black"/>
                <path d="M 336,224 L 368,224" fill="none" stroke="black"/>
                <path d="M 112,256 L 216,256" fill="none" stroke="black"/>
                <path d="M 376,254 L 472,254" fill="none" stroke="black"/>
                <path d="M 376,258 L 472,258" fill="none" stroke="black"/>
                <path d="M 376,320 L 464,320" fill="none" stroke="black"/>
                <path d="M 208,336 L 248,336" fill="none" stroke="black"/>
                <path d="M 304,336 L 376,336" fill="none" stroke="black"/>
                <path d="M 472,352 L 488,352" fill="none" stroke="black"/>
                <path d="M 184,368 L 224,368" fill="none" stroke="black"/>
                <path d="M 344,368 L 368,368" fill="none" stroke="black"/>
                <path d="M 376,384 L 464,384" fill="none" stroke="black"/>
                <path d="M 456,416 L 488,416" fill="none" stroke="black"/>
                <path d="M 128,256 L 184,368" fill="none" stroke="black"/>
                <path d="M 172,264 L 208,336" fill="none" stroke="black"/>
                <path d="M 128,192 L 184,80" fill="none" stroke="black"/>
                <path d="M 164,184 L 200,112" fill="none" stroke="black"/>
                <path d="M 456,32 C 447.16936,32 440,39.16936 440,48" fill="none" stroke="black"/>
                <path d="M 488,32 C 496.83064,32 504,39.16936 504,48" fill="none" stroke="black"/>
                <path d="M 488,96 C 496.83064,96 504,88.83064 504,80" fill="none" stroke="black"/>
                <path d="M 488,352 C 496.83064,352 504,359.16936 504,368" fill="none" stroke="black"/>
                <path d="M 456,416 C 447.16936,416 440,408.83064 440,400" fill="none" stroke="black"/>
                <path d="M 488,416 C 496.83064,416 504,408.83064 504,400" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="480,352 468,346.4 468,357.6" fill="black" transform="rotate(180,472,352)"/>
                <polygon class="arrowhead" points="480,96 468,90.4 468,101.6" fill="black" transform="rotate(180,472,96)"/>
                <polygon class="arrowhead" points="432,272 420,266.4 420,277.6" fill="black" transform="rotate(270,424,272)"/>
                <polygon class="arrowhead" points="432,176 420,170.4 420,181.6" fill="black" transform="rotate(90,424,176)"/>
                <polygon class="arrowhead" points="384,80 372,74.4 372,85.6" fill="black" transform="rotate(0,376,80)"/>
                <polygon class="arrowhead" points="376,368 364,362.4 364,373.6" fill="black" transform="rotate(0,368,368)"/>
                <polygon class="arrowhead" points="376,224 364,218.4 364,229.6" fill="black" transform="rotate(0,368,224)"/>
                <polygon class="arrowhead" points="180,264 168,258.4 168,269.6" fill="black" transform="rotate(243.43494882292202,172,264)"/>
                <polygon class="arrowhead" points="172,184 160,178.4 160,189.6" fill="black" transform="rotate(116.56505117707799,164,184)"/>
                <polygon class="arrowhead" points="112,224 100,218.4 100,229.6" fill="black" transform="rotate(0,104,224)"/>
                <g class="text">
                  <text x="548" y="68">Continue</text>
                  <text x="228" y="84">Need</text>
                  <text x="296" y="84">Interaction</text>
                  <text x="424" y="100">Pending</text>
                  <text x="244" y="116">Finish</text>
                  <text x="320" y="116">Interaction</text>
                  <text x="292" y="132">(approve/deny)</text>
                  <text x="460" y="164">Cancel</text>
                  <text x="56" y="228">Request</text>
                  <text x="164" y="228">Processing</text>
                  <text x="300" y="228">Finalize</text>
                  <text x="424" y="228">Finalized</text>
                  <text x="460" y="292">Revoke</text>
                  <text x="500" y="292">or</text>
                  <text x="468" y="308">Finalize</text>
                  <text x="276" y="340">Update</text>
                  <text x="420" y="356">Approved</text>
                  <text x="236" y="372">No</text>
                  <text x="296" y="372">Interaction</text>
                  <text x="548" y="388">Continue</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="left" pn="section-1.5-3.1.2">
                                                       .-----.
                                                      |       |
                                               +------+--+    | Continue
                      .---Need Interaction----&gt;|         |    |
                     /                         | Pending |&lt;--`
                    /   .--Finish Interaction--+         |
                   /   /     (approve/deny)    +----+----+
                  /   /                             |
                 /   /                              | Cancel
                /   v                               v
             +-+----------+                   +===========+
             |            |                   ║           ║
---Request--&gt;| Processing +------Finalize----&gt;║ Finalized ║
             |            |                   ║           ║
             +-+----------+                   +===========+
                \    ^                              ^
                 \    \                             | Revoke or
                  \    \                            | Finalize
                   \    \                     +-----+----+
                    \    `-----Update---------+          |
                     \                        | Approved |&lt;--.
                      `-----No Interaction---&gt;|          |    |
                                              +-------+--+    | Continue
                                                      |       |
                                                       `-----`
</artwork>
          </artset>
        </figure>
        <t indent="0" pn="section-1.5-4">The state of the grant request is defined and managed by the AS, though the client instance also needs to manage its view of the grant request over time. The means by which these roles manage their state are outside the scope of this specification.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-1.5-5">
          <dt pn="section-1.5-5.1"><em>Processing</em>:</dt>
          <dd pn="section-1.5-5.2">When a request for access (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>) is received by the AS, a new grant request is created and placed in the <em>processing</em> state by the AS. This state is also entered when an existing grant request is updated by the client instance and when interaction is completed. In this state, the AS processes the context of the grant request to determine whether interaction with the end user or RO is required for approval of the request. The grant request has to exit this state before a response can be returned to the client instance. If approval is required, the request moves to the <em>pending</em> state, and the AS returns a continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) along with any appropriate interaction responses (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>). If no such approval is required, such as when the client instance is acting on its own behalf or the AS can determine that access has been fulfilled, the request moves to the <em>approved</em> state where access tokens for API access (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) and subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) can be issued to the client instance. If the AS determines that no additional processing can occur (such as a timeout or an unrecoverable error), the grant request is moved to the <em>finalized</em> state and is terminated.</dd>
          <dt pn="section-1.5-5.3"><em>Pending</em>:</dt>
          <dd pn="section-1.5-5.4">When a request needs to be approved by an RO, or interaction with the end user is required, the grant request enters a state of <em>pending</em>. In this state, no access tokens can be granted, and no subject information can be released to the client instance. While a grant request is in this state, the AS seeks to gather the required consent and authorization (<xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"> </xref>) for the requested access. A grant request in this state is always associated with a continuation access token bound to the client instance's key (see <xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"/> for details of the continuation access token). If no interaction finish method (<xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"> </xref>) is associated with this request, the client instance can send a polling continuation request (<xref target="continue-poll" format="default" sectionFormat="of" derivedContent="Section 5.2"> </xref>) to the AS. This returns a continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) while the grant request remains in this state, allowing the client instance to continue to check the state of the pending grant request. If an interaction finish method (<xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"> </xref>) is specified in the grant request, the client instance can continue the request after interaction (<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"> </xref>) to the AS to move this request to the <em>processing</em> state to be re-evaluated by the AS. Note that this occurs whether the grant request has been approved or denied by the RO, since the AS needs to take into account the full context of the request before determining the next step for the grant request. When other information is made available in the context of the grant request, such as through the asynchronous actions of the RO, the AS moves this request to the <em>processing</em> state to be re-evaluated. If the AS determines that no additional interaction can occur, e.g., all the interaction methods have timed out or a revocation request (<xref target="continue-delete" format="default" sectionFormat="of" derivedContent="Section 5.4"> </xref>) is received from the client instance, the grant request can be moved to the <em>finalized</em> state.</dd>
          <dt pn="section-1.5-5.5"><em>Approved</em>:</dt>
          <dd pn="section-1.5-5.6">When a request has been approved by an RO and no further interaction with the end user is required, the grant request enters a state of <em>approved</em>. In this state, responses to the client instance can include access tokens for API access (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) and subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>). If continuation and updates are allowed for this grant request, the AS can include the continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>). In this state, post-interaction continuation requests (<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"> </xref>) are not allowed and will result in an error, since all interaction is assumed to have been completed. If the client instance sends a polling continuation request (<xref target="continue-poll" format="default" sectionFormat="of" derivedContent="Section 5.2"> </xref>) while the request is in this state, new access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) can be issued in the response. Note that this always creates a new access token, but any existing access tokens could be rotated and revoked using the token management API (<xref target="token-management" format="default" sectionFormat="of" derivedContent="Section 6"> </xref>). The client instance can send an update continuation request (<xref target="continue-modify" format="default" sectionFormat="of" derivedContent="Section 5.3"> </xref>) to modify the requested access, causing the AS to move the request back to the <em>processing</em> state for re-evaluation. If the AS determines that no additional tokens can be issued and that no additional updates are to be accepted (e.g., the continuation access tokens have expired), the grant is moved to the <em>finalized</em> state.</dd>
          <dt pn="section-1.5-5.7"><em>Finalized</em>:</dt>
          <dd pn="section-1.5-5.8">After the access tokens are issued, if the AS does not allow any additional updates on the grant request, the grant request enters the <em>finalized</em> state. This state is also entered when an existing grant request is revoked by the client instance (<xref target="continue-delete" format="default" sectionFormat="of" derivedContent="Section 5.4"> </xref>) or otherwise revoked by the AS (such as through out-of-band action by the RO). This state can also be entered if the AS determines that no additional processing is possible, for example, if the RO has denied the requested access or if interaction is required but no compatible interaction methods are available. Once in this state, no new access tokens can be issued, no subject information can be returned, and no interactions can take place. Once in this state, the grant request is dead and cannot be revived. If future access is desired by the client instance, a new grant request can be created, unrelated to this grant request.</dd>
        </dl>
        <t indent="0" pn="section-1.5-6">While it is possible to deploy an AS in a stateless environment, GNAP is a stateful protocol, and such deployments will need a way to manage the current state of the grant request in a secure and deterministic fashion without relying on other components, such as the client software, to keep track of the current state.</t>
      </section>
      <section anchor="sequence" numbered="true" removeInRFC="false" toc="include" pn="section-1.6">
        <name slugifiedName="name-sequences">Sequences</name>
        <t indent="0" pn="section-1.6-1">GNAP can be used in a variety of ways to allow the core
delegation process to take place. Many portions of this process are
conditionally present depending on the context of the deployments,
and not every step in this overview will happen in all circumstances.</t>
        <t indent="0" pn="section-1.6-2">Note that a connection between roles in this process does not necessarily
indicate that a specific protocol message is sent across the wire
between the components fulfilling the roles in question or that a
particular step is required every time. For example, for a client instance interested
in only getting subject information directly and not calling an RS,
all steps involving the RS below do not apply.</t>
        <t indent="0" pn="section-1.6-3">In some circumstances,
the information needed at a given stage is communicated out of band
or is pre-configured between the components or entities performing
the roles. For example, one entity can fulfill multiple roles, so
explicit communication between the roles is not necessary within the
protocol flow. Additionally, some components may not be involved
in all use cases. For example, a client instance could be calling the
AS just to get direct user information and have no need to get
an access token to call an RS.</t>
        <section anchor="sequence-overall" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.1">
          <name slugifiedName="name-overall-protocol-sequence">Overall Protocol Sequence</name>
          <t indent="0" pn="section-1.6.1-1">The following diagram provides a general overview of GNAP, including many
different optional phases and connections. The diagrams in the following sections
provide views of GNAP under more specific circumstances. These additional diagrams
use the same conventions as the overall diagram below.</t>
          <figure align="left" suppress-title="false" pn="figure-3">
            <name slugifiedName="name-overall-sequence-of-gnap">Overall Sequence of GNAP</name>
            <artset pn="section-1.6.1-2.1">
              <artwork type="svg" align="left" pn="section-1.6.1-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="624" width="456" viewBox="0 0 456 624" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,48 L 8,64" fill="none" stroke="black"/>
                  <path d="M 8,176 L 8,512" fill="none" stroke="black"/>
                  <path d="M 58,80 L 58,112" fill="none" stroke="black"/>
                  <path d="M 54,80 L 54,112" fill="none" stroke="black"/>
                  <path d="M 58,144 L 58,176" fill="none" stroke="black"/>
                  <path d="M 54,144 L 54,176" fill="none" stroke="black"/>
                  <path d="M 80,176 L 80,512" fill="none" stroke="black"/>
                  <path d="M 112,48 L 112,64" fill="none" stroke="black"/>
                  <path d="M 152,224 L 152,328" fill="none" stroke="black"/>
                  <path d="M 152,376 L 152,440" fill="none" stroke="black"/>
                  <path d="M 152,456 L 152,512" fill="none" stroke="black"/>
                  <path d="M 192,48 L 192,64" fill="none" stroke="black"/>
                  <path d="M 250,80 L 250,112" fill="none" stroke="black"/>
                  <path d="M 246,80 L 246,112" fill="none" stroke="black"/>
                  <path d="M 250,144 L 250,224" fill="none" stroke="black"/>
                  <path d="M 246,144 L 246,224" fill="none" stroke="black"/>
                  <path d="M 280,224 L 280,328" fill="none" stroke="black"/>
                  <path d="M 280,376 L 280,440" fill="none" stroke="black"/>
                  <path d="M 280,456 L 280,512" fill="none" stroke="black"/>
                  <path d="M 296,48 L 296,64" fill="none" stroke="black"/>
                  <path d="M 344,176 L 344,512" fill="none" stroke="black"/>
                  <path d="M 448,176 L 448,512" fill="none" stroke="black"/>
                  <path d="M 24,32 L 96,32" fill="none" stroke="black"/>
                  <path d="M 208,32 L 280,32" fill="none" stroke="black"/>
                  <path d="M 24,80 L 96,80" fill="none" stroke="black"/>
                  <path d="M 208,80 L 280,80" fill="none" stroke="black"/>
                  <path d="M 8,176 L 80,176" fill="none" stroke="black"/>
                  <path d="M 344,176 L 448,176" fill="none" stroke="black"/>
                  <path d="M 152,224 L 280,224" fill="none" stroke="black"/>
                  <path d="M 80,240 L 104,240" fill="none" stroke="black"/>
                  <path d="M 120,240 L 144,240" fill="none" stroke="black"/>
                  <path d="M 88,256 L 104,256" fill="none" stroke="black"/>
                  <path d="M 120,256 L 152,256" fill="none" stroke="black"/>
                  <path d="M 80,288 L 104,288" fill="none" stroke="black"/>
                  <path d="M 120,288 L 144,288" fill="none" stroke="black"/>
                  <path d="M 88,304 L 104,304" fill="none" stroke="black"/>
                  <path d="M 120,304 L 152,304" fill="none" stroke="black"/>
                  <path d="M 80,336 L 208,336" fill="none" stroke="black"/>
                  <path d="M 224,336 L 336,336" fill="none" stroke="black"/>
                  <path d="M 88,368 L 208,368" fill="none" stroke="black"/>
                  <path d="M 224,368 L 336,368" fill="none" stroke="black"/>
                  <path d="M 80,400 L 104,400" fill="none" stroke="black"/>
                  <path d="M 120,400 L 144,400" fill="none" stroke="black"/>
                  <path d="M 88,416 L 104,416" fill="none" stroke="black"/>
                  <path d="M 128,416 L 152,416" fill="none" stroke="black"/>
                  <path d="M 80,448 L 208,448" fill="none" stroke="black"/>
                  <path d="M 232,448 L 336,448" fill="none" stroke="black"/>
                  <path d="M 80,480 L 104,480" fill="none" stroke="black"/>
                  <path d="M 128,480 L 144,480" fill="none" stroke="black"/>
                  <path d="M 8,512 L 80,512" fill="none" stroke="black"/>
                  <path d="M 152,512 L 280,512" fill="none" stroke="black"/>
                  <path d="M 344,512 L 448,512" fill="none" stroke="black"/>
                  <path d="M 8,558 L 40,558" fill="none" stroke="black"/>
                  <path d="M 8,562 L 40,562" fill="none" stroke="black"/>
                  <path d="M 8,576 L 40,576" fill="none" stroke="black"/>
                  <path d="M 24,32 C 15.16936,32 8,39.16936 8,48" fill="none" stroke="black"/>
                  <path d="M 96,32 C 104.83064,32 112,39.16936 112,48" fill="none" stroke="black"/>
                  <path d="M 208,32 C 199.16936,32 192,39.16936 192,48" fill="none" stroke="black"/>
                  <path d="M 280,32 C 288.83064,32 296,39.16936 296,48" fill="none" stroke="black"/>
                  <path d="M 24,80 C 15.16936,80 8,72.83064 8,64" fill="none" stroke="black"/>
                  <path d="M 96,80 C 104.83064,80 112,72.83064 112,64" fill="none" stroke="black"/>
                  <path d="M 208,80 C 199.16936,80 192,72.83064 192,64" fill="none" stroke="black"/>
                  <path d="M 280,80 C 288.83064,80 296,72.83064 296,64" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="344,448 332,442.4 332,453.6" fill="black" transform="rotate(0,336,448)"/>
                  <polygon class="arrowhead" points="344,368 332,362.4 332,373.6" fill="black" transform="rotate(0,336,368)"/>
                  <polygon class="arrowhead" points="344,336 332,330.4 332,341.6" fill="black" transform="rotate(0,336,336)"/>
                  <polygon class="arrowhead" points="152,480 140,474.4 140,485.6" fill="black" transform="rotate(0,144,480)"/>
                  <polygon class="arrowhead" points="152,400 140,394.4 140,405.6" fill="black" transform="rotate(0,144,400)"/>
                  <polygon class="arrowhead" points="152,288 140,282.4 140,293.6" fill="black" transform="rotate(0,144,288)"/>
                  <polygon class="arrowhead" points="152,240 140,234.4 140,245.6" fill="black" transform="rotate(0,144,240)"/>
                  <polygon class="arrowhead" points="96,416 84,410.4 84,421.6" fill="black" transform="rotate(180,88,416)"/>
                  <polygon class="arrowhead" points="96,368 84,362.4 84,373.6" fill="black" transform="rotate(180,88,368)"/>
                  <polygon class="arrowhead" points="96,304 84,298.4 84,309.6" fill="black" transform="rotate(180,88,304)"/>
                  <polygon class="arrowhead" points="96,256 84,250.4 84,261.6" fill="black" transform="rotate(180,88,256)"/>
                  <g class="text">
                    <text x="40" y="52">End</text>
                    <text x="76" y="52">User</text>
                    <text x="128" y="52">~</text>
                    <text x="144" y="52">~</text>
                    <text x="160" y="52">~</text>
                    <text x="176" y="52">~</text>
                    <text x="244" y="52">Resource</text>
                    <text x="224" y="68">Owner</text>
                    <text x="268" y="68">(RO)</text>
                    <text x="56" y="132">A</text>
                    <text x="248" y="132">B</text>
                    <text x="44" y="196">Client</text>
                    <text x="104" y="196">(1)</text>
                    <text x="396" y="196">Resource</text>
                    <text x="44" y="212">Instance</text>
                    <text x="396" y="212">Server</text>
                    <text x="396" y="228">(RS)</text>
                    <text x="112" y="244">2</text>
                    <text x="216" y="244">Authorization</text>
                    <text x="112" y="260">3</text>
                    <text x="220" y="260">Server</text>
                    <text x="220" y="276">(AS)</text>
                    <text x="112" y="292">4</text>
                    <text x="112" y="308">5</text>
                    <text x="216" y="340">6</text>
                    <text x="152" y="356">|</text>
                    <text x="280" y="356">|</text>
                    <text x="320" y="356">(7)</text>
                    <text x="216" y="372">8</text>
                    <text x="112" y="404">9</text>
                    <text x="116" y="420">10</text>
                    <text x="220" y="452">11</text>
                    <text x="316" y="468">(12)</text>
                    <text x="116" y="484">13</text>
                    <text x="28" y="548">Legend:</text>
                    <text x="88" y="564">indicates</text>
                    <text x="136" y="564">a</text>
                    <text x="180" y="564">possible</text>
                    <text x="264" y="564">interaction</text>
                    <text x="332" y="564">with</text>
                    <text x="360" y="564">a</text>
                    <text x="392" y="564">human</text>
                    <text x="88" y="580">indicates</text>
                    <text x="140" y="580">an</text>
                    <text x="200" y="580">interaction</text>
                    <text x="280" y="580">between</text>
                    <text x="348" y="580">protocol</text>
                    <text x="408" y="580">roles</text>
                    <text x="8" y="596">~</text>
                    <text x="24" y="596">~</text>
                    <text x="40" y="596">~</text>
                    <text x="88" y="596">indicates</text>
                    <text x="136" y="596">a</text>
                    <text x="184" y="596">potential</text>
                    <text x="272" y="596">equivalence</text>
                    <text x="332" y="596">or</text>
                    <text x="392" y="596">out-of-band</text>
                    <text x="120" y="612">communication</text>
                    <text x="208" y="612">between</text>
                    <text x="264" y="612">roles</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.1-2.1.2">
 .----------.           .----------.
|  End user  | ~ ~ ~ ~ |  Resource  |
|            |         | Owner (RO) |
 `----+-----`           `-----+----`
      ║                       ║
      ║                       ║
     (A)                     (B)
      ║                       ║
      ║                       ║
+-----+--+                    ║           +------------+
| Client | (1)                ║           |  Resource  |
|Instance|                    ║           |   Server   |
|        |        +-----------+---+       |    (RS)    |
|        +--(2)--&gt;| Authorization |       |            |
|        |&lt;-(3)---+     Server    |       |            |
|        |        |      (AS)     |       |            |
|        +--(4)--&gt;|               |       |            |
|        |&lt;-(5)---+               |       |            |
|        |        |               |       |            |
|        +---------------(6)-------------&gt;|            |
|        |        |               |   (7) |            |
|        |&lt;--------------(8)-------------&gt;|            |
|        |        |               |       |            |
|        +--(9)--&gt;|               |       |            |
|        |&lt;-(10)--+               |       |            |
|        |        |               |       |            |
|        +---------------(11)------------&gt;|            |
|        |        |               |  (12) |            |
|        +--(13)-&gt;|               |       |            |
|        |        |               |       |            |
+--------+        +---------------+       +------------+

Legend:
===== indicates a possible interaction with a human
----- indicates an interaction between protocol roles
~ ~ ~ indicates a potential equivalence or out-of-band
        communication between roles
</artwork>
            </artset>
          </figure>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.1-3">
            <li pn="section-1.6.1-3.1">(A) The end user interacts with the client instance to indicate a need for resources on
  behalf of the RO. This could identify the RS that the client instance needs to call,
  the resources needed, or the RO that is needed to approve the
  request. Note that the RO and end user are often
  the same entity in practice, but GNAP makes no general assumption that they are.
            </li>
            <li pn="section-1.6.1-3.2">
              <t indent="0" pn="section-1.6.1-3.2.1">(1) The client instance determines what access is needed and which AS to approach for access. Note that
  for most situations, the client instance is pre-configured with which AS to talk to and which
  kinds of access it needs, but some more dynamic processes are discussed in
  <xref target="rs-request-without-token" format="default" sectionFormat="of" derivedContent="Section 9.1"/>.</t>
            </li>
            <li pn="section-1.6.1-3.3">
              <t indent="0" pn="section-1.6.1-3.3.1">(2) The client instance requests access at the AS (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>).</t>
            </li>
            <li pn="section-1.6.1-3.4">
              <t indent="0" pn="section-1.6.1-3.4.1">(3) The AS processes the request and determines what is needed to fulfill
  the request (see <xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"/>).
  The AS sends its response to the client instance (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>).</t>
            </li>
            <li pn="section-1.6.1-3.5">
              <t indent="0" pn="section-1.6.1-3.5.1">(B) If interaction is required, the
  AS interacts with the RO (<xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"> </xref>) to gather authorization.
  The interactive component of the AS can function
  using a variety of possible mechanisms, including web page
  redirects, applications, challenge/response protocols, or
  other methods. The RO approves the request for the client instance
  being operated by the end user. Note that the RO and end user are often
  the same entity in practice, and many of GNAP's interaction methods allow
  the client instance to facilitate the end user interacting with the AS
  in order to fulfill the role of the RO.</t>
            </li>
            <li pn="section-1.6.1-3.6">
              <t indent="0" pn="section-1.6.1-3.6.1">(4) The client instance continues the grant at the AS (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>). This action could
  occur in response to receiving a signal that interaction has finished (<xref target="interaction-finish" format="default" sectionFormat="of" derivedContent="Section 4.2"> </xref>) or
  through a periodic polling mechanism, depending on the interaction capabilities of the client
  software and the options active in the grant request.</t>
            </li>
            <li pn="section-1.6.1-3.7">
              <t indent="0" pn="section-1.6.1-3.7.1">(5) If the AS determines that access can be granted, it returns a
  response to the client instance (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>), including an access token (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) for
  calling the RS and any directly returned information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) about the RO.</t>
            </li>
            <li pn="section-1.6.1-3.8">
              <t indent="0" pn="section-1.6.1-3.8.1">(6) The client instance uses the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) to call the RS.</t>
            </li>
            <li pn="section-1.6.1-3.9">
              <t indent="0" pn="section-1.6.1-3.9.1">(7) The RS determines if the token is sufficient for the request by
  examining the token. The means of the RS determining this access are
  out of scope of this specification, but some options are discussed in
  <xref target="I-D.ietf-gnap-resource-servers" format="default" sectionFormat="of" derivedContent="GNAP-RS"/>.</t>
            </li>
            <li pn="section-1.6.1-3.10">
              <t indent="0" pn="section-1.6.1-3.10.1">(8) The client instance calls the RS (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) using the access token
  until the RS or client instance determines that the token is no longer valid.</t>
            </li>
            <li pn="section-1.6.1-3.11">
              <t indent="0" pn="section-1.6.1-3.11.1">(9) When the token no longer works, the client instance
  rotates the access token (<xref target="rotate-access-token" format="default" sectionFormat="of" derivedContent="Section 6.1"> </xref>).</t>
            </li>
            <li pn="section-1.6.1-3.12">
              <t indent="0" pn="section-1.6.1-3.12.1">(10) The AS issues a new access token (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) to the client instance
  with the same rights as the original access token returned in (5).</t>
            </li>
            <li pn="section-1.6.1-3.13">
              <t indent="0" pn="section-1.6.1-3.13.1">(11) The client instance uses the new access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) to call the RS.</t>
            </li>
            <li pn="section-1.6.1-3.14">
              <t indent="0" pn="section-1.6.1-3.14.1">(12) The RS determines if the new token is sufficient for the request, as in (7).</t>
            </li>
            <li pn="section-1.6.1-3.15">
              <t indent="0" pn="section-1.6.1-3.15.1">(13) The client instance disposes of the token (<xref target="revoke-access-token" format="default" sectionFormat="of" derivedContent="Section 6.2"> </xref>) once the client instance
  has completed its access of the RS and no longer needs the token.</t>
            </li>
          </ul>
          <t indent="0" pn="section-1.6.1-4">The following sections and <xref target="examples" format="default" sectionFormat="of" derivedContent="Appendix B"/> contain specific guidance on how to use
GNAP in different situations and deployments. For example, it is possible for the
client instance to never request an access token and never call an RS, just as it is
possible to have no end user involved in the delegation process.</t>
        </section>
        <section anchor="sequence-redirect" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.2">
          <name slugifiedName="name-redirect-based-interaction">Redirect-Based Interaction</name>
          <t indent="0" pn="section-1.6.2-1">In this example flow, the client instance is a web application that wants access to resources on behalf
of the current user, who acts as both the end user and the RO. Since the client instance is capable of directing the user to an arbitrary URI and
receiving responses from the user's browser, interaction here is handled through
front-channel redirects using the user's browser. The redirection URI used for interaction is
a service hosted by the AS in this example. The client instance uses a persistent session
with the user to ensure the same user that is starting the interaction is the user
that returns from the interaction.</t>
          <figure align="left" suppress-title="false" pn="figure-4">
            <name slugifiedName="name-diagram-of-a-redirect-based">Diagram of a Redirect-Based Interaction</name>
            <artset pn="section-1.6.2-2.1">
              <artwork type="svg" align="left" pn="section-1.6.2-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="496" width="576" viewBox="0 0 576 496" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,32 L 8,480" fill="none" stroke="black"/>
                  <path d="M 80,32 L 80,480" fill="none" stroke="black"/>
                  <path d="M 360,32 L 360,64" fill="none" stroke="black"/>
                  <path d="M 360,96 L 360,160" fill="none" stroke="black"/>
                  <path d="M 360,192 L 360,288" fill="none" stroke="black"/>
                  <path d="M 360,320 L 360,408" fill="none" stroke="black"/>
                  <path d="M 360,456 L 360,480" fill="none" stroke="black"/>
                  <path d="M 432,32 L 432,64" fill="none" stroke="black"/>
                  <path d="M 432,96 L 432,160" fill="none" stroke="black"/>
                  <path d="M 432,192 L 432,288" fill="none" stroke="black"/>
                  <path d="M 432,320 L 432,408" fill="none" stroke="black"/>
                  <path d="M 432,456 L 432,480" fill="none" stroke="black"/>
                  <path d="M 480,400 L 480,464" fill="none" stroke="black"/>
                  <path d="M 512,48 L 512,304" fill="none" stroke="black"/>
                  <path d="M 552,400 L 552,464" fill="none" stroke="black"/>
                  <path d="M 568,48 L 568,304" fill="none" stroke="black"/>
                  <path d="M 8,32 L 80,32" fill="none" stroke="black"/>
                  <path d="M 360,32 L 432,32" fill="none" stroke="black"/>
                  <path d="M 528,32 L 552,32" fill="none" stroke="black"/>
                  <path d="M 88,78 L 104,78" fill="none" stroke="black"/>
                  <path d="M 88,82 L 104,82" fill="none" stroke="black"/>
                  <path d="M 120,78 L 136,78" fill="none" stroke="black"/>
                  <path d="M 120,82 L 136,82" fill="none" stroke="black"/>
                  <path d="M 264,78 L 512,78" fill="none" stroke="black"/>
                  <path d="M 264,82 L 512,82" fill="none" stroke="black"/>
                  <path d="M 80,112 L 104,112" fill="none" stroke="black"/>
                  <path d="M 120,112 L 144,112" fill="none" stroke="black"/>
                  <path d="M 280,112 L 352,112" fill="none" stroke="black"/>
                  <path d="M 88,144 L 104,144" fill="none" stroke="black"/>
                  <path d="M 120,144 L 136,144" fill="none" stroke="black"/>
                  <path d="M 304,144 L 360,144" fill="none" stroke="black"/>
                  <path d="M 80,174 L 104,174" fill="none" stroke="black"/>
                  <path d="M 80,178 L 104,178" fill="none" stroke="black"/>
                  <path d="M 120,174 L 136,174" fill="none" stroke="black"/>
                  <path d="M 120,178 L 136,178" fill="none" stroke="black"/>
                  <path d="M 352,174 L 504,174" fill="none" stroke="black"/>
                  <path d="M 352,178 L 504,178" fill="none" stroke="black"/>
                  <path d="M 512,192 L 568,192" fill="none" stroke="black"/>
                  <path d="M 440,206 L 464,206" fill="none" stroke="black"/>
                  <path d="M 440,210 L 464,210" fill="none" stroke="black"/>
                  <path d="M 480,206 L 504,206" fill="none" stroke="black"/>
                  <path d="M 480,210 L 504,210" fill="none" stroke="black"/>
                  <path d="M 440,254 L 464,254" fill="none" stroke="black"/>
                  <path d="M 440,258 L 464,258" fill="none" stroke="black"/>
                  <path d="M 480,254 L 504,254" fill="none" stroke="black"/>
                  <path d="M 480,258 L 504,258" fill="none" stroke="black"/>
                  <path d="M 512,272 L 568,272" fill="none" stroke="black"/>
                  <path d="M 88,302 L 104,302" fill="none" stroke="black"/>
                  <path d="M 88,306 L 104,306" fill="none" stroke="black"/>
                  <path d="M 120,302 L 136,302" fill="none" stroke="black"/>
                  <path d="M 120,306 L 136,306" fill="none" stroke="black"/>
                  <path d="M 360,302 L 512,302" fill="none" stroke="black"/>
                  <path d="M 360,306 L 512,306" fill="none" stroke="black"/>
                  <path d="M 528,320 L 552,320" fill="none" stroke="black"/>
                  <path d="M 80,336 L 104,336" fill="none" stroke="black"/>
                  <path d="M 120,336 L 144,336" fill="none" stroke="black"/>
                  <path d="M 296,336 L 352,336" fill="none" stroke="black"/>
                  <path d="M 88,368 L 104,368" fill="none" stroke="black"/>
                  <path d="M 120,368 L 160,368" fill="none" stroke="black"/>
                  <path d="M 280,368 L 360,368" fill="none" stroke="black"/>
                  <path d="M 480,400 L 552,400" fill="none" stroke="black"/>
                  <path d="M 80,416 L 104,416" fill="none" stroke="black"/>
                  <path d="M 128,416 L 144,416" fill="none" stroke="black"/>
                  <path d="M 248,416 L 472,416" fill="none" stroke="black"/>
                  <path d="M 88,448 L 104,448" fill="none" stroke="black"/>
                  <path d="M 128,448 L 144,448" fill="none" stroke="black"/>
                  <path d="M 264,448 L 472,448" fill="none" stroke="black"/>
                  <path d="M 480,464 L 552,464" fill="none" stroke="black"/>
                  <path d="M 8,480 L 80,480" fill="none" stroke="black"/>
                  <path d="M 360,480 L 432,480" fill="none" stroke="black"/>
                  <path d="M 528,32 C 519.16936,32 512,39.16936 512,48" fill="none" stroke="black"/>
                  <path d="M 552,32 C 560.83064,32 568,39.16936 568,48" fill="none" stroke="black"/>
                  <path d="M 528,320 C 519.16936,320 512,312.83064 512,304" fill="none" stroke="black"/>
                  <path d="M 552,320 C 560.83064,320 568,312.83064 568,304" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="512,256 500,250.4 500,261.6" fill="black" transform="rotate(0,504,256)"/>
                  <polygon class="arrowhead" points="512,208 500,202.4 500,213.6" fill="black" transform="rotate(0,504,208)"/>
                  <polygon class="arrowhead" points="512,176 500,170.4 500,181.6" fill="black" transform="rotate(0,504,176)"/>
                  <polygon class="arrowhead" points="480,416 468,410.4 468,421.6" fill="black" transform="rotate(0,472,416)"/>
                  <polygon class="arrowhead" points="448,256 436,250.4 436,261.6" fill="black" transform="rotate(180,440,256)"/>
                  <polygon class="arrowhead" points="448,208 436,202.4 436,213.6" fill="black" transform="rotate(180,440,208)"/>
                  <polygon class="arrowhead" points="360,336 348,330.4 348,341.6" fill="black" transform="rotate(0,352,336)"/>
                  <polygon class="arrowhead" points="360,112 348,106.4 348,117.6" fill="black" transform="rotate(0,352,112)"/>
                  <polygon class="arrowhead" points="96,448 84,442.4 84,453.6" fill="black" transform="rotate(180,88,448)"/>
                  <polygon class="arrowhead" points="96,368 84,362.4 84,373.6" fill="black" transform="rotate(180,88,368)"/>
                  <polygon class="arrowhead" points="96,304 84,298.4 84,309.6" fill="black" transform="rotate(180,88,304)"/>
                  <polygon class="arrowhead" points="96,144 84,138.4 84,149.6" fill="black" transform="rotate(180,88,144)"/>
                  <polygon class="arrowhead" points="96,80 84,74.4 84,85.6" fill="black" transform="rotate(180,88,80)"/>
                  <g class="text">
                    <text x="44" y="52">Client</text>
                    <text x="396" y="52">AS</text>
                    <text x="536" y="52">End</text>
                    <text x="44" y="68">Instance</text>
                    <text x="540" y="68">User</text>
                    <text x="112" y="84">1</text>
                    <text x="168" y="84">Start</text>
                    <text x="224" y="84">Session</text>
                    <text x="112" y="116">2</text>
                    <text x="184" y="116">Request</text>
                    <text x="244" y="116">Access</text>
                    <text x="112" y="148">3</text>
                    <text x="192" y="148">Interaction</text>
                    <text x="268" y="148">Needed</text>
                    <text x="112" y="180">4</text>
                    <text x="180" y="180">Redirect</text>
                    <text x="232" y="180">for</text>
                    <text x="296" y="180">Interaction</text>
                    <text x="472" y="212">5</text>
                    <text x="472" y="228">AuthN</text>
                    <text x="540" y="228">RO</text>
                    <text x="472" y="260">6</text>
                    <text x="472" y="276">AuthZ</text>
                    <text x="536" y="292">End</text>
                    <text x="112" y="308">7</text>
                    <text x="180" y="308">Redirect</text>
                    <text x="232" y="308">for</text>
                    <text x="300" y="308">Continuation</text>
                    <text x="540" y="308">User</text>
                    <text x="112" y="340">8</text>
                    <text x="188" y="340">Continue</text>
                    <text x="256" y="340">Request</text>
                    <text x="112" y="372">9</text>
                    <text x="192" y="372">Grant</text>
                    <text x="244" y="372">Access</text>
                    <text x="116" y="420">10</text>
                    <text x="180" y="420">Access</text>
                    <text x="224" y="420">API</text>
                    <text x="516" y="420">RS</text>
                    <text x="360" y="436">|</text>
                    <text x="432" y="436">|</text>
                    <text x="116" y="452">11</text>
                    <text x="168" y="452">API</text>
                    <text x="220" y="452">Response</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.2-2.1.2">
+--------+                                  +--------+          .----.
| Client |                                  |   AS   |         | End  |
|Instance|                                  |        |         | User |
|        |&lt;=(1)== Start Session ===============================+      |
|        |                                  |        |         |      |
|        +--(2)--- Request Access ---------&gt;|        |         |      |
|        |                                  |        |         |      |
|        |&lt;-(3)-- Interaction Needed -------+        |         |      |
|        |                                  |        |         |      |
|        +==(4)== Redirect for Interaction ===================&gt;|      |
|        |                                  |        |         +------+
|        |                                  |        |&lt;==(5)==&gt;|      |
|        |                                  |        |  AuthN  |  RO  |
|        |                                  |        |         |      |
|        |                                  |        |&lt;==(6)==&gt;|      |
|        |                                  |        |  AuthZ  +------+
|        |                                  |        |         | End  |
|        |&lt;=(7)== Redirect for Continuation ===================+ User |
|        |                                  |        |          `----`
|        +--(8)--- Continue Request -------&gt;|        |
|        |                                  |        |
|        |&lt;-(9)----- Grant Access ----------+        |
|        |                                  |        |
|        |                                  |        |     +--------+
|        +--(10)-- Access API ----------------------------&gt;|   RS   |
|        |                                  |        |     |        |
|        |&lt;-(11)-- API Response ---------------------------|        |
|        |                                  |        |     +--------+
+--------+                                  +--------+
</artwork>
            </artset>
          </figure>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.2-3">
            <li pn="section-1.6.2-3.1">
              <t indent="0" pn="section-1.6.2-3.1.1">(1) The client instance establishes a session with the user, in the role of the end user.</t>
            </li>
            <li pn="section-1.6.2-3.2">
              <t indent="0" pn="section-1.6.2-3.2.1">(2) The client instance requests access to the resource (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>). The client instance indicates that
 it can redirect to an arbitrary URI (<xref target="request-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.1.1"> </xref>) and
 receive a redirect from the browser (<xref target="request-interact-callback-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.2.1"> </xref>). The client instance
 stores verification information for its redirect in the session created
 in (1).</t>
            </li>
            <li pn="section-1.6.2-3.3">
              <t indent="0" pn="section-1.6.2-3.3.1">(3) The AS determines that interaction is needed and responds (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) with
 a URI to send the user to (<xref target="response-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 3.3.1"> </xref>) and
 information needed to verify the redirect (<xref target="response-interact-finish" format="default" sectionFormat="of" derivedContent="Section 3.3.5"> </xref>) in (7).
 The AS also includes information the client instance will need to
 continue the request (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) in (8). The AS associates this
 continuation information with an ongoing request that will be referenced in (4), (6), and (8).</t>
            </li>
            <li pn="section-1.6.2-3.4">
              <t indent="0" pn="section-1.6.2-3.4.1">(4) The client instance stores the verification and continuation information from (3) in the session from (1). The client instance
 then redirects the user to the URI (<xref target="interaction-redirect" format="default" sectionFormat="of" derivedContent="Section 4.1.1"> </xref>) given by the AS in (3).
 The user's browser loads the interaction redirect URI. The AS loads the pending
 request based on the incoming URI generated in (3).</t>
            </li>
            <li pn="section-1.6.2-3.5">
              <t indent="0" pn="section-1.6.2-3.5.1">(5) The user authenticates at the AS, taking on the role of the RO.</t>
            </li>
            <li pn="section-1.6.2-3.6">
              <t indent="0" pn="section-1.6.2-3.6.1">(6) As the RO, the user authorizes the pending request from the client instance.</t>
            </li>
            <li pn="section-1.6.2-3.7">
              <t indent="0" pn="section-1.6.2-3.7.1">(7) When the AS is done interacting with the user, the AS
 redirects the user back (<xref target="interaction-callback" format="default" sectionFormat="of" derivedContent="Section 4.2.1"> </xref>) to the
 client instance using the redirect URI provided in (2). The redirect URI is augmented with
 an interaction reference that the AS associates with the ongoing
 request created in (2) and referenced in (4). The redirect URI is also
 augmented with a hash of the security information provided
 in (2) and (3). The client instance loads the verification information from (2) and (3) from
 the session created in (1). The client instance calculates a hash (<xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"> </xref>)
 based on this information and continues only if the hash validates.
 Note that the client instance needs to ensure that the parameters for the incoming
 request match those that it is expecting from the session created
 in (1). The client instance also needs to be prepared for the end user never being returned
 to the client instance and handle timeouts appropriately.</t>
            </li>
            <li pn="section-1.6.2-3.8">
              <t indent="0" pn="section-1.6.2-3.8.1">(8) The client instance loads the continuation information from (3) and sends the
 interaction reference from (7) in a request to
 continue the request (<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"> </xref>). The AS
 validates the interaction reference, ensuring that the reference
 is associated with the request being continued.</t>
            </li>
            <li pn="section-1.6.2-3.9">
              <t indent="0" pn="section-1.6.2-3.9.1">(9) If the request has been authorized, the AS grants access to the information
 in the form of access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) and
 direct subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) to the client instance.</t>
            </li>
            <li pn="section-1.6.2-3.10">
              <t indent="0" pn="section-1.6.2-3.10.1">(10) The client instance uses the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) to call the RS.</t>
            </li>
            <li pn="section-1.6.2-3.11">
              <t indent="0" pn="section-1.6.2-3.11.1">(11) The RS validates the access token and returns an appropriate response for the
API.</t>
            </li>
          </ul>
          <t indent="0" pn="section-1.6.2-4">An example set of protocol messages for this method can be found in <xref target="example-auth-code" format="default" sectionFormat="of" derivedContent="Appendix B.1"/>.</t>
        </section>
        <section anchor="sequence-user-code" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.3">
          <name slugifiedName="name-user-code-interaction">User Code Interaction</name>
          <t indent="0" pn="section-1.6.3-1">In this example flow, the client instance is a device that is capable of presenting a short,
human-readable code to the user and directing the user to enter that code at
a known URI. The user enters the code at a URI that is an interactive service hosted by the
AS in this example. The client instance is not capable of presenting an arbitrary URI to the user,
nor is it capable of accepting incoming HTTP requests from the user's browser.
The client instance polls the AS while it is waiting for the RO to authorize the request.
The user's interaction is assumed to occur on a secondary device. In this example,
it is assumed that the user is both the end user and RO. Note that since the user is not assumed
to be interacting with the client instance through the same web browser used for interaction at
the AS, the user is not shown as being connected to the client instance in this diagram.</t>
          <figure align="left" suppress-title="false" pn="figure-5">
            <name slugifiedName="name-diagram-of-a-user-code-base">Diagram of a User-Code-Based Interaction</name>
            <artset pn="section-1.6.3-2.1">
              <artwork type="svg" align="left" pn="section-1.6.3-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="560" width="576" viewBox="0 0 576 560" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,32 L 8,544" fill="none" stroke="black"/>
                  <path d="M 80,32 L 80,544" fill="none" stroke="black"/>
                  <path d="M 360,32 L 360,112" fill="none" stroke="black"/>
                  <path d="M 360,144 L 360,472" fill="none" stroke="black"/>
                  <path d="M 360,520 L 360,544" fill="none" stroke="black"/>
                  <path d="M 432,32 L 432,112" fill="none" stroke="black"/>
                  <path d="M 432,144 L 432,472" fill="none" stroke="black"/>
                  <path d="M 432,520 L 432,544" fill="none" stroke="black"/>
                  <path d="M 480,464 L 480,528" fill="none" stroke="black"/>
                  <path d="M 512,48 L 512,416" fill="none" stroke="black"/>
                  <path d="M 552,464 L 552,528" fill="none" stroke="black"/>
                  <path d="M 568,48 L 568,416" fill="none" stroke="black"/>
                  <path d="M 8,32 L 80,32" fill="none" stroke="black"/>
                  <path d="M 360,32 L 432,32" fill="none" stroke="black"/>
                  <path d="M 528,32 L 552,32" fill="none" stroke="black"/>
                  <path d="M 80,64 L 104,64" fill="none" stroke="black"/>
                  <path d="M 120,64 L 144,64" fill="none" stroke="black"/>
                  <path d="M 280,64 L 352,64" fill="none" stroke="black"/>
                  <path d="M 88,96 L 104,96" fill="none" stroke="black"/>
                  <path d="M 120,96 L 136,96" fill="none" stroke="black"/>
                  <path d="M 304,96 L 360,96" fill="none" stroke="black"/>
                  <path d="M 80,126 L 104,126" fill="none" stroke="black"/>
                  <path d="M 80,130 L 104,130" fill="none" stroke="black"/>
                  <path d="M 120,126 L 152,126" fill="none" stroke="black"/>
                  <path d="M 120,130 L 152,130" fill="none" stroke="black"/>
                  <path d="M 312,126 L 504,126" fill="none" stroke="black"/>
                  <path d="M 312,130 L 504,130" fill="none" stroke="black"/>
                  <path d="M 440,158 L 464,158" fill="none" stroke="black"/>
                  <path d="M 440,162 L 464,162" fill="none" stroke="black"/>
                  <path d="M 480,158 L 512,158" fill="none" stroke="black"/>
                  <path d="M 480,162 L 512,162" fill="none" stroke="black"/>
                  <path d="M 512,192 L 568,192" fill="none" stroke="black"/>
                  <path d="M 440,206 L 464,206" fill="none" stroke="black"/>
                  <path d="M 440,210 L 464,210" fill="none" stroke="black"/>
                  <path d="M 480,206 L 504,206" fill="none" stroke="black"/>
                  <path d="M 480,210 L 504,210" fill="none" stroke="black"/>
                  <path d="M 80,240 L 104,240" fill="none" stroke="black"/>
                  <path d="M 120,240 L 144,240" fill="none" stroke="black"/>
                  <path d="M 328,240 L 352,240" fill="none" stroke="black"/>
                  <path d="M 440,254 L 464,254" fill="none" stroke="black"/>
                  <path d="M 440,258 L 464,258" fill="none" stroke="black"/>
                  <path d="M 480,254 L 504,254" fill="none" stroke="black"/>
                  <path d="M 480,258 L 504,258" fill="none" stroke="black"/>
                  <path d="M 88,272 L 104,272" fill="none" stroke="black"/>
                  <path d="M 128,272 L 144,272" fill="none" stroke="black"/>
                  <path d="M 344,272 L 360,272" fill="none" stroke="black"/>
                  <path d="M 440,302 L 464,302" fill="none" stroke="black"/>
                  <path d="M 440,306 L 464,306" fill="none" stroke="black"/>
                  <path d="M 480,302 L 504,302" fill="none" stroke="black"/>
                  <path d="M 480,306 L 504,306" fill="none" stroke="black"/>
                  <path d="M 440,350 L 464,350" fill="none" stroke="black"/>
                  <path d="M 440,354 L 464,354" fill="none" stroke="black"/>
                  <path d="M 480,350 L 504,350" fill="none" stroke="black"/>
                  <path d="M 480,354 L 504,354" fill="none" stroke="black"/>
                  <path d="M 512,384 L 568,384" fill="none" stroke="black"/>
                  <path d="M 80,400 L 104,400" fill="none" stroke="black"/>
                  <path d="M 128,400 L 144,400" fill="none" stroke="black"/>
                  <path d="M 328,400 L 352,400" fill="none" stroke="black"/>
                  <path d="M 88,432 L 104,432" fill="none" stroke="black"/>
                  <path d="M 128,432 L 168,432" fill="none" stroke="black"/>
                  <path d="M 288,432 L 360,432" fill="none" stroke="black"/>
                  <path d="M 528,432 L 552,432" fill="none" stroke="black"/>
                  <path d="M 480,464 L 552,464" fill="none" stroke="black"/>
                  <path d="M 80,480 L 104,480" fill="none" stroke="black"/>
                  <path d="M 128,480 L 144,480" fill="none" stroke="black"/>
                  <path d="M 248,480 L 472,480" fill="none" stroke="black"/>
                  <path d="M 88,512 L 104,512" fill="none" stroke="black"/>
                  <path d="M 128,512 L 144,512" fill="none" stroke="black"/>
                  <path d="M 264,512 L 480,512" fill="none" stroke="black"/>
                  <path d="M 480,528 L 552,528" fill="none" stroke="black"/>
                  <path d="M 8,544 L 80,544" fill="none" stroke="black"/>
                  <path d="M 360,544 L 432,544" fill="none" stroke="black"/>
                  <path d="M 528,32 C 519.16936,32 512,39.16936 512,48" fill="none" stroke="black"/>
                  <path d="M 552,32 C 560.83064,32 568,39.16936 568,48" fill="none" stroke="black"/>
                  <path d="M 528,432 C 519.16936,432 512,424.83064 512,416" fill="none" stroke="black"/>
                  <path d="M 552,432 C 560.83064,432 568,424.83064 568,416" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="512,352 500,346.4 500,357.6" fill="black" transform="rotate(0,504,352)"/>
                  <polygon class="arrowhead" points="512,304 500,298.4 500,309.6" fill="black" transform="rotate(0,504,304)"/>
                  <polygon class="arrowhead" points="512,256 500,250.4 500,261.6" fill="black" transform="rotate(0,504,256)"/>
                  <polygon class="arrowhead" points="512,208 500,202.4 500,213.6" fill="black" transform="rotate(0,504,208)"/>
                  <polygon class="arrowhead" points="512,128 500,122.4 500,133.6" fill="black" transform="rotate(0,504,128)"/>
                  <polygon class="arrowhead" points="480,480 468,474.4 468,485.6" fill="black" transform="rotate(0,472,480)"/>
                  <polygon class="arrowhead" points="448,352 436,346.4 436,357.6" fill="black" transform="rotate(180,440,352)"/>
                  <polygon class="arrowhead" points="448,304 436,298.4 436,309.6" fill="black" transform="rotate(180,440,304)"/>
                  <polygon class="arrowhead" points="448,256 436,250.4 436,261.6" fill="black" transform="rotate(180,440,256)"/>
                  <polygon class="arrowhead" points="448,208 436,202.4 436,213.6" fill="black" transform="rotate(180,440,208)"/>
                  <polygon class="arrowhead" points="448,160 436,154.4 436,165.6" fill="black" transform="rotate(180,440,160)"/>
                  <polygon class="arrowhead" points="360,400 348,394.4 348,405.6" fill="black" transform="rotate(0,352,400)"/>
                  <polygon class="arrowhead" points="360,240 348,234.4 348,245.6" fill="black" transform="rotate(0,352,240)"/>
                  <polygon class="arrowhead" points="360,64 348,58.4 348,69.6" fill="black" transform="rotate(0,352,64)"/>
                  <polygon class="arrowhead" points="96,512 84,506.4 84,517.6" fill="black" transform="rotate(180,88,512)"/>
                  <polygon class="arrowhead" points="96,432 84,426.4 84,437.6" fill="black" transform="rotate(180,88,432)"/>
                  <polygon class="arrowhead" points="96,272 84,266.4 84,277.6" fill="black" transform="rotate(180,88,272)"/>
                  <polygon class="arrowhead" points="96,96 84,90.4 84,101.6" fill="black" transform="rotate(180,88,96)"/>
                  <g class="text">
                    <text x="44" y="52">Client</text>
                    <text x="396" y="52">AS</text>
                    <text x="536" y="52">End</text>
                    <text x="44" y="68">Instance</text>
                    <text x="112" y="68">1</text>
                    <text x="184" y="68">Request</text>
                    <text x="244" y="68">Access</text>
                    <text x="540" y="68">User</text>
                    <text x="112" y="100">2</text>
                    <text x="192" y="100">Interaction</text>
                    <text x="268" y="100">Needed</text>
                    <text x="112" y="132">3</text>
                    <text x="192" y="132">Display</text>
                    <text x="244" y="132">User</text>
                    <text x="284" y="132">Code</text>
                    <text x="472" y="164">4</text>
                    <text x="452" y="180">Open</text>
                    <text x="488" y="180">URI</text>
                    <text x="472" y="212">5</text>
                    <text x="540" y="212">RO</text>
                    <text x="472" y="228">AuthN</text>
                    <text x="112" y="244">9</text>
                    <text x="188" y="244">Continue</text>
                    <text x="256" y="244">Request</text>
                    <text x="304" y="244">(A)</text>
                    <text x="472" y="260">6</text>
                    <text x="116" y="276">10</text>
                    <text x="168" y="276">Not</text>
                    <text x="200" y="276">Yet</text>
                    <text x="248" y="276">Granted</text>
                    <text x="308" y="276">(Wait)</text>
                    <text x="468" y="276">Code</text>
                    <text x="472" y="308">7</text>
                    <text x="472" y="324">AuthZ</text>
                    <text x="472" y="356">8</text>
                    <text x="468" y="372">Complete</text>
                    <text x="116" y="404">11</text>
                    <text x="188" y="404">Continue</text>
                    <text x="256" y="404">Request</text>
                    <text x="304" y="404">(B)</text>
                    <text x="536" y="404">End</text>
                    <text x="540" y="420">User</text>
                    <text x="116" y="436">12</text>
                    <text x="200" y="436">Grant</text>
                    <text x="252" y="436">Access</text>
                    <text x="116" y="484">13</text>
                    <text x="180" y="484">Access</text>
                    <text x="224" y="484">API</text>
                    <text x="516" y="484">RS</text>
                    <text x="360" y="500">|</text>
                    <text x="432" y="500">|</text>
                    <text x="116" y="516">14</text>
                    <text x="168" y="516">API</text>
                    <text x="220" y="516">Response</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.3-2.1.2">
+--------+                                  +--------+          .----.
| Client |                                  |   AS   |         | End  |
|Instance+--(1)--- Request Access ---------&gt;|        |         | User |
|        |                                  |        |         |      |
|        |&lt;-(2)-- Interaction Needed -------+        |         |      |
|        |                                  |        |         |      |
|        +==(3)==== Display User Code ========================&gt;|      |
|        |                                  |        |         |      |
|        |                                  |        |&lt;==(4)===+      |
|        |                                  |        |Open URI |      |
|        |                                  |        |         +------+
|        |                                  |        |&lt;==(5)==&gt;|  RO  |
|        |                                  |        |  AuthN  |      |
|        +--(9)--- Continue Request (A) ---&gt;|        |         |      |
|        |                                  |        |&lt;==(6)==&gt;|      |
|        |&lt;-(10)-- Not Yet Granted (Wait) --+        |  Code   |      |
|        |                                  |        |         |      |
|        |                                  |        |&lt;==(7)==&gt;|      |
|        |                                  |        |  AuthZ  |      |
|        |                                  |        |         |      |
|        |                                  |        |&lt;==(8)==&gt;|      |
|        |                                  |        |Complete |      |
|        |                                  |        |         +------+
|        +--(11)-- Continue Request (B) ---&gt;|        |         | End  |
|        |                                  |        |         | User |
|        |&lt;-(12)----- Grant Access ---------+        |          `----`
|        |                                  |        |
|        |                                  |        |     +--------+
|        +--(13)-- Access API ----------------------------&gt;|   RS   |
|        |                                  |        |     |        |
|        |&lt;-(14)-- API Response ---------------------------+        |
|        |                                  |        |     +--------+
+--------+                                  +--------+
</artwork>
            </artset>
          </figure>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.3-3">
            <li pn="section-1.6.3-3.1">
              <t indent="0" pn="section-1.6.3-3.1.1">(1) The client instance requests access to the resource (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>). The client instance indicates that
 it can display a user code (<xref target="request-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 2.5.1.3"> </xref>).</t>
            </li>
            <li pn="section-1.6.3-3.2">
              <t indent="0" pn="section-1.6.3-3.2.1">(2) The AS determines that interaction is needed and responds (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) with
 a user code to communicate to the user (<xref target="response-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 3.3.3"> </xref>).
 The AS also includes information the client instance will need to
 continue the request (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) in (8) and (10). The AS associates this
 continuation information with an ongoing request that will be referenced in (4), (6), (8), and (10).</t>
            </li>
            <li pn="section-1.6.3-3.3">
              <t indent="0" pn="section-1.6.3-3.3.1">(3) The client instance stores the continuation information from (2) for use in (8) and (10). The client instance
 then communicates the code to the user (<xref target="interaction-usercode" format="default" sectionFormat="of" derivedContent="Section 4.1.2"> </xref>) given by the AS in (2).</t>
            </li>
            <li pn="section-1.6.3-3.4">
              <t indent="0" pn="section-1.6.3-3.4.1">(4) The user directs their browser to the user code URI. This URI is stable and
 can be communicated via the client software's documentation, the AS documentation, or
 the client software itself. Since it is assumed that the RO will interact
 with the AS through a secondary device, the client instance does not provide a mechanism to
 launch the RO's browser at this URI.</t>
            </li>
            <li pn="section-1.6.3-3.5">
              <t indent="0" pn="section-1.6.3-3.5.1">(5) The end user authenticates at the AS, taking on the role of the RO.</t>
            </li>
            <li pn="section-1.6.3-3.6">
              <t indent="0" pn="section-1.6.3-3.6.1">(6) The RO enters the code communicated in (3) to the AS. The AS validates this code
against a current request in process.</t>
            </li>
            <li pn="section-1.6.3-3.7">
              <t indent="0" pn="section-1.6.3-3.7.1">(7) As the RO, the user authorizes the pending request from the client instance.</t>
            </li>
            <li pn="section-1.6.3-3.8">
              <t indent="0" pn="section-1.6.3-3.8.1">(8) When the AS is done interacting with the user, the AS
 indicates to the RO that the request has been completed.</t>
            </li>
            <li pn="section-1.6.3-3.9">
              <t indent="0" pn="section-1.6.3-3.9.1">(9) Meanwhile, the client instance loads the continuation information stored at (3) and
 continues the request (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>). The AS determines which
 ongoing access request is referenced here and checks its state.</t>
            </li>
            <li pn="section-1.6.3-3.10">
              <t indent="0" pn="section-1.6.3-3.10.1">(10) If the access request has not yet been authorized by the RO in (6),
the AS responds to the client instance to continue the request (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>)
at a future time through additional polled continuation requests. This response can include
updated continuation information as well as information regarding how long the
client instance should wait before calling again. The client instance replaces its stored
continuation information from the previous response (2).
Note that the AS may need to determine that the RO has not approved
the request in a sufficient amount of time and return an appropriate
error to the client instance.</t>
            </li>
            <li pn="section-1.6.3-3.11">
              <t indent="0" pn="section-1.6.3-3.11.1">(11) The client instance continues to poll the AS (<xref target="continue-poll" format="default" sectionFormat="of" derivedContent="Section 5.2"> </xref>) with the new
continuation information in (9).</t>
            </li>
            <li pn="section-1.6.3-3.12">
              <t indent="0" pn="section-1.6.3-3.12.1">(12) If the request has been authorized, the AS grants access to the information
in the form of access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) and
direct subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) to the client instance.</t>
            </li>
            <li pn="section-1.6.3-3.13">
              <t indent="0" pn="section-1.6.3-3.13.1">(13) The client instance uses the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) to call the RS.</t>
            </li>
            <li pn="section-1.6.3-3.14">
              <t indent="0" pn="section-1.6.3-3.14.1">(14) The RS validates the access token and returns an appropriate response for the
API.</t>
            </li>
          </ul>
          <t indent="0" pn="section-1.6.3-4">An example set of protocol messages for this method can be found in <xref target="example-device" format="default" sectionFormat="of" derivedContent="Appendix B.2"/>.</t>
        </section>
        <section anchor="sequence-async" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.4">
          <name slugifiedName="name-asynchronous-authorization">Asynchronous Authorization</name>
          <t indent="0" pn="section-1.6.4-1">In this example flow, the end user and RO roles are fulfilled by different parties, and
the RO does not interact with the client instance. The AS reaches out asynchronously to the RO
during the request process to gather the RO's authorization for the client instance's request.
The client instance polls the AS while it is waiting for the RO to authorize the request.</t>
          <figure align="left" suppress-title="false" pn="figure-6">
            <name slugifiedName="name-diagram-of-an-asynchronous-">Diagram of an Asynchronous Authorization Process, with No End-User Interaction</name>
            <artset pn="section-1.6.4-2.1">
              <artwork type="svg" align="left" pn="section-1.6.4-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="416" width="576" viewBox="0 0 576 416" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,32 L 8,400" fill="none" stroke="black"/>
                  <path d="M 80,32 L 80,400" fill="none" stroke="black"/>
                  <path d="M 360,32 L 360,328" fill="none" stroke="black"/>
                  <path d="M 360,376 L 360,400" fill="none" stroke="black"/>
                  <path d="M 432,32 L 432,328" fill="none" stroke="black"/>
                  <path d="M 432,376 L 432,400" fill="none" stroke="black"/>
                  <path d="M 480,320 L 480,384" fill="none" stroke="black"/>
                  <path d="M 512,48 L 512,240" fill="none" stroke="black"/>
                  <path d="M 552,320 L 552,384" fill="none" stroke="black"/>
                  <path d="M 568,48 L 568,240" fill="none" stroke="black"/>
                  <path d="M 8,32 L 80,32" fill="none" stroke="black"/>
                  <path d="M 360,32 L 432,32" fill="none" stroke="black"/>
                  <path d="M 528,32 L 552,32" fill="none" stroke="black"/>
                  <path d="M 80,64 L 104,64" fill="none" stroke="black"/>
                  <path d="M 120,64 L 144,64" fill="none" stroke="black"/>
                  <path d="M 280,64 L 352,64" fill="none" stroke="black"/>
                  <path d="M 88,96 L 104,96" fill="none" stroke="black"/>
                  <path d="M 120,96 L 136,96" fill="none" stroke="black"/>
                  <path d="M 336,96 L 360,96" fill="none" stroke="black"/>
                  <path d="M 440,110 L 464,110" fill="none" stroke="black"/>
                  <path d="M 440,114 L 464,114" fill="none" stroke="black"/>
                  <path d="M 480,110 L 504,110" fill="none" stroke="black"/>
                  <path d="M 480,114 L 504,114" fill="none" stroke="black"/>
                  <path d="M 80,144 L 104,144" fill="none" stroke="black"/>
                  <path d="M 120,144 L 144,144" fill="none" stroke="black"/>
                  <path d="M 328,144 L 352,144" fill="none" stroke="black"/>
                  <path d="M 440,158 L 464,158" fill="none" stroke="black"/>
                  <path d="M 440,162 L 464,162" fill="none" stroke="black"/>
                  <path d="M 480,158 L 504,158" fill="none" stroke="black"/>
                  <path d="M 480,162 L 504,162" fill="none" stroke="black"/>
                  <path d="M 88,176 L 104,176" fill="none" stroke="black"/>
                  <path d="M 120,176 L 136,176" fill="none" stroke="black"/>
                  <path d="M 336,176 L 360,176" fill="none" stroke="black"/>
                  <path d="M 440,206 L 464,206" fill="none" stroke="black"/>
                  <path d="M 440,210 L 464,210" fill="none" stroke="black"/>
                  <path d="M 480,206 L 504,206" fill="none" stroke="black"/>
                  <path d="M 480,210 L 504,210" fill="none" stroke="black"/>
                  <path d="M 80,256 L 104,256" fill="none" stroke="black"/>
                  <path d="M 120,256 L 144,256" fill="none" stroke="black"/>
                  <path d="M 328,256 L 352,256" fill="none" stroke="black"/>
                  <path d="M 528,256 L 552,256" fill="none" stroke="black"/>
                  <path d="M 88,288 L 104,288" fill="none" stroke="black"/>
                  <path d="M 120,288 L 168,288" fill="none" stroke="black"/>
                  <path d="M 288,288 L 360,288" fill="none" stroke="black"/>
                  <path d="M 480,320 L 552,320" fill="none" stroke="black"/>
                  <path d="M 80,336 L 104,336" fill="none" stroke="black"/>
                  <path d="M 128,336 L 144,336" fill="none" stroke="black"/>
                  <path d="M 248,336 L 472,336" fill="none" stroke="black"/>
                  <path d="M 88,368 L 104,368" fill="none" stroke="black"/>
                  <path d="M 128,368 L 144,368" fill="none" stroke="black"/>
                  <path d="M 264,368 L 480,368" fill="none" stroke="black"/>
                  <path d="M 480,384 L 552,384" fill="none" stroke="black"/>
                  <path d="M 8,400 L 80,400" fill="none" stroke="black"/>
                  <path d="M 360,400 L 432,400" fill="none" stroke="black"/>
                  <path d="M 528,32 C 519.16936,32 512,39.16936 512,48" fill="none" stroke="black"/>
                  <path d="M 552,32 C 560.83064,32 568,39.16936 568,48" fill="none" stroke="black"/>
                  <path d="M 528,256 C 519.16936,256 512,248.83064 512,240" fill="none" stroke="black"/>
                  <path d="M 552,256 C 560.83064,256 568,248.83064 568,240" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="512,208 500,202.4 500,213.6" fill="black" transform="rotate(0,504,208)"/>
                  <polygon class="arrowhead" points="512,160 500,154.4 500,165.6" fill="black" transform="rotate(0,504,160)"/>
                  <polygon class="arrowhead" points="512,112 500,106.4 500,117.6" fill="black" transform="rotate(0,504,112)"/>
                  <polygon class="arrowhead" points="480,336 468,330.4 468,341.6" fill="black" transform="rotate(0,472,336)"/>
                  <polygon class="arrowhead" points="448,208 436,202.4 436,213.6" fill="black" transform="rotate(180,440,208)"/>
                  <polygon class="arrowhead" points="448,160 436,154.4 436,165.6" fill="black" transform="rotate(180,440,160)"/>
                  <polygon class="arrowhead" points="448,112 436,106.4 436,117.6" fill="black" transform="rotate(180,440,112)"/>
                  <polygon class="arrowhead" points="360,256 348,250.4 348,261.6" fill="black" transform="rotate(0,352,256)"/>
                  <polygon class="arrowhead" points="360,144 348,138.4 348,149.6" fill="black" transform="rotate(0,352,144)"/>
                  <polygon class="arrowhead" points="360,64 348,58.4 348,69.6" fill="black" transform="rotate(0,352,64)"/>
                  <polygon class="arrowhead" points="96,368 84,362.4 84,373.6" fill="black" transform="rotate(180,88,368)"/>
                  <polygon class="arrowhead" points="96,288 84,282.4 84,293.6" fill="black" transform="rotate(180,88,288)"/>
                  <polygon class="arrowhead" points="96,176 84,170.4 84,181.6" fill="black" transform="rotate(180,88,176)"/>
                  <polygon class="arrowhead" points="96,96 84,90.4 84,101.6" fill="black" transform="rotate(180,88,96)"/>
                  <g class="text">
                    <text x="44" y="52">Client</text>
                    <text x="396" y="52">AS</text>
                    <text x="540" y="52">RO</text>
                    <text x="44" y="68">Instance</text>
                    <text x="112" y="68">1</text>
                    <text x="184" y="68">Request</text>
                    <text x="244" y="68">Access</text>
                    <text x="112" y="100">2</text>
                    <text x="160" y="100">Not</text>
                    <text x="192" y="100">Yet</text>
                    <text x="240" y="100">Granted</text>
                    <text x="300" y="100">(Wait)</text>
                    <text x="472" y="116">3</text>
                    <text x="472" y="132">AuthN</text>
                    <text x="112" y="148">6</text>
                    <text x="188" y="148">Continue</text>
                    <text x="256" y="148">Request</text>
                    <text x="304" y="148">(A)</text>
                    <text x="472" y="164">4</text>
                    <text x="112" y="180">7</text>
                    <text x="160" y="180">Not</text>
                    <text x="192" y="180">Yet</text>
                    <text x="240" y="180">Granted</text>
                    <text x="300" y="180">(Wait)</text>
                    <text x="472" y="180">AuthZ</text>
                    <text x="472" y="212">5</text>
                    <text x="472" y="228">Completed</text>
                    <text x="112" y="260">8</text>
                    <text x="188" y="260">Continue</text>
                    <text x="256" y="260">Request</text>
                    <text x="304" y="260">(B)</text>
                    <text x="112" y="292">9</text>
                    <text x="200" y="292">Grant</text>
                    <text x="252" y="292">Access</text>
                    <text x="116" y="340">10</text>
                    <text x="180" y="340">Access</text>
                    <text x="224" y="340">API</text>
                    <text x="516" y="340">RS</text>
                    <text x="360" y="356">|</text>
                    <text x="432" y="356">|</text>
                    <text x="116" y="372">11</text>
                    <text x="168" y="372">API</text>
                    <text x="220" y="372">Response</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.4-2.1.2">
+--------+                                  +--------+          .----.
| Client |                                  |   AS   |         |  RO  |
|Instance+--(1)--- Request Access ---------&gt;|        |         |      |
|        |                                  |        |         |      |
|        |&lt;-(2)-- Not Yet Granted (Wait) ---+        |         |      |
|        |                                  |        |&lt;==(3)==&gt;|      |
|        |                                  |        |  AuthN  |      |
|        +--(6)--- Continue Request (A) ---&gt;|        |         |      |
|        |                                  |        |&lt;==(4)==&gt;|      |
|        |&lt;-(7)-- Not Yet Granted (Wait) ---+        |  AuthZ  |      |
|        |                                  |        |         |      |
|        |                                  |        |&lt;==(5)==&gt;|      |
|        |                                  |        |Completed|      |
|        |                                  |        |         |      |
|        +--(8)--- Continue Request (B) ---&gt;|        |          `----`
|        |                                  |        |
|        |&lt;-(9)------ Grant Access ---------+        |
|        |                                  |        |
|        |                                  |        |     +--------+
|        +--(10)-- Access API ----------------------------&gt;|   RS   |
|        |                                  |        |     |        |
|        |&lt;-(11)-- API Response ---------------------------+        |
|        |                                  |        |     +--------+
+--------+                                  +--------+
</artwork>
            </artset>
          </figure>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.4-3">
            <li pn="section-1.6.4-3.1">
              <t indent="0" pn="section-1.6.4-3.1.1">(1) The client instance requests access to the resource (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>). The client instance does not
 send any interaction modes to the server, indicating that
 it does not expect to interact with the RO. The client instance can also signal
 which RO it requires authorization from, if known, by using the
 subject request field (<xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"> </xref>) and
 user request field (<xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"> </xref>). It's also possible for the AS to determine which
 RO needs to be contacted by the nature of what access is being requested.</t>
            </li>
            <li pn="section-1.6.4-3.2">
              <t indent="0" pn="section-1.6.4-3.2.1">(2) The AS determines that interaction is needed, but the client instance cannot interact
 with the RO. The AS responds (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) with the information the client instance
 will need to continue the request (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) in (6) and (8), including
 a signal that the client instance should wait before checking the status of the request again.
 The AS associates this continuation information with an ongoing request that will be
 referenced in (3), (4), (5), (6), and (8).</t>
            </li>
            <li pn="section-1.6.4-3.3">
              <t indent="0" pn="section-1.6.4-3.3.1">(3) The AS determines which RO to contact based on the request in (1), through a
 combination of the user request (<xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"> </xref>), the
 subject request (<xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"> </xref>), the
 access request (<xref target="request-token" format="default" sectionFormat="of" derivedContent="Section 2.1"> </xref>), and other policy information. The AS
 contacts the RO and authenticates them.</t>
            </li>
            <li pn="section-1.6.4-3.4">
              <t indent="0" pn="section-1.6.4-3.4.1">(4) The RO authorizes the pending request from the client instance.</t>
            </li>
            <li pn="section-1.6.4-3.5">
              <t indent="0" pn="section-1.6.4-3.5.1">(5) When the AS is done interacting with the RO, the AS
 indicates to the RO that the request has been completed.</t>
            </li>
            <li pn="section-1.6.4-3.6">
              <t indent="0" pn="section-1.6.4-3.6.1">(6) Meanwhile, the client instance loads the continuation information stored at (2) and
 continues the request (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>). The AS determines which
 ongoing access request is referenced here and checks its state.</t>
            </li>
            <li pn="section-1.6.4-3.7">
              <t indent="0" pn="section-1.6.4-3.7.1">(7) If the access request has not yet been authorized by the RO in (6),
 the AS responds to the client instance to continue the request (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>)
 at a future time through additional polling. Note that this response is not
 an error message, since no error has yet occurred. This response can include
 refreshed credentials as well as information regarding how long the
 client instance should wait before calling again. The client instance replaces its stored
 continuation information from the previous response (2).
 Note that the AS may need to determine that the RO has not approved
 the request in a sufficient amount of time and return an appropriate
 error to the client instance.</t>
            </li>
            <li pn="section-1.6.4-3.8">
              <t indent="0" pn="section-1.6.4-3.8.1">(8) The client instance continues to poll the AS (<xref target="continue-poll" format="default" sectionFormat="of" derivedContent="Section 5.2"/>) with the new
 continuation information from (7).</t>
            </li>
            <li pn="section-1.6.4-3.9">
              <t indent="0" pn="section-1.6.4-3.9.1">(9) If the request has been authorized, the AS grants access to the information
 in the form of access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) and
 direct subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) to the client instance.</t>
            </li>
            <li pn="section-1.6.4-3.10">
              <t indent="0" pn="section-1.6.4-3.10.1">(10) The client instance uses the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) to call the RS.</t>
            </li>
            <li pn="section-1.6.4-3.11">
              <t indent="0" pn="section-1.6.4-3.11.1">(11) The RS validates the access token and returns an appropriate response for the
API.</t>
            </li>
          </ul>
          <t indent="0" pn="section-1.6.4-4">An example set of protocol messages for this method can be found in <xref target="example-async" format="default" sectionFormat="of" derivedContent="Appendix B.4"/>.</t>
          <t indent="0" pn="section-1.6.4-5">Additional considerations for asynchronous interactions like this are discussed in
<xref target="security-async" format="default" sectionFormat="of" derivedContent="Section 11.36"/>.</t>
        </section>
        <section anchor="sequence-no-user" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.5">
          <name slugifiedName="name-software-only-authorization">Software-Only Authorization</name>
          <t indent="0" pn="section-1.6.5-1">In this example flow, the AS policy allows the client instance to make a call on its own behalf,
without the need for an RO to be involved at runtime to approve the decision.
Since there is no explicit RO, the client instance does not interact with an RO.</t>
          <figure align="left" suppress-title="false" pn="figure-7">
            <name slugifiedName="name-diagram-of-a-software-only-">Diagram of a Software-Only Authorization, with No End User or Explicit Resource Owner</name>
            <artset pn="section-1.6.5-2.1">
              <artwork type="svg" align="left" pn="section-1.6.5-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="208" width="488" viewBox="0 0 488 208" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,32 L 8,192" fill="none" stroke="black"/>
                  <path d="M 80,32 L 80,192" fill="none" stroke="black"/>
                  <path d="M 312,32 L 312,120" fill="none" stroke="black"/>
                  <path d="M 312,168 L 312,192" fill="none" stroke="black"/>
                  <path d="M 384,32 L 384,120" fill="none" stroke="black"/>
                  <path d="M 384,168 L 384,192" fill="none" stroke="black"/>
                  <path d="M 408,112 L 408,176" fill="none" stroke="black"/>
                  <path d="M 480,112 L 480,176" fill="none" stroke="black"/>
                  <path d="M 8,32 L 80,32" fill="none" stroke="black"/>
                  <path d="M 312,32 L 384,32" fill="none" stroke="black"/>
                  <path d="M 80,64 L 104,64" fill="none" stroke="black"/>
                  <path d="M 120,64 L 144,64" fill="none" stroke="black"/>
                  <path d="M 280,64 L 304,64" fill="none" stroke="black"/>
                  <path d="M 88,96 L 104,96" fill="none" stroke="black"/>
                  <path d="M 120,96 L 152,96" fill="none" stroke="black"/>
                  <path d="M 272,96 L 312,96" fill="none" stroke="black"/>
                  <path d="M 408,112 L 480,112" fill="none" stroke="black"/>
                  <path d="M 80,128 L 104,128" fill="none" stroke="black"/>
                  <path d="M 120,128 L 144,128" fill="none" stroke="black"/>
                  <path d="M 248,128 L 400,128" fill="none" stroke="black"/>
                  <path d="M 88,160 L 104,160" fill="none" stroke="black"/>
                  <path d="M 120,160 L 144,160" fill="none" stroke="black"/>
                  <path d="M 264,160 L 408,160" fill="none" stroke="black"/>
                  <path d="M 408,176 L 480,176" fill="none" stroke="black"/>
                  <path d="M 8,192 L 80,192" fill="none" stroke="black"/>
                  <path d="M 312,192 L 384,192" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="408,128 396,122.4 396,133.6" fill="black" transform="rotate(0,400,128)"/>
                  <polygon class="arrowhead" points="312,64 300,58.4 300,69.6" fill="black" transform="rotate(0,304,64)"/>
                  <polygon class="arrowhead" points="96,160 84,154.4 84,165.6" fill="black" transform="rotate(180,88,160)"/>
                  <polygon class="arrowhead" points="96,96 84,90.4 84,101.6" fill="black" transform="rotate(180,88,96)"/>
                  <g class="text">
                    <text x="44" y="52">Client</text>
                    <text x="348" y="52">AS</text>
                    <text x="44" y="68">Instance</text>
                    <text x="112" y="68">1</text>
                    <text x="184" y="68">Request</text>
                    <text x="244" y="68">Access</text>
                    <text x="112" y="100">2</text>
                    <text x="184" y="100">Grant</text>
                    <text x="236" y="100">Access</text>
                    <text x="112" y="132">3</text>
                    <text x="180" y="132">Access</text>
                    <text x="224" y="132">API</text>
                    <text x="444" y="132">RS</text>
                    <text x="312" y="148">|</text>
                    <text x="384" y="148">|</text>
                    <text x="112" y="164">4</text>
                    <text x="168" y="164">API</text>
                    <text x="220" y="164">Response</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.5-2.1.2">
+--------+                            +--------+
| Client |                            |   AS   |
|Instance+--(1)--- Request Access ---&gt;|        |
|        |                            |        |
|        |&lt;-(2)---- Grant Access -----+        |
|        |                            |        |  +--------+
|        +--(3)--- Access API -------------------&gt;|   RS   |
|        |                            |        |  |        |
|        |&lt;-(4)--- API Response ------------------+        |
|        |                            |        |  +--------+
+--------+                            +--------+
</artwork>
            </artset>
          </figure>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.5-3">
            <li pn="section-1.6.5-3.1">
              <t indent="0" pn="section-1.6.5-3.1.1">(1) The client instance requests access to the resource (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>). The client instance does not
 send any interaction modes to the server.</t>
            </li>
            <li pn="section-1.6.5-3.2">
              <t indent="0" pn="section-1.6.5-3.2.1">(2) The AS determines that the request has been authorized based on the identity of
 the client instance making the request and the access requested (<xref target="request-token" format="default" sectionFormat="of" derivedContent="Section 2.1"> </xref>).
 The AS grants access to the resource
 in the form of access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) to the client instance.
 Note that direct subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) is not
 generally applicable in this use case, as there is no user involved.</t>
            </li>
            <li pn="section-1.6.5-3.3">
              <t indent="0" pn="section-1.6.5-3.3.1">(3) The client instance uses the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) to call the RS.</t>
            </li>
            <li pn="section-1.6.5-3.4">
              <t indent="0" pn="section-1.6.5-3.4.1">(4) The RS validates the access token and returns an appropriate response for the
 API.</t>
            </li>
          </ul>
          <t indent="0" pn="section-1.6.5-4">An example set of protocol messages for this method can be found in <xref target="example-no-user" format="default" sectionFormat="of" derivedContent="Appendix B.3"/>.</t>
        </section>
        <section anchor="sequence-refresh" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.6">
          <name slugifiedName="name-refreshing-an-expired-acces">Refreshing an Expired Access Token</name>
          <t indent="0" pn="section-1.6.6-1">In this example flow, the client instance receives an access token to access an RS through
some valid GNAP process. The client instance uses that token at the RS for some time, but eventually
the access token expires. The client instance then gets a refreshed access token by rotating the
	  expired access token's value at the AS using the token management API.</t>
          <figure align="left" suppress-title="false" pn="figure-8">
            <name slugifiedName="name-diagram-of-the-process-of-r">Diagram of the Process of Refreshing an Expired Access Token</name>
            <artset pn="section-1.6.6-2.1">
              <artwork type="svg" align="left" pn="section-1.6.6-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="400" width="504" viewBox="0 0 504 400" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,32 L 8,384" fill="none" stroke="black"/>
                  <path d="M 80,32 L 80,384" fill="none" stroke="black"/>
                  <path d="M 320,128 L 320,288" fill="none" stroke="black"/>
                  <path d="M 392,128 L 392,288" fill="none" stroke="black"/>
                  <path d="M 424,32 L 424,384" fill="none" stroke="black"/>
                  <path d="M 496,32 L 496,384" fill="none" stroke="black"/>
                  <path d="M 8,32 L 80,32" fill="none" stroke="black"/>
                  <path d="M 424,32 L 496,32" fill="none" stroke="black"/>
                  <path d="M 80,64 L 104,64" fill="none" stroke="black"/>
                  <path d="M 120,64 L 144,64" fill="none" stroke="black"/>
                  <path d="M 280,64 L 416,64" fill="none" stroke="black"/>
                  <path d="M 88,96 L 104,96" fill="none" stroke="black"/>
                  <path d="M 120,96 L 144,96" fill="none" stroke="black"/>
                  <path d="M 264,96 L 424,96" fill="none" stroke="black"/>
                  <path d="M 320,128 L 392,128" fill="none" stroke="black"/>
                  <path d="M 80,144 L 104,144" fill="none" stroke="black"/>
                  <path d="M 120,144 L 144,144" fill="none" stroke="black"/>
                  <path d="M 288,144 L 312,144" fill="none" stroke="black"/>
                  <path d="M 88,176 L 104,176" fill="none" stroke="black"/>
                  <path d="M 120,176 L 144,176" fill="none" stroke="black"/>
                  <path d="M 296,176 L 320,176" fill="none" stroke="black"/>
                  <path d="M 80,240 L 104,240" fill="none" stroke="black"/>
                  <path d="M 120,240 L 144,240" fill="none" stroke="black"/>
                  <path d="M 288,240 L 312,240" fill="none" stroke="black"/>
                  <path d="M 88,272 L 104,272" fill="none" stroke="black"/>
                  <path d="M 120,272 L 144,272" fill="none" stroke="black"/>
                  <path d="M 280,272 L 320,272" fill="none" stroke="black"/>
                  <path d="M 320,288 L 392,288" fill="none" stroke="black"/>
                  <path d="M 80,320 L 104,320" fill="none" stroke="black"/>
                  <path d="M 120,320 L 144,320" fill="none" stroke="black"/>
                  <path d="M 264,320 L 416,320" fill="none" stroke="black"/>
                  <path d="M 88,352 L 104,352" fill="none" stroke="black"/>
                  <path d="M 120,352 L 144,352" fill="none" stroke="black"/>
                  <path d="M 272,352 L 424,352" fill="none" stroke="black"/>
                  <path d="M 8,384 L 80,384" fill="none" stroke="black"/>
                  <path d="M 424,384 L 496,384" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="424,320 412,314.4 412,325.6" fill="black" transform="rotate(0,416,320)"/>
                  <polygon class="arrowhead" points="424,64 412,58.4 412,69.6" fill="black" transform="rotate(0,416,64)"/>
                  <polygon class="arrowhead" points="320,240 308,234.4 308,245.6" fill="black" transform="rotate(0,312,240)"/>
                  <polygon class="arrowhead" points="320,144 308,138.4 308,149.6" fill="black" transform="rotate(0,312,144)"/>
                  <polygon class="arrowhead" points="96,352 84,346.4 84,357.6" fill="black" transform="rotate(180,88,352)"/>
                  <polygon class="arrowhead" points="96,272 84,266.4 84,277.6" fill="black" transform="rotate(180,88,272)"/>
                  <polygon class="arrowhead" points="96,176 84,170.4 84,181.6" fill="black" transform="rotate(180,88,176)"/>
                  <polygon class="arrowhead" points="96,96 84,90.4 84,101.6" fill="black" transform="rotate(180,88,96)"/>
                  <g class="text">
                    <text x="44" y="52">Client</text>
                    <text x="460" y="52">AS</text>
                    <text x="44" y="68">Instance</text>
                    <text x="112" y="68">1</text>
                    <text x="184" y="68">Request</text>
                    <text x="244" y="68">Access</text>
                    <text x="112" y="100">2</text>
                    <text x="176" y="100">Grant</text>
                    <text x="228" y="100">Access</text>
                    <text x="112" y="148">3</text>
                    <text x="180" y="148">Access</text>
                    <text x="244" y="148">Resource</text>
                    <text x="356" y="148">RS</text>
                    <text x="112" y="180">4</text>
                    <text x="184" y="180">Success</text>
                    <text x="252" y="180">Response</text>
                    <text x="144" y="212">(</text>
                    <text x="172" y="212">Time</text>
                    <text x="220" y="212">Passes</text>
                    <text x="256" y="212">)</text>
                    <text x="112" y="244">5</text>
                    <text x="180" y="244">Access</text>
                    <text x="244" y="244">Resource</text>
                    <text x="112" y="276">6</text>
                    <text x="176" y="276">Error</text>
                    <text x="236" y="276">Response</text>
                    <text x="112" y="324">7</text>
                    <text x="180" y="324">Rotate</text>
                    <text x="232" y="324">Token</text>
                    <text x="112" y="356">8</text>
                    <text x="184" y="356">Rotated</text>
                    <text x="240" y="356">Token</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.6-2.1.2">
+--------+                                          +--------+
| Client |                                          |   AS   |
|Instance+--(1)--- Request Access -----------------&gt;|        |
|        |                                          |        |
|        |&lt;-(2)--- Grant Access --------------------+        |
|        |                                          |        |
|        |                             +--------+   |        |
|        +--(3)--- Access Resource ---&gt;|   RS   |   |        |
|        |                             |        |   |        |
|        |&lt;-(4)--- Success Response ---+        |   |        |
|        |                             |        |   |        |
|        |       ( Time Passes )       |        |   |        |
|        |                             |        |   |        |
|        +--(5)--- Access Resource ---&gt;|        |   |        |
|        |                             |        |   |        |
|        |&lt;-(6)--- Error Response -----+        |   |        |
|        |                             +--------+   |        |
|        |                                          |        |
|        +--(7)--- Rotate Token -------------------&gt;|        |
|        |                                          |        |
|        |&lt;-(8)--- Rotated Token -------------------+        |
|        |                                          |        |
+--------+                                          +--------+
</artwork>
            </artset>
          </figure>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.6-3">
            <li pn="section-1.6.6-3.1">
              <t indent="0" pn="section-1.6.6-3.1.1">(1) The client instance requests access to the resource (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>).</t>
            </li>
            <li pn="section-1.6.6-3.2">
              <t indent="0" pn="section-1.6.6-3.2.1">(2) The AS grants access to the resource (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) with an
 access token (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) usable at the RS. The access token
 response includes a token management URI.</t>
            </li>
            <li pn="section-1.6.6-3.3">
              <t indent="0" pn="section-1.6.6-3.3.1">(3) The client instance uses the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) to call the RS.</t>
            </li>
            <li pn="section-1.6.6-3.4">
              <t indent="0" pn="section-1.6.6-3.4.1">(4) The RS validates the access token and returns an appropriate response for the
 API.</t>
            </li>
            <li pn="section-1.6.6-3.5">
              <t indent="0" pn="section-1.6.6-3.5.1">(5) Time passes and the client instance uses the access token to call the RS again.</t>
            </li>
            <li pn="section-1.6.6-3.6">
              <t indent="0" pn="section-1.6.6-3.6.1">(6) The RS validates the access token and determines that the access token is expired.
 The RS responds to the client instance with an error.</t>
            </li>
            <li pn="section-1.6.6-3.7">
              <t indent="0" pn="section-1.6.6-3.7.1">(7) The client instance calls the token management URI returned in (2) to
 rotate the access token (<xref target="rotate-access-token" format="default" sectionFormat="of" derivedContent="Section 6.1"> </xref>). The client instance
 uses the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>) in this call as well as the appropriate key;
 see <xref target="rotate-access-token" format="default" sectionFormat="of" derivedContent="Section 6.1"/> for details.</t>
            </li>
            <li pn="section-1.6.6-3.8">
              <t indent="0" pn="section-1.6.6-3.8.1">(8) The AS validates the rotation request, including the signature
 and keys presented in (7), and refreshes the
 access token (<xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"> </xref>). The response includes
 a new version of the access token and can also include updated token management
 information, which the client instance will store in place of the values
 returned in (2).</t>
            </li>
          </ul>
        </section>
        <section anchor="sequence-user" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.7">
          <name slugifiedName="name-requesting-subject-informat">Requesting Subject Information Only</name>
          <t indent="0" pn="section-1.6.7-1">In this scenario, the client instance does not call an RS and does not
request an access token. Instead, the client instance only requests
and is returned direct subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/>). Many different
interaction modes can be used in this scenario, so these are shown only in
the abstract as functions of the AS here.</t>
          <figure align="left" suppress-title="false" pn="figure-9">
            <name slugifiedName="name-diagram-of-the-process-of-re">Diagram of the Process of Requesting and Releasing Subject Information apart from Access Tokens</name>
            <artset pn="section-1.6.7-2.1">
              <artwork type="svg" align="left" pn="section-1.6.7-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="384" width="576" viewBox="0 0 576 384" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,32 L 8,368" fill="none" stroke="black"/>
                  <path d="M 80,32 L 80,368" fill="none" stroke="black"/>
                  <path d="M 360,32 L 360,128" fill="none" stroke="black"/>
                  <path d="M 360,160 L 360,256" fill="none" stroke="black"/>
                  <path d="M 360,288 L 360,368" fill="none" stroke="black"/>
                  <path d="M 432,32 L 432,128" fill="none" stroke="black"/>
                  <path d="M 432,160 L 432,256" fill="none" stroke="black"/>
                  <path d="M 432,288 L 432,368" fill="none" stroke="black"/>
                  <path d="M 512,48 L 512,272" fill="none" stroke="black"/>
                  <path d="M 568,48 L 568,272" fill="none" stroke="black"/>
                  <path d="M 8,32 L 80,32" fill="none" stroke="black"/>
                  <path d="M 360,32 L 432,32" fill="none" stroke="black"/>
                  <path d="M 528,32 L 552,32" fill="none" stroke="black"/>
                  <path d="M 80,80 L 104,80" fill="none" stroke="black"/>
                  <path d="M 120,80 L 144,80" fill="none" stroke="black"/>
                  <path d="M 280,80 L 352,80" fill="none" stroke="black"/>
                  <path d="M 88,112 L 104,112" fill="none" stroke="black"/>
                  <path d="M 120,112 L 136,112" fill="none" stroke="black"/>
                  <path d="M 304,112 L 360,112" fill="none" stroke="black"/>
                  <path d="M 80,142 L 104,142" fill="none" stroke="black"/>
                  <path d="M 80,146 L 104,146" fill="none" stroke="black"/>
                  <path d="M 120,142 L 136,142" fill="none" stroke="black"/>
                  <path d="M 120,146 L 136,146" fill="none" stroke="black"/>
                  <path d="M 336,142 L 504,142" fill="none" stroke="black"/>
                  <path d="M 336,146 L 504,146" fill="none" stroke="black"/>
                  <path d="M 512,160 L 568,160" fill="none" stroke="black"/>
                  <path d="M 440,174 L 464,174" fill="none" stroke="black"/>
                  <path d="M 440,178 L 464,178" fill="none" stroke="black"/>
                  <path d="M 480,174 L 504,174" fill="none" stroke="black"/>
                  <path d="M 480,178 L 504,178" fill="none" stroke="black"/>
                  <path d="M 440,222 L 464,222" fill="none" stroke="black"/>
                  <path d="M 440,226 L 464,226" fill="none" stroke="black"/>
                  <path d="M 480,222 L 504,222" fill="none" stroke="black"/>
                  <path d="M 480,226 L 504,226" fill="none" stroke="black"/>
                  <path d="M 512,240 L 568,240" fill="none" stroke="black"/>
                  <path d="M 88,270 L 104,270" fill="none" stroke="black"/>
                  <path d="M 88,274 L 104,274" fill="none" stroke="black"/>
                  <path d="M 120,270 L 136,270" fill="none" stroke="black"/>
                  <path d="M 120,274 L 136,274" fill="none" stroke="black"/>
                  <path d="M 312,270 L 512,270" fill="none" stroke="black"/>
                  <path d="M 312,274 L 512,274" fill="none" stroke="black"/>
                  <path d="M 528,288 L 552,288" fill="none" stroke="black"/>
                  <path d="M 80,304 L 104,304" fill="none" stroke="black"/>
                  <path d="M 120,304 L 144,304" fill="none" stroke="black"/>
                  <path d="M 296,304 L 352,304" fill="none" stroke="black"/>
                  <path d="M 88,336 L 104,336" fill="none" stroke="black"/>
                  <path d="M 120,336 L 160,336" fill="none" stroke="black"/>
                  <path d="M 280,336 L 360,336" fill="none" stroke="black"/>
                  <path d="M 8,368 L 80,368" fill="none" stroke="black"/>
                  <path d="M 360,368 L 432,368" fill="none" stroke="black"/>
                  <path d="M 528,32 C 519.16936,32 512,39.16936 512,48" fill="none" stroke="black"/>
                  <path d="M 552,32 C 560.83064,32 568,39.16936 568,48" fill="none" stroke="black"/>
                  <path d="M 528,288 C 519.16936,288 512,280.83064 512,272" fill="none" stroke="black"/>
                  <path d="M 552,288 C 560.83064,288 568,280.83064 568,272" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="512,224 500,218.4 500,229.6" fill="black" transform="rotate(0,504,224)"/>
                  <polygon class="arrowhead" points="512,176 500,170.4 500,181.6" fill="black" transform="rotate(0,504,176)"/>
                  <polygon class="arrowhead" points="512,144 500,138.4 500,149.6" fill="black" transform="rotate(0,504,144)"/>
                  <polygon class="arrowhead" points="448,224 436,218.4 436,229.6" fill="black" transform="rotate(180,440,224)"/>
                  <polygon class="arrowhead" points="448,176 436,170.4 436,181.6" fill="black" transform="rotate(180,440,176)"/>
                  <polygon class="arrowhead" points="360,304 348,298.4 348,309.6" fill="black" transform="rotate(0,352,304)"/>
                  <polygon class="arrowhead" points="360,80 348,74.4 348,85.6" fill="black" transform="rotate(0,352,80)"/>
                  <polygon class="arrowhead" points="96,336 84,330.4 84,341.6" fill="black" transform="rotate(180,88,336)"/>
                  <polygon class="arrowhead" points="96,272 84,266.4 84,277.6" fill="black" transform="rotate(180,88,272)"/>
                  <polygon class="arrowhead" points="96,112 84,106.4 84,117.6" fill="black" transform="rotate(180,88,112)"/>
                  <g class="text">
                    <text x="44" y="52">Client</text>
                    <text x="396" y="52">AS</text>
                    <text x="536" y="52">End</text>
                    <text x="44" y="68">Instance</text>
                    <text x="540" y="68">User</text>
                    <text x="112" y="84">1</text>
                    <text x="184" y="84">Request</text>
                    <text x="244" y="84">Access</text>
                    <text x="112" y="116">2</text>
                    <text x="192" y="116">Interaction</text>
                    <text x="268" y="116">Needed</text>
                    <text x="112" y="148">3</text>
                    <text x="188" y="148">Facilitate</text>
                    <text x="280" y="148">Interaction</text>
                    <text x="472" y="180">4</text>
                    <text x="540" y="180">RO</text>
                    <text x="472" y="196">AuthN</text>
                    <text x="472" y="228">5</text>
                    <text x="472" y="244">AuthZ</text>
                    <text x="536" y="260">End</text>
                    <text x="112" y="276">6</text>
                    <text x="172" y="276">Signal</text>
                    <text x="252" y="276">Continuation</text>
                    <text x="540" y="276">User</text>
                    <text x="112" y="308">7</text>
                    <text x="188" y="308">Continue</text>
                    <text x="256" y="308">Request</text>
                    <text x="112" y="340">8</text>
                    <text x="192" y="340">Grant</text>
                    <text x="244" y="340">Access</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.7-2.1.2">
+--------+                                  +--------+          .----.
| Client |                                  |   AS   |         | End  |
|Instance|                                  |        |         | User |
|        +--(1)--- Request Access ---------&gt;|        |         |      |
|        |                                  |        |         |      |
|        |&lt;-(2)-- Interaction Needed -------+        |         |      |
|        |                                  |        |         |      |
|        +==(3)== Facilitate Interaction =====================&gt;|      |
|        |                                  |        |         +------+
|        |                                  |        |&lt;==(4)==&gt;|  RO  |
|        |                                  |        |  AuthN  |      |
|        |                                  |        |         |      |
|        |                                  |        |&lt;==(5)==&gt;|      |
|        |                                  |        |  AuthZ  +------+
|        |                                  |        |         | End  |
|        |&lt;=(6)== Signal Continuation =========================+ User |
|        |                                  |        |          `----`
|        +--(7)--- Continue Request -------&gt;|        |
|        |                                  |        |
|        |&lt;-(8)----- Grant Access ----------+        |
|        |                                  |        |
+--------+                                  +--------+
</artwork>
            </artset>
          </figure>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.7-3">
            <li pn="section-1.6.7-3.1">
              <t indent="0" pn="section-1.6.7-3.1.1">(1) The client instance requests access to subject information (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>).</t>
            </li>
            <li pn="section-1.6.7-3.2">
              <t indent="0" pn="section-1.6.7-3.2.1">(2) The AS determines that interaction is needed and responds (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) with
 appropriate information for facilitating user interaction (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>).</t>
            </li>
            <li pn="section-1.6.7-3.3">
              <t indent="0" pn="section-1.6.7-3.3.1">(3) The client instance facilitates the user interacting with the AS (<xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"> </xref>) as directed in (2).</t>
            </li>
            <li pn="section-1.6.7-3.4">
              <t indent="0" pn="section-1.6.7-3.4.1">(4) The user authenticates at the AS, taking on the role of the RO.</t>
            </li>
            <li pn="section-1.6.7-3.5">
              <t indent="0" pn="section-1.6.7-3.5.1">(5) As the RO, the user authorizes the pending request from the client instance.</t>
            </li>
            <li pn="section-1.6.7-3.6">
              <t indent="0" pn="section-1.6.7-3.6.1">(6) When the AS is done interacting with the user, the AS
 returns the user to the client instance and signals continuation.</t>
            </li>
            <li pn="section-1.6.7-3.7">
              <t indent="0" pn="section-1.6.7-3.7.1">(7) The client instance loads the continuation information from (2) and
 calls the AS to continue the request (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>).</t>
            </li>
            <li pn="section-1.6.7-3.8">
              <t indent="0" pn="section-1.6.7-3.8.1">(8) If the request has been authorized, the AS grants access to the requested
 direct subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) to the client instance.
 At this stage, the user is generally considered "logged in" to the client
 instance based on the identifiers and assertions provided by the AS.
 Note that the AS can restrict the subject information returned, and it
 might not match what the client instance requested; see <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/> for details.</t>
            </li>
          </ul>
        </section>
        <section anchor="sequence-cross-user" numbered="true" removeInRFC="false" toc="include" pn="section-1.6.8">
          <name slugifiedName="name-cross-user-authentication">Cross-User Authentication</name>
          <t indent="0" pn="section-1.6.8-1">In this scenario, the end user and RO are two different people.
Here, the client instance already knows who the end user
is, likely through a separate authentication process. The
end user, operating the client instance, needs to get subject information
about another person in the system, the RO. The RO is given an opportunity
to release this information using an asynchronous interaction method
with the AS. This scenario would apply, for instance, when the end user
is an agent in a call center and the RO is a customer
authorizing the call-center agent to access their account on their behalf.</t>
          <figure align="left" suppress-title="false" pn="figure-10">
            <name slugifiedName="name-diagram-of-cross-user-autho">Diagram of Cross-User Authorization, Where the End User and RO Are Different</name>
            <artset pn="section-1.6.8-2.1">
              <artwork type="svg" align="left" pn="section-1.6.8-2.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="480" width="576" viewBox="0 0 576 480" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                  <path d="M 8,48 L 8,448" fill="none" stroke="black"/>
                  <path d="M 64,48 L 64,448" fill="none" stroke="black"/>
                  <path d="M 136,96 L 136,464" fill="none" stroke="black"/>
                  <path d="M 208,96 L 208,464" fill="none" stroke="black"/>
                  <path d="M 360,96 L 360,464" fill="none" stroke="black"/>
                  <path d="M 432,96 L 432,464" fill="none" stroke="black"/>
                  <path d="M 512,48 L 512,448" fill="none" stroke="black"/>
                  <path d="M 568,48 L 568,448" fill="none" stroke="black"/>
                  <path d="M 24,32 L 48,32" fill="none" stroke="black"/>
                  <path d="M 528,32 L 552,32" fill="none" stroke="black"/>
                  <path d="M 72,62 L 216,62" fill="none" stroke="black"/>
                  <path d="M 72,66 L 216,66" fill="none" stroke="black"/>
                  <path d="M 232,62 L 248,62" fill="none" stroke="black"/>
                  <path d="M 232,66 L 248,66" fill="none" stroke="black"/>
                  <path d="M 360,62 L 504,62" fill="none" stroke="black"/>
                  <path d="M 360,66 L 504,66" fill="none" stroke="black"/>
                  <path d="M 136,96 L 208,96" fill="none" stroke="black"/>
                  <path d="M 360,96 L 432,96" fill="none" stroke="black"/>
                  <path d="M 64,110 L 88,110" fill="none" stroke="black"/>
                  <path d="M 64,114 L 88,114" fill="none" stroke="black"/>
                  <path d="M 104,110 L 128,110" fill="none" stroke="black"/>
                  <path d="M 104,114 L 128,114" fill="none" stroke="black"/>
                  <path d="M 208,160 L 232,160" fill="none" stroke="black"/>
                  <path d="M 248,160 L 264,160" fill="none" stroke="black"/>
                  <path d="M 320,160 L 352,160" fill="none" stroke="black"/>
                  <path d="M 216,192 L 232,192" fill="none" stroke="black"/>
                  <path d="M 248,192 L 264,192" fill="none" stroke="black"/>
                  <path d="M 320,192 L 360,192" fill="none" stroke="black"/>
                  <path d="M 440,206 L 464,206" fill="none" stroke="black"/>
                  <path d="M 440,210 L 464,210" fill="none" stroke="black"/>
                  <path d="M 480,206 L 504,206" fill="none" stroke="black"/>
                  <path d="M 480,210 L 504,210" fill="none" stroke="black"/>
                  <path d="M 440,254 L 464,254" fill="none" stroke="black"/>
                  <path d="M 440,258 L 464,258" fill="none" stroke="black"/>
                  <path d="M 480,254 L 504,254" fill="none" stroke="black"/>
                  <path d="M 480,258 L 504,258" fill="none" stroke="black"/>
                  <path d="M 440,302 L 464,302" fill="none" stroke="black"/>
                  <path d="M 440,306 L 464,306" fill="none" stroke="black"/>
                  <path d="M 480,302 L 504,302" fill="none" stroke="black"/>
                  <path d="M 480,306 L 504,306" fill="none" stroke="black"/>
                  <path d="M 216,320 L 232,320" fill="none" stroke="black"/>
                  <path d="M 248,320 L 272,320" fill="none" stroke="black"/>
                  <path d="M 344,320 L 360,320" fill="none" stroke="black"/>
                  <path d="M 208,352 L 232,352" fill="none" stroke="black"/>
                  <path d="M 248,352 L 272,352" fill="none" stroke="black"/>
                  <path d="M 336,352 L 352,352" fill="none" stroke="black"/>
                  <path d="M 216,384 L 232,384" fill="none" stroke="black"/>
                  <path d="M 256,384 L 272,384" fill="none" stroke="black"/>
                  <path d="M 336,384 L 360,384" fill="none" stroke="black"/>
                  <path d="M 72,398 L 88,398" fill="none" stroke="black"/>
                  <path d="M 72,402 L 88,402" fill="none" stroke="black"/>
                  <path d="M 112,398 L 136,398" fill="none" stroke="black"/>
                  <path d="M 112,402 L 136,402" fill="none" stroke="black"/>
                  <path d="M 24,464 L 48,464" fill="none" stroke="black"/>
                  <path d="M 136,464 L 208,464" fill="none" stroke="black"/>
                  <path d="M 360,464 L 432,464" fill="none" stroke="black"/>
                  <path d="M 528,464 L 552,464" fill="none" stroke="black"/>
                  <path d="M 24,32 C 15.16936,32 8,39.16936 8,48" fill="none" stroke="black"/>
                  <path d="M 48,32 C 56.83064,32 64,39.16936 64,48" fill="none" stroke="black"/>
                  <path d="M 528,32 C 519.16936,32 512,39.16936 512,48" fill="none" stroke="black"/>
                  <path d="M 552,32 C 560.83064,32 568,39.16936 568,48" fill="none" stroke="black"/>
                  <path d="M 24,464 C 15.16936,464 8,456.83064 8,448" fill="none" stroke="black"/>
                  <path d="M 48,464 C 56.83064,464 64,456.83064 64,448" fill="none" stroke="black"/>
                  <path d="M 528,464 C 519.16936,464 512,456.83064 512,448" fill="none" stroke="black"/>
                  <path d="M 552,464 C 560.83064,464 568,456.83064 568,448" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="512,304 500,298.4 500,309.6" fill="black" transform="rotate(0,504,304)"/>
                  <polygon class="arrowhead" points="512,256 500,250.4 500,261.6" fill="black" transform="rotate(0,504,256)"/>
                  <polygon class="arrowhead" points="512,208 500,202.4 500,213.6" fill="black" transform="rotate(0,504,208)"/>
                  <polygon class="arrowhead" points="512,64 500,58.4 500,69.6" fill="black" transform="rotate(0,504,64)"/>
                  <polygon class="arrowhead" points="448,304 436,298.4 436,309.6" fill="black" transform="rotate(180,440,304)"/>
                  <polygon class="arrowhead" points="448,256 436,250.4 436,261.6" fill="black" transform="rotate(180,440,256)"/>
                  <polygon class="arrowhead" points="448,208 436,202.4 436,213.6" fill="black" transform="rotate(180,440,208)"/>
                  <polygon class="arrowhead" points="360,352 348,346.4 348,357.6" fill="black" transform="rotate(0,352,352)"/>
                  <polygon class="arrowhead" points="360,160 348,154.4 348,165.6" fill="black" transform="rotate(0,352,160)"/>
                  <polygon class="arrowhead" points="224,384 212,378.4 212,389.6" fill="black" transform="rotate(180,216,384)"/>
                  <polygon class="arrowhead" points="224,320 212,314.4 212,325.6" fill="black" transform="rotate(180,216,320)"/>
                  <polygon class="arrowhead" points="224,192 212,186.4 212,197.6" fill="black" transform="rotate(180,216,192)"/>
                  <polygon class="arrowhead" points="136,112 124,106.4 124,117.6" fill="black" transform="rotate(0,128,112)"/>
                  <polygon class="arrowhead" points="80,400 68,394.4 68,405.6" fill="black" transform="rotate(180,72,400)"/>
                  <polygon class="arrowhead" points="80,64 68,58.4 68,69.6" fill="black" transform="rotate(180,72,64)"/>
                  <g class="text">
                    <text x="32" y="52">End</text>
                    <text x="540" y="52">RO</text>
                    <text x="36" y="68">User</text>
                    <text x="224" y="68">1</text>
                    <text x="292" y="68">Identify</text>
                    <text x="340" y="68">RO</text>
                    <text x="96" y="116">2</text>
                    <text x="172" y="116">Client</text>
                    <text x="396" y="116">AS</text>
                    <text x="84" y="132">RO</text>
                    <text x="108" y="132">ID</text>
                    <text x="172" y="132">Instance</text>
                    <text x="240" y="164">3</text>
                    <text x="292" y="164">Req.</text>
                    <text x="240" y="196">4</text>
                    <text x="292" y="196">Res.</text>
                    <text x="472" y="212">5</text>
                    <text x="472" y="228">AuthN</text>
                    <text x="472" y="260">6</text>
                    <text x="472" y="276">AuthZ</text>
                    <text x="472" y="308">7</text>
                    <text x="240" y="324">8</text>
                    <text x="308" y="324">Finish</text>
                    <text x="472" y="324">Completed</text>
                    <text x="240" y="356">9</text>
                    <text x="304" y="356">Cont.</text>
                    <text x="244" y="388">10</text>
                    <text x="304" y="388">Subj.</text>
                    <text x="100" y="404">11</text>
                    <text x="300" y="404">Info</text>
                    <text x="100" y="420">Return</text>
                    <text x="84" y="436">RO</text>
                    <text x="92" y="452">Info</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art" align="left" pn="section-1.6.8-2.1.2">
 .----.                                                         .----.
| End  |                                                       |  RO  |
| User |&lt;=================(1)== Identify RO ==================&gt;|      |
|      |                                                       |      |
|      |        +--------+                  +--------+         |      |
|      +==(2)==&gt;| Client |                  |   AS   |         |      |
|      | RO ID  |Instance|                  |        |         |      |
|      |        |        |                  |        |         |      |
|      |        |        +--(3)-- Req. ----&gt;|        |         |      |
|      |        |        |                  |        |         |      |
|      |        |        |&lt;-(4)-- Res. -----+        |         |      |
|      |        |        |                  |        |&lt;==(5)==&gt;|      |
|      |        |        |                  |        |  AuthN  |      |
|      |        |        |                  |        |         |      |
|      |        |        |                  |        |&lt;==(6)==&gt;|      |
|      |        |        |                  |        |  AuthZ  |      |
|      |        |        |                  |        |         |      |
|      |        |        |                  |        |&lt;==(7)==&gt;|      |
|      |        |        |&lt;-(8)--- Finish --+        |Completed|      |
|      |        |        |                  |        |         |      |
|      |        |        +--(9)--- Cont. --&gt;|        |         |      |
|      |        |        |                  |        |         |      |
|      |        |        |&lt;-(10)-- Subj. ---+        |         |      |
|      |&lt;=(11)==+        |         Info     |        |         |      |
|      | Return |        |                  |        |         |      |
|      | RO     |        |                  |        |         |      |
|      | Info   |        |                  |        |         |      |
 `----`         +--------+                  +--------+          `----`
</artwork>
            </artset>
          </figure>
          <t indent="0" pn="section-1.6.8-3">Precondition: The end user is authenticated to the client instance, and the client
instance has an identifier representing the end user that it can present to the AS.
This identifier should be unique to the particular session with the client instance
and the AS.
The client instance is also known to the AS and allowed to access this
advanced functionality where the information of someone other than
the end user is returned to the client instance.</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-1.6.8-4">
            <li pn="section-1.6.8-4.1">
              <t indent="0" pn="section-1.6.8-4.1.1">(1) The RO communicates a human-readable
identifier to the end user, such as an email address or account number. This communication
happens out of band from the protocol, such as over the phone between parties. Note that the
RO is not interacting with the client instance.</t>
            </li>
            <li pn="section-1.6.8-4.2">
              <t indent="0" pn="section-1.6.8-4.2.1">(2) The end user communicates the identifier to the client instance. The means by which the
 identifier is communicated to the client instance are out of scope for this specification.</t>
            </li>
            <li pn="section-1.6.8-4.3">
              <t indent="0" pn="section-1.6.8-4.3.1">(3) The client instance requests access to subject information (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>).
 The request includes the RO's identifier in the
 <tt>sub_ids</tt> field of the subject information request 
	      (<xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"> </xref>) 
 and the end user's identifier in the <tt>user</tt> field (<xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"> </xref>).
 The request includes no interaction start methods, since the end user is not expected to
 be the one interacting with the AS. The request does include the
 push-based interaction finish method (<xref target="request-interact-callback-push" format="default" sectionFormat="of" derivedContent="Section 2.5.2.2"> </xref>) to allow the AS
 to signal to the client instance when the interaction with the RO has concluded.</t>
            </li>
            <li pn="section-1.6.8-4.4">
              <t indent="0" pn="section-1.6.8-4.4.1">(4) The AS sees that the identifiers for the end user and subject being requested are different.
 The AS determines that it can reach out to the RO asynchronously for approval. While it
 is doing so, the AS returns a continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) with a <tt>finish</tt> nonce
 to allow the client instance to continue the grant request after interaction with the RO has concluded.</t>
            </li>
            <li pn="section-1.6.8-4.5">
              <t indent="0" pn="section-1.6.8-4.5.1">(5) The AS contacts the RO and has them authenticate to the system. The means for doing this are
 outside the scope of this specification, but the identity of the RO is known from the Subject
 Identifier sent in (3).</t>
            </li>
            <li pn="section-1.6.8-4.6">
              <t indent="0" pn="section-1.6.8-4.6.1">(6) The RO is prompted to authorize the end user's request via the client instance. Since the end
 user was identified in (3) via the <tt>user</tt> field, the AS can show this information to the
 RO during the authorization request.</t>
            </li>
            <li pn="section-1.6.8-4.7">
              <t indent="0" pn="section-1.6.8-4.7.1">(7) The RO completes the authorization with the AS. The AS marks the request as <em>approved</em>.</t>
            </li>
            <li pn="section-1.6.8-4.8">
              <t indent="0" pn="section-1.6.8-4.8.1">(8) The RO pushes the interaction finish message (<xref target="interaction-pushback" format="default" sectionFormat="of" derivedContent="Section 4.2.2"> </xref>) to the client instance.
 Note that in the case the RO cannot be reached or the RO denies the request, the AS still sends the interaction
 finish message to the client instance, after which the client instance can negotiate next steps if possible.</t>
            </li>
            <li pn="section-1.6.8-4.9">
              <t indent="0" pn="section-1.6.8-4.9.1">(9) The client instance validates the interaction finish message and
 continues the grant request (<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"> </xref>).</t>
            </li>
            <li pn="section-1.6.8-4.10">
              <t indent="0" pn="section-1.6.8-4.10.1">(10) The AS returns the RO's subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) to the client instance.</t>
            </li>
            <li pn="section-1.6.8-4.11">
              <t indent="0" pn="section-1.6.8-4.11.1">(11) The client instance can display or otherwise utilize the RO's user information in its session
with the end user. Note that since the client instance requested different sets of user
information in (3), the client instance does not conflate the end user with the RO.</t>
            </li>
          </ul>
          <t indent="0" pn="section-1.6.8-5">Additional considerations for asynchronous interactions like this are discussed in
<xref target="security-async" format="default" sectionFormat="of" derivedContent="Section 11.36"/>.</t>
        </section>
      </section>
    </section>
    <section anchor="request" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-requesting-access">Requesting Access</name>
      <t indent="0" pn="section-2-1">To start a request, the client instance sends an HTTP POST with a JSON <xref target="RFC8259" format="default" sectionFormat="of" derivedContent="RFC8259"> </xref> document
to the grant endpoint of the AS. The grant endpoint is a URI that uniquely identifies
the AS to client instances and serves as the identifier for the AS. The document is a JSON object
where each field represents a different aspect of the
client instance's request. Each field is described in detail in a subsection below.</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-2-2">
        <dt pn="section-2-2.1"><tt>access_token</tt> (object / array of objects):</dt>
        <dd pn="section-2-2.2">
          <t indent="0" pn="section-2-2.2.1">Describes the rights and properties associated with the requested access token. <bcp14>REQUIRED</bcp14> if requesting an access token. See <xref target="request-token" format="default" sectionFormat="of" derivedContent="Section 2.1"/>.</t>
        </dd>
        <dt pn="section-2-2.3"><tt>subject</tt> (object):</dt>
        <dd pn="section-2-2.4">
          <t indent="0" pn="section-2-2.4.1">Describes the information about the RO that the client instance is requesting to be returned
  directly in the response from the AS. <bcp14>REQUIRED</bcp14> if requesting subject information. See <xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"/>.</t>
        </dd>
        <dt pn="section-2-2.5"><tt>client</tt> (object / string):</dt>
        <dd pn="section-2-2.6">
          <t indent="0" pn="section-2-2.6.1">Describes the client instance that is making this request, including
  the key that the client instance will use to protect this request, any continuation
  requests at the AS, and any user-facing information about the client instance used in
  interactions. <bcp14>REQUIRED</bcp14>. See <xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"/>.</t>
        </dd>
        <dt pn="section-2-2.7"><tt>user</tt> (object / string):</dt>
        <dd pn="section-2-2.8">
          <t indent="0" pn="section-2-2.8.1">Identifies the end user to the AS in a manner that the AS can verify, either directly or
  by interacting with the end user to determine their status as the RO. <bcp14>OPTIONAL</bcp14>. See <xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"/>.</t>
        </dd>
        <dt pn="section-2-2.9"><tt>interact</tt> (object):</dt>
        <dd pn="section-2-2.10">
          <t indent="0" pn="section-2-2.10.1">Describes the modes that the client instance supports for allowing the RO to interact with the
  AS and modes for the client instance to receive updates when interaction is complete. <bcp14>REQUIRED</bcp14> if interaction is supported. See <xref target="request-interact" format="default" sectionFormat="of" derivedContent="Section 2.5"/>.</t>
        </dd>
      </dl>
      <t indent="0" pn="section-2-3">Additional members of this request object can be defined by extensions using the "GNAP Grant Request Parameters" registry (<xref target="IANA-grant-request" format="default" sectionFormat="of" derivedContent="Section 10.3"/>).</t>
      <t indent="0" pn="section-2-4">A non-normative example of a grant request is below:</t>
      <sourcecode type="json" markers="false" pn="section-2-5">
{
    "access_token": {
        "access": [
            {
                "type": "photo-api",
                "actions": [
                    "read",
                    "write",
                    "dolphin"
                ],
                "locations": [
                    "https://server.example.net/",
                    "https://resource.local/other"
                ],
                "datatypes": [
                    "metadata",
                    "images"
                ]
            },
            "dolphin-metadata"
        ]
    },
    "client": {
      "display": {
        "name": "My Client Display Name",
        "uri": "https://example.net/client"
      },
      "key": {
        "proof": "httpsig",
        "jwk": {
          "kty": "RSA",
          "e": "AQAB",
          "kid": "xyz-1",
          "alg": "RS256",
          "n": "kOB5rR4Jv0GMeL...."
        }
      }
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.example.net/return/123455",
            "nonce": "LKLTI25DK82FX4T4QFZC"
        }
    },
    "subject": {
        "sub_id_formats": ["iss_sub", "opaque"],
        "assertion_formats": ["id_token"]
    }
}
</sourcecode>
      <t indent="0" pn="section-2-6">Sending a request to the grant endpoint creates a grant request in the <em>processing</em> state. The AS processes this request to determine whether interaction or authorization are necessary (moving to the <em>pending</em> state) or if access can be granted immediately (moving to the <em>approved</em> state).</t>
      <t indent="0" pn="section-2-7">The request <bcp14>MUST</bcp14> be sent as a JSON object in the content of the HTTP
POST request with Content-Type <tt>application/json</tt>. A key proofing mechanism <bcp14>MAY</bcp14>
define an alternative content type, as long as the content is formed from
the JSON object. For example, the attached JSON Web Signature (JWS) key proofing mechanism (see <xref target="attached-jws" format="default" sectionFormat="of" derivedContent="Section 7.3.4"/>) places the JSON object
into the payload of a JWS wrapper, which is in turn sent as the message content.</t>
      <section anchor="request-token" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-requesting-access-to-resour">Requesting Access to Resources</name>
        <t indent="0" pn="section-2.1-1">If the client instance is requesting one or more access tokens for the
purpose of accessing an API, the client instance <bcp14>MUST</bcp14> include an <tt>access_token</tt>
field. This field <bcp14>MUST</bcp14> be an object (for a single access token (<xref target="request-token-single" format="default" sectionFormat="of" derivedContent="Section 2.1.1"> </xref>)) or
an array of these objects (for multiple access tokens (<xref target="request-token-multiple" format="default" sectionFormat="of" derivedContent="Section 2.1.2"> </xref>)),
as described in the following subsections.</t>
        <section anchor="request-token-single" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.1">
          <name slugifiedName="name-requesting-a-single-access-">Requesting a Single Access Token</name>
          <t indent="0" pn="section-2.1.1-1">To request a single access token, the client instance sends an <tt>access_token</tt> object
composed of the following fields.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.1.1-2">
            <dt pn="section-2.1.1-2.1"><tt>access</tt> (array of objects/strings):</dt>
            <dd pn="section-2.1.1-2.2">
              <t indent="0" pn="section-2.1.1-2.2.1">Describes the rights that the client instance is requesting for the access token to be
  used at the RS. <bcp14>REQUIRED</bcp14>. See <xref target="resource-access-rights" format="default" sectionFormat="of" derivedContent="Section 8"/>.</t>
            </dd>
            <dt pn="section-2.1.1-2.3"><tt>label</tt> (string):</dt>
            <dd pn="section-2.1.1-2.4">
              <t indent="0" pn="section-2.1.1-2.4.1">A unique name chosen by the client instance to refer to the resulting access token. The value of this
  field is opaque to the AS and is not intended to be exposed to or used by the end user.  If this field
  is included in the request, the AS <bcp14>MUST</bcp14> include the same label in the token response (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>).
  <bcp14>REQUIRED</bcp14> if used as part of a request for multiple access tokens (<xref target="request-token-multiple" format="default" sectionFormat="of" derivedContent="Section 2.1.2"> </xref>);
  <bcp14>OPTIONAL</bcp14> otherwise.</t>
            </dd>
            <dt pn="section-2.1.1-2.5"><tt>flags</tt> (array of strings):</dt>
            <dd pn="section-2.1.1-2.6">
              <t indent="0" pn="section-2.1.1-2.6.1">A set of flags that indicate desired attributes or behavior to be attached to the access token by the
  AS. <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-2.1.1-3">The values of the <tt>flags</tt> field defined by this specification are as follows:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.1.1-4">
            <dt pn="section-2.1.1-4.1"><tt>"bearer"</tt>:</dt>
            <dd pn="section-2.1.1-4.2">
              <t indent="0" pn="section-2.1.1-4.2.1">If this flag is included, the access token being requested is a bearer token.
  If this flag is omitted, the access token is bound to the key used
  by the client instance in this request (or that key's most recent rotation),
  and the access token <bcp14>MUST</bcp14> be presented using the same key and proofing method.
  Methods for presenting bound and bearer access tokens are described
  in <xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/>. See <xref target="security-bearer-tokens" format="default" sectionFormat="of" derivedContent="Section 11.9"/> for additional
  considerations on the use of bearer tokens.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-2.1.1-5">Flag values <bcp14>MUST NOT</bcp14> be included more than once. If the request includes a flag value multiple times, the AS <bcp14>MUST</bcp14> return an <tt>invalid_flag</tt> error defined in <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>.</t>
          <t indent="0" pn="section-2.1.1-6">Additional flags can be defined by extensions using the "GNAP Access Token Flags" registry (<xref target="IANA-token-flags" format="default" sectionFormat="of" derivedContent="Section 10.4"/>).</t>
          <t indent="0" pn="section-2.1.1-7">In the following non-normative example, the client instance is requesting access to a complex resource
described by a pair of access request object.</t>
          <sourcecode type="json" markers="false" pn="section-2.1.1-8">
"access_token": {
    "access": [
        {
            "type": "photo-api",
            "actions": [
                "read",
                "write",
                "delete"
            ],
            "locations": [
                "https://server.example.net/",
                "https://resource.local/other"
            ],
            "datatypes": [
                "metadata",
                "images"
            ]
        },
        {
            "type": "walrus-access",
            "actions": [
                "foo",
                "bar"
            ],
            "locations": [
                "https://resource.other/"
            ],
            "datatypes": [
                "data",
                "pictures",
                "walrus whiskers"
            ]
        }
    ],
    "label": "token1-23"
}
</sourcecode>
          <t indent="0" pn="section-2.1.1-9">If access is approved, the resulting access token is valid for the described resource.
Since the <tt>bearer</tt> flag is not provided in this example, the token is bound to the client instance's key (or its most recent rotation). The token
is labeled "token1-23". The token response structure is described in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>.</t>
        </section>
        <section anchor="request-token-multiple" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.2">
          <name slugifiedName="name-requesting-multiple-access-">Requesting Multiple Access Tokens</name>
          <t indent="0" pn="section-2.1.2-1">To request that multiple access tokens be returned in a single response, the
client instance sends an array of objects as the value of the <tt>access_token</tt>
parameter. Each object <bcp14>MUST</bcp14> conform to the request format for a single
access token request, as specified in
<xref target="request-token-single" format="default" sectionFormat="of" derivedContent="Section 2.1.1"/>.
Additionally, each object in the array <bcp14>MUST</bcp14> include the <tt>label</tt> field, and
all values of these fields <bcp14>MUST</bcp14> be unique within the request. If the
client instance does not include a <tt>label</tt> value for any entry in the
array or the values of the <tt>label</tt> field are not unique within the array,
the AS <bcp14>MUST</bcp14> return an "invalid_request" error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
          <t indent="0" pn="section-2.1.2-2">The following non-normative example shows a request for two
separate access tokens: <tt>token1</tt> and <tt>token2</tt>.</t>
          <sourcecode type="json" markers="false" pn="section-2.1.2-3">
"access_token": [
    {
        "label": "token1",
        "access": [
            {
                "type": "photo-api",
                "actions": [
                    "read",
                    "write",
                    "dolphin"
                ],
                "locations": [
                    "https://server.example.net/",
                    "https://resource.local/other"
                ],
                "datatypes": [
                    "metadata",
                    "images"
                ]
            },
            "dolphin-metadata"
        ]
    },
    {
        "label": "token2",
        "access": [
            {
                "type": "walrus-access",
                "actions": [
                    "foo",
                    "bar"
                ],
                "locations": [
                    "https://resource.other/"
                ],
                "datatypes": [
                    "data",
                    "pictures",
                    "walrus whiskers"
                ]
            }
        ],
        "flags": [ "bearer" ]
    }
]
</sourcecode>
          <t indent="0" pn="section-2.1.2-4">All approved access requests are returned in the response structure for
multiple access tokens (<xref target="response-token-multiple" format="default" sectionFormat="of" derivedContent="Section 3.2.2"> </xref>) using
the values of the <tt>label</tt> fields in the request.</t>
        </section>
      </section>
      <section anchor="request-subject" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-requesting-subject-informati">Requesting Subject Information</name>
        <t indent="0" pn="section-2.2-1">If the client instance is requesting information about the RO from
the AS, it sends a <tt>subject</tt> field as a JSON object. This object <bcp14>MAY</bcp14>
contain the following fields.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-2.2-2">
          <dt pn="section-2.2-2.1"><tt>sub_id_formats</tt> (array of strings):</dt>
          <dd pn="section-2.2-2.2">
            <t indent="0" pn="section-2.2-2.2.1">An array of Subject Identifier subject formats
  requested for the RO, as defined by <xref target="RFC9493" format="default" sectionFormat="of" derivedContent="RFC9493"/>.
  <bcp14>REQUIRED</bcp14> if Subject Identifiers are requested.</t>
          </dd>
          <dt pn="section-2.2-2.3"><tt>assertion_formats</tt> (array of strings):</dt>
          <dd pn="section-2.2-2.4">
            <t indent="0" pn="section-2.2-2.4.1">An array of requested assertion formats. Possible values include
  <tt>id_token</tt> for an OpenID Connect ID Token <xref target="OIDC" format="default" sectionFormat="of" derivedContent="OIDC"/> and <tt>saml2</tt> for a Security Assertion Markup Language (SAML) 2 assertion <xref target="SAML2" format="default" sectionFormat="of" derivedContent="SAML2"/>. Additional
  assertion formats can be defined in the "GNAP Assertion Formats" registry (<xref target="IANA-assertion-formats" format="default" sectionFormat="of" derivedContent="Section 10.6"/>).
  <bcp14>REQUIRED</bcp14> if assertions are requested.</t>
          </dd>
          <dt pn="section-2.2-2.5"><tt>sub_ids</tt> (array of objects):</dt>
          <dd pn="section-2.2-2.6">
            <t indent="0" pn="section-2.2-2.6.1">An array of Subject Identifiers representing the subject for which information
  is being requested. Each object is a Subject Identifier as defined by
  <xref target="RFC9493" format="default" sectionFormat="of" derivedContent="RFC9493"/>. All identifiers in the <tt>sub_ids</tt> array <bcp14>MUST</bcp14> identify
  the same subject. If omitted, the AS <bcp14>SHOULD</bcp14> assume
  that subject information requests are about the current user and <bcp14>SHOULD</bcp14>
  require direct interaction or proof of presence before releasing information. <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-2.2-3">Additional fields can be defined in the "GNAP Subject Information Request Fields" registry (<xref target="IANA-subject-request" format="default" sectionFormat="of" derivedContent="Section 10.5"/>).</t>
        <sourcecode type="json" markers="false" pn="section-2.2-4">
"subject": {
  "sub_id_formats": [ "iss_sub", "opaque" ],
  "assertion_formats": [ "id_token", "saml2" ]
}
</sourcecode>
        <t indent="0" pn="section-2.2-5">The AS can determine the RO's identity and permission for releasing
this information through interaction with the RO (<xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"> </xref>),
AS policies, or assertions presented by the client instance (<xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"> </xref>). If
this is determined positively, the AS <bcp14>MAY</bcp14> return the RO's information in its response (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>)
as requested.</t>
        <t indent="0" pn="section-2.2-6">Subject Identifier types requested by the client instance serve only to identify
the RO in the context of the AS and can't be used as communication
channels by the client instance, as discussed in <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/>.</t>
      </section>
      <section anchor="request-client" numbered="true" removeInRFC="false" toc="include" pn="section-2.3">
        <name slugifiedName="name-identifying-the-client-inst">Identifying the Client Instance</name>
        <t indent="0" pn="section-2.3-1">When sending a new grant request to the AS, the client instance <bcp14>MUST</bcp14> identify
itself by including its client information in the <tt>client</tt> field of the request and by signing the
request with its unique key as described in <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/>. Note that once a
grant has been created and is in either the <em>pending</em> or the <em>approved</em> state, the AS can
determine which client is associated with the grant by dereferencing the
continuation access token sent in the continuation request (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>).
As a consequence, the <tt>client</tt> field is not sent or accepted for continuation requests.</t>
        <t indent="0" pn="section-2.3-2">Client information is sent by value as an object or by reference as a string (see <xref target="request-instance" format="default" sectionFormat="of" derivedContent="Section 2.3.1"/>).</t>
        <t indent="0" pn="section-2.3-3">When client instance information is sent
by value, the <tt>client</tt> field of the request consists of a JSON
object with the following fields.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-2.3-4">
          <dt pn="section-2.3-4.1"><tt>key</tt> (object / string):</dt>
          <dd pn="section-2.3-4.2">
            <t indent="0" pn="section-2.3-4.2.1">The public key of the client instance to be used in this request as
  described in <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/> or a reference to a key as
  described in <xref target="key-reference" format="default" sectionFormat="of" derivedContent="Section 7.1.1"/>. <bcp14>REQUIRED</bcp14>.</t>
          </dd>
          <dt pn="section-2.3-4.3"><tt>class_id</tt> (string):</dt>
          <dd pn="section-2.3-4.4">
            <t indent="0" pn="section-2.3-4.4.1">An identifier string that the AS can use to identify the
  client software comprising this client instance. The contents
  and format of this field are up to the AS. <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
          <dt pn="section-2.3-4.5"><tt>display</tt> (object):</dt>
          <dd pn="section-2.3-4.6">
            <t indent="0" pn="section-2.3-4.6.1">An object containing additional information that the AS
  <bcp14>MAY</bcp14> display to the RO during interaction, authorization,
  and management. <bcp14>OPTIONAL</bcp14>. See <xref target="request-display" format="default" sectionFormat="of" derivedContent="Section 2.3.2"/>.</t>
          </dd>
        </dl>
        <sourcecode type="json" markers="false" pn="section-2.3-5">
"client": {
    "key": {
        "proof": "httpsig",
        "jwk": {
            "kty": "RSA",
            "e": "AQAB",
            "kid": "xyz-1",
            "alg": "RS256",
            "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8..."
        }
    },
    "class_id": "web-server-1234",
    "display": {
        "name": "My Client Display Name",
        "uri": "https://example.net/client"
    }
}
</sourcecode>
        <t indent="0" pn="section-2.3-6">Additional fields can be defined in the "GNAP Client Instance Fields" registry (<xref target="IANA-client-instance" format="default" sectionFormat="of" derivedContent="Section 10.7"/>).</t>
        <t indent="0" pn="section-2.3-7">Absent additional attestations, profiles, or trust mechanisms, both the <tt>display</tt> and <tt>class_id</tt> fields are self-declarative, presented by the client instance. The AS needs to exercise caution in their interpretation, taking them as a hint but not as absolute truth. The <tt>class_id</tt> field can be used in a variety of ways to help the AS make sense of the particular context in which the client instance is operating. In corporate environments, for example, different levels of trust might apply depending on security policies. This field aims to help the AS adjust its own access decisions for different classes of client software. It is possible to configure a set of values and rules during a pre-registration and then have the client instances provide them later in runtime as a hint to the AS. In other cases, the client runs with a specific AS in mind, so a single hardcoded value would be acceptable (for instance, a set-top box with a <tt>class_id</tt> claiming to be "FooBarTV version 4"). While the client instance may not have contacted the AS yet, the value of this <tt>class_id</tt> field can be evaluated by the AS according to a broader context of dynamic use, alongside other related information available elsewhere (for instance, corresponding fields in a certificate). If the AS is not able to interpret or validate the class_id field, it <bcp14>MUST</bcp14> either return an <tt>invalid_client</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>) or interpret the request as if the class_id were not present. See additional discussion of client instance impersonation in <xref target="security-impersonation" format="default" sectionFormat="of" derivedContent="Section 11.15"/>.</t>
        <t indent="0" pn="section-2.3-8">The client instance <bcp14>MUST</bcp14> prove possession of any presented key by the proofing mechanism
associated with the key in the request. Key proofing methods
are defined in the "GNAP Key Proofing Methods" registry (<xref target="IANA-key-proof-methods" format="default" sectionFormat="of" derivedContent="Section 10.16"/>), and an initial set of methods
is described in <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/>.</t>
        <t indent="0" pn="section-2.3-9">If the same public key is sent by value on different access requests, the AS <bcp14>MUST</bcp14>
treat these requests as coming from the same client instance for purposes
of identification, authentication, and policy application.</t>
        <t indent="0" pn="section-2.3-10">If the AS does not know the client instance's public key ahead of time, the AS
can choose how to process the unknown key. Common approaches include:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2.3-11">
          <li pn="section-2.3-11.1">
            <t indent="0" pn="section-2.3-11.1.1">Allowing the request and requiring RO authorization in a trust-on-first-use model</t>
          </li>
          <li pn="section-2.3-11.2">
            <t indent="0" pn="section-2.3-11.2.1">Limiting the client's requested access to only certain APIs and information</t>
          </li>
          <li pn="section-2.3-11.3">
            <t indent="0" pn="section-2.3-11.3.1">Denying the request entirely by returning an <tt>invalid_client</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>)</t>
          </li>
        </ul>
        <t indent="0" pn="section-2.3-12">The client instance <bcp14>MUST NOT</bcp14> send a symmetric key by value in the <tt>key</tt> field of the request, as doing so would expose
the key directly instead of simply proving possession of it. See considerations on symmetric keys
in <xref target="security-symmetric" format="default" sectionFormat="of" derivedContent="Section 11.7"/>. To use symmetric keys, the client instance can send the <tt>key</tt> by reference (<xref target="key-reference" format="default" sectionFormat="of" derivedContent="Section 7.1.1"/>) or
send the entire client identity by reference (<xref target="request-instance" format="default" sectionFormat="of" derivedContent="Section 2.3.1"/>).</t>
        <t indent="0" pn="section-2.3-13">The client instance's key can be pre-registered with the AS ahead of time and associated
with a set of policies and allowable actions pertaining to that client. If this pre-registration
includes other fields that can occur in the <tt>client</tt> request object described in this section,
such as <tt>class_id</tt> or <tt>display</tt>, the pre-registered values <bcp14>MUST</bcp14> take precedence over any values
given at runtime. Additional fields sent during a request but not present in a pre-registered
client instance record at the AS <bcp14>SHOULD NOT</bcp14> be added to the client's pre-registered record.
See additional considerations regarding client instance impersonation in <xref target="security-impersonation" format="default" sectionFormat="of" derivedContent="Section 11.15"/>.</t>
        <t indent="0" pn="section-2.3-14">A client instance that is capable of talking to multiple ASes <bcp14>SHOULD</bcp14> use a different key for each
AS to prevent a class of mix-up attacks as described in <xref target="security-cuckoo" format="default" sectionFormat="of" derivedContent="Section 11.31"/>, unless other mechanisms
can be used to assure the identity of the AS for a given request.</t>
        <section anchor="request-instance" numbered="true" removeInRFC="false" toc="include" pn="section-2.3.1">
          <name slugifiedName="name-identifying-the-client-insta">Identifying the Client Instance by Reference</name>
          <t indent="0" pn="section-2.3.1-1">If the client instance has an instance identifier that the AS can use to determine
appropriate key information, the client instance can send this instance
identifier as a direct reference value in lieu of the <tt>client</tt> object.
The instance identifier <bcp14>MAY</bcp14> be assigned to a client instance at runtime
through a grant response (<xref target="response-dynamic-handles" format="default" sectionFormat="of" derivedContent="Section 3.5"/>) or <bcp14>MAY</bcp14> be obtained in another fashion,
such as a static registration process at the AS.</t>
          <sourcecode type="json" markers="false" pn="section-2.3.1-2">
"client": "client-541-ab"
</sourcecode>
          <t indent="0" pn="section-2.3.1-3">When the AS receives a request with an instance identifier, the AS <bcp14>MUST</bcp14>
ensure that the key used to sign the request (<xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"> </xref>) is
associated with the instance identifier.</t>
          <t indent="0" pn="section-2.3.1-4">If the AS does not recognize the instance identifier, the request <bcp14>MUST</bcp14> be rejected
with an <tt>invalid_client</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
        </section>
        <section anchor="request-display" numbered="true" removeInRFC="false" toc="include" pn="section-2.3.2">
          <name slugifiedName="name-providing-displayable-clien">Providing Displayable Client Instance Information</name>
          <t indent="0" pn="section-2.3.2-1">If the client instance has additional information to display to the RO
during any interactions at the AS, it <bcp14>MAY</bcp14> send that information in the
"display" field. This field is a JSON object that declares information
to present to the RO during any interactive sequences.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.3.2-2">
            <dt pn="section-2.3.2-2.1"><tt>name</tt> (string):</dt>
            <dd pn="section-2.3.2-2.2">
              <t indent="0" pn="section-2.3.2-2.2.1">Display name of the client software. <bcp14>RECOMMENDED</bcp14>.</t>
            </dd>
            <dt pn="section-2.3.2-2.3"><tt>uri</tt> (string):</dt>
            <dd pn="section-2.3.2-2.4">
              <t indent="0" pn="section-2.3.2-2.4.1">User-facing information about the client software, such as a web page. This URI <bcp14>MUST</bcp14> be an absolute URI. <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
            <dt pn="section-2.3.2-2.5"><tt>logo_uri</tt> (string):</dt>
            <dd pn="section-2.3.2-2.6">
              <t indent="0" pn="section-2.3.2-2.6.1">Display image to represent the client software. This URI <bcp14>MUST</bcp14> be an absolute URI. The logo <bcp14>MAY</bcp14> be passed by value by using a data: URI <xref target="RFC2397" format="default" sectionFormat="of" derivedContent="RFC2397"/> referencing an image media type. <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
          </dl>
          <sourcecode type="json" markers="false" pn="section-2.3.2-3">
"display": {
    "name": "My Client Display Name",
    "uri": "https://example.net/client",
    "logo_uri": "data:image/png;base64,Eeww...="
}
</sourcecode>
          <t indent="0" pn="section-2.3.2-4">Additional display fields can be defined in the "GNAP Client Instance Display Fields" registry (<xref target="IANA-client-instance-display" format="default" sectionFormat="of" derivedContent="Section 10.8"/>).</t>
          <t indent="0" pn="section-2.3.2-5">The AS <bcp14>SHOULD</bcp14> use these values during interaction with the RO.
The values are for informational purposes only and <bcp14>MUST NOT</bcp14>
be taken as authentic proof of the client instance's identity or source.
The AS <bcp14>MAY</bcp14> restrict display values to specific client instances, as identified
by their keys in <xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"/>. See additional considerations for displayed
client information in <xref target="security-impersonation" format="default" sectionFormat="of" derivedContent="Section 11.15"/> and for the <tt>logo_uri</tt> in
particular in <xref target="security-client-hosted-logo" format="default" sectionFormat="of" derivedContent="Section 11.16"/>.</t>
        </section>
        <section anchor="request-key-authenticate" numbered="true" removeInRFC="false" toc="include" pn="section-2.3.3">
          <name slugifiedName="name-authenticating-the-client-i">Authenticating the Client Instance</name>
          <t indent="0" pn="section-2.3.3-1">If the presented key is known to the AS and is associated with a single instance
of the client software, the process of presenting a key and proving possession of that key
is sufficient to authenticate the client instance to the AS. The AS <bcp14>MAY</bcp14> associate policies
with the client instance identified by this key, such as limiting which resources
can be requested and which interaction methods can be used. For example, only
specific client instances with certain known keys might be trusted with access tokens without the
AS interacting directly with the RO, as in <xref target="example-no-user" format="default" sectionFormat="of" derivedContent="Appendix B.3"/>.</t>
          <t indent="0" pn="section-2.3.3-2">The presentation of a key allows the AS to strongly associate multiple
successive requests from the same client instance with each other. This
is true when the AS knows the key ahead of time and can use the key to
authenticate the client instance, but it is also true if the key is
ephemeral and created just for this series of requests. As such, the
AS <bcp14>MAY</bcp14> allow for client instances to make requests with unknown keys. This pattern allows
for ephemeral client instances (such as single-page applications) and client software with many individual long-lived instances
(such as mobile applications) to generate key pairs per instance and use the keys within
the protocol without having to go through a separate registration step.
The AS <bcp14>MAY</bcp14> limit which capabilities are made available to client instances
with unknown keys. For example, the AS could have a policy saying that only
previously registered client instances can request particular resources or that all
client instances with unknown keys have to be interactively approved by an RO.</t>
        </section>
      </section>
      <section anchor="request-user" numbered="true" removeInRFC="false" toc="include" pn="section-2.4">
        <name slugifiedName="name-identifying-the-user">Identifying the User</name>
        <t indent="0" pn="section-2.4-1">If the client instance knows the identity of the end user through one or more
identifiers or assertions, the client instance <bcp14>MAY</bcp14> send that information to the
AS in the <tt>user</tt> field. The client instance <bcp14>MAY</bcp14> pass this information by value
or by reference (see <xref target="request-user-reference" format="default" sectionFormat="of" derivedContent="Section 2.4.1"/>).</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-2.4-2">
          <dt pn="section-2.4-2.1"><tt>sub_ids</tt> (array of objects):</dt>
          <dd pn="section-2.4-2.2">
            <t indent="0" pn="section-2.4-2.2.1">An array of Subject Identifiers for the
  end user, as defined by <xref target="RFC9493" format="default" sectionFormat="of" derivedContent="RFC9493"/>.
  <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
          <dt pn="section-2.4-2.3"><tt>assertions</tt> (array of objects):</dt>
          <dd pn="section-2.4-2.4">
            <t indent="0" pn="section-2.4-2.4.1">An array containing assertions as objects, each containing the assertion
  format and the assertion value as the JSON string serialization of the assertion,
  as defined in <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/>.
  <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
        </dl>
        <sourcecode type="json" markers="false" pn="section-2.4-3">
"user": {
  "sub_ids": [ {
    "format": "opaque",
    "id": "J2G8G8O4AZ"
  } ],
  "assertions": [ {
    "format": "id_token",
    "value": "eyj..."
  } ]
}
</sourcecode>
        <t indent="0" pn="section-2.4-4">Subject Identifiers are hints to the AS in determining the
RO and <bcp14>MUST NOT</bcp14> be taken as authoritative statements that a particular
RO is present at the client instance and acting as the end user.</t>
        <t indent="0" pn="section-2.4-5">Assertions presented by the client instance <bcp14>SHOULD</bcp14> be validated by the AS. While the details of
such validation are outside the scope of this specification, common validation steps include
verifying the signature of the assertion against a trusted signing key, verifying the audience
and issuer of the assertion map to expected values, and verifying the time window for the
assertion itself. However, note that in many use cases, some of these common steps are relaxed.
For example, an AS acting as an identity provider (IdP) could expect that assertions being presented using this
mechanism were issued by the AS to the client software. The AS would verify that the AS is the
issuer of the assertion, not the audience, and that the client instance is instead the audience of
the assertion. Similarly, an AS might accept a recently expired assertion in order to help
bootstrap a new session with a specific end user.</t>
        <t indent="0" pn="section-2.4-6">If the identified end user does not match the RO present at the AS
during an interaction step and the AS is not explicitly allowing a cross-user
authorization, the AS <bcp14>SHOULD</bcp14> reject the request with an <tt>unknown_user</tt> error  (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
        <t indent="0" pn="section-2.4-7">If the AS trusts the client instance to present verifiable assertions or known Subject Identifiers,
such as an opaque identifier issued by the AS for this specific client instance, the AS <bcp14>MAY</bcp14>
decide, based on its policy, to skip interaction with the RO, even
if the client instance provides one or more interaction modes in its request.</t>
        <t indent="0" pn="section-2.4-8">See <xref target="security-assertions" format="default" sectionFormat="of" derivedContent="Section 11.30"/> for considerations for the AS when accepting and
processing assertions from the client instance.</t>
        <section anchor="request-user-reference" numbered="true" removeInRFC="false" toc="include" pn="section-2.4.1">
          <name slugifiedName="name-identifying-the-user-by-ref">Identifying the User by Reference</name>
          <t indent="0" pn="section-2.4.1-1">The AS can identify the current end user to the client instance with a reference
that can be used by the client instance to refer to the end user across
multiple requests.
If the client instance has a reference for the end user at this AS, the
client instance <bcp14>MAY</bcp14> pass that reference as a string. The format of this string
is opaque to the client instance.</t>
          <sourcecode type="json" markers="false" pn="section-2.4.1-2">
"user": "XUT2MFM1XBIKJKSDU8QM"
</sourcecode>
          <t indent="0" pn="section-2.4.1-3">One means of dynamically obtaining such a user reference is from the AS returning
an <tt>opaque</tt> Subject Identifier as described in <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/>.
Other means of configuring a client instance with a user identifier are out
of scope of this specification.
The lifetime and validity of these user references are determined by the AS, and
this lifetime is not exposed to the client instance in GNAP. As such, a client instance
using such a user reference is likely to keep using that reference until
it stops working.</t>
          <t indent="0" pn="section-2.4.1-4">User reference identifiers are not intended to be human-readable
user identifiers or structured assertions. For the client instance to send
either of these, the client can use the full user request object (<xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"> </xref>) instead.</t>
          <t indent="0" pn="section-2.4.1-5">If the AS does not recognize the user reference, it <bcp14>MUST</bcp14>
return an <tt>unknown_user</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
        </section>
      </section>
      <section anchor="request-interact" numbered="true" removeInRFC="false" toc="include" pn="section-2.5">
        <name slugifiedName="name-interacting-with-the-user">Interacting with the User</name>
        <t indent="0" pn="section-2.5-1">Often, the AS will require interaction with the RO (<xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"> </xref>) in order to
approve a requested delegation to the client instance for both access to resources and direct
subject information. Many times, the end user using the client instance is the same person as
the RO, and the client instance can directly drive interaction with the end user by facilitating
the process through means such as redirection to a URI or launching an application. Other times, the
client instance can provide information to start the RO's interaction on a secondary
device, or the client instance will wait for the RO to approve the request asynchronously.
The client instance could also be signaled that interaction has concluded through a
callback mechanism.</t>
        <t indent="0" pn="section-2.5-2">The client instance declares the parameters for interaction methods that it can support
using the <tt>interact</tt> field.</t>
        <t indent="0" pn="section-2.5-3">The <tt>interact</tt> field is a JSON object with three keys whose values declare how the client can initiate
and complete the request, as well as provide hints to the AS about user preferences such as locale.
A client instance <bcp14>MUST NOT</bcp14> declare an interaction mode it does not support.
The client instance <bcp14>MAY</bcp14> send multiple modes in the same request.
There is no preference order specified in this request. An AS <bcp14>MAY</bcp14>
          respond to any, all, or none of the presented interaction modes (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>) in a request, depending on
its capabilities and what is allowed to fulfill the request.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-2.5-4">
          <dt pn="section-2.5-4.1"><tt>start</tt> (array of objects/strings):</dt>
          <dd pn="section-2.5-4.2">
            <t indent="0" pn="section-2.5-4.2.1">Indicates how the client instance can start an interaction. <bcp14>REQUIRED</bcp14>. See <xref target="request-interact-start" format="default" sectionFormat="of" derivedContent="Section 2.5.1"/>.</t>
          </dd>
          <dt pn="section-2.5-4.3"><tt>finish</tt> (object):</dt>
          <dd pn="section-2.5-4.4">
            <t indent="0" pn="section-2.5-4.4.1">Indicates how the client instance can receive an indication that interaction has finished at the AS. <bcp14>OPTIONAL</bcp14>. See <xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"/>.</t>
          </dd>
          <dt pn="section-2.5-4.5"><tt>hints</tt> (object):</dt>
          <dd pn="section-2.5-4.6">
            <t indent="0" pn="section-2.5-4.6.1">Provides additional information to inform the interaction process at the AS. <bcp14>OPTIONAL</bcp14>. See <xref target="request-interact-hint" format="default" sectionFormat="of" derivedContent="Section 2.5.3"/>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-2.5-5">In the following non-normative example, the client instance is indicating that it can redirect (<xref target="request-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.1.1"> </xref>)
the end user to an arbitrary URI and can receive a redirect (<xref target="request-interact-callback-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.2.1"> </xref>) through
a browser request. Note that the client instance does not accept a push-style callback.
The pattern of using a redirect for both interaction start and finish is common for web-based client software.</t>
        <sourcecode type="json" markers="false" pn="section-2.5-6">
"interact": {
    "start": ["redirect"],
    "finish": {
        "method": "redirect",
        "uri": "https://client.example.net/return/123455",
        "nonce": "LKLTI25DK82FX4T4QFZC"
    }
}
</sourcecode>
        <t indent="0" pn="section-2.5-7">In the following non-normative example, the client instance is indicating that it can
display a user code (<xref target="request-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 2.5.1.3"> </xref>) and direct the end user
to an arbitrary URI (<xref target="request-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.1.1"> </xref>), but it cannot accept a redirect or push-style callback.
This pattern is common for devices that have robust display capabilities but expect
the use of a secondary device to facilitate end-user interaction with the AS, such
as a set-top box capable of displaying an interaction URL as a QR code.</t>
        <sourcecode type="json" markers="false" pn="section-2.5-8">
"interact": {
    "start": ["redirect", "user_code"]
}
</sourcecode>
        <t indent="0" pn="section-2.5-9">In the following non-normative example, the client instance is indicating that it cannot start any interaction with the end user but that the AS can
push an interaction finish message (<xref target="request-interact-callback-push" format="default" sectionFormat="of" derivedContent="Section 2.5.2.2"> </xref>) when
authorization from the RO is received asynchronously. This pattern is
common for scenarios where a service needs to be authorized, but the RO is
able to be contacted separately from the GNAP transaction itself, such as through a push
notification or existing interactive session on a secondary device.</t>
        <sourcecode type="json" markers="false" pn="section-2.5-10">
"interact": {
    "start": [],
    "finish": {
        "method": "push",
        "uri": "https://client.example.net/return/123455",
        "nonce": "LKLTI25DK82FX4T4QFZC"
    }
}
</sourcecode>
        <t indent="0" pn="section-2.5-11">If all of the following conditions are true, the AS
	<bcp14>MUST</bcp14> return an <tt>invalid_interaction</tt> error
	(<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>) since the client instance will be
	unable to complete the request without authorization:
        </t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2.5-12">
          <li pn="section-2.5-12.1">The client instance does not provide a suitable interaction mechanism.
	  </li>
          <li pn="section-2.5-12.2">The AS cannot contact the RO asynchronously.
	  </li>
          <li pn="section-2.5-12.3">The AS determines that    
 interaction is required.
	  </li>
        </ul>
        <section anchor="request-interact-start" numbered="true" removeInRFC="false" toc="include" pn="section-2.5.1">
          <name slugifiedName="name-start-mode-definitions">Start Mode Definitions</name>
          <t indent="0" pn="section-2.5.1-1">If the client instance is capable of starting interaction with the end user, the client instance
indicates this by sending an array of start modes under the <tt>start</tt> key.
Each interaction start mode has a unique identifying name.
Interaction start modes are specified in the array either by a string, which consists of the start
mode name on its own, or by a JSON object with the required field <tt>mode</tt>:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.5.1-2">
            <dt pn="section-2.5.1-2.1"><tt>mode</tt>:</dt>
            <dd pn="section-2.5.1-2.2">
              <t indent="0" pn="section-2.5.1-2.2.1">The interaction start mode. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-2.5.1-3">Interaction start modes defined as objects <bcp14>MAY</bcp14> define additional parameters to be required in the object.</t>
          <t indent="0" pn="section-2.5.1-4">The <tt>start</tt> array can contain both string-type and object-type modes.</t>
          <t indent="0" pn="section-2.5.1-5">This specification defines the following interaction start modes:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.5.1-6">
            <dt pn="section-2.5.1-6.1"><tt>"redirect"</tt> (string):</dt>
            <dd pn="section-2.5.1-6.2">
              <t indent="0" pn="section-2.5.1-6.2.1">Indicates that the client instance can direct the end user to an arbitrary URI
  for interaction. See <xref target="request-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.1.1"/>.</t>
            </dd>
            <dt pn="section-2.5.1-6.3"><tt>"app"</tt> (string):</dt>
            <dd pn="section-2.5.1-6.4">
              <t indent="0" pn="section-2.5.1-6.4.1">Indicates that the client instance can launch an application on the end user's
  device for interaction. See <xref target="request-interact-app" format="default" sectionFormat="of" derivedContent="Section 2.5.1.2"/>.</t>
            </dd>
            <dt pn="section-2.5.1-6.5"><tt>"user_code"</tt> (string):</dt>
            <dd pn="section-2.5.1-6.6">
              <t indent="0" pn="section-2.5.1-6.6.1">Indicates that the client instance can communicate a short, human-readable 
  code to the end user for use with a stable URI. See <xref target="request-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 2.5.1.3"/>.</t>
            </dd>
            <dt pn="section-2.5.1-6.7"><tt>"user_code_uri"</tt> (string):</dt>
            <dd pn="section-2.5.1-6.8">
              <t indent="0" pn="section-2.5.1-6.8.1">Indicates that the client instance can communicate a short, human-readable 
  code to the end user for use with a short, dynamic URI. See <xref target="request-interact-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 2.5.1.4"/>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-2.5.1-7">Additional start modes can be defined in the "GNAP Interaction Start Modes" registry (<xref target="IANA-interaction-start-modes" format="default" sectionFormat="of" derivedContent="Section 10.9"> </xref>).</t>
          <section anchor="request-interact-redirect" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.5.1.1">
            <name slugifiedName="name-redirect-to-an-arbitrary-ur">Redirect to an Arbitrary URI</name>
            <t indent="0" pn="section-2.5.1.1-1">If the client instance is capable of directing the end user to a URI defined
by the AS at runtime, the client instance indicates this by including
<tt>redirect</tt> in the array under the <tt>start</tt> key. The means by which
the client instance will activate this URI are out of scope of this
specification, but common methods include an HTTP redirect,
launching a browser on the end user's device, providing a scannable
image encoding, and printing out a URI to an interactive
console. While this URI is generally hosted at the AS, the client
instance can make no assumptions about its contents, composition,
or relationship to the grant endpoint URI.</t>
            <sourcecode type="json" markers="false" pn="section-2.5.1.1-2">
"interact": {
  "start": ["redirect"]
}
</sourcecode>
            <t indent="0" pn="section-2.5.1.1-3">If this interaction mode is supported for this client instance and
request, the AS returns a redirect interaction response (<xref target="response-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 3.3.1"/>).
The client instance manages this interaction method as described in <xref target="interaction-redirect" format="default" sectionFormat="of" derivedContent="Section 4.1.1"/>.</t>
            <t indent="0" pn="section-2.5.1.1-4">See <xref target="security-front-channel" format="default" sectionFormat="of" derivedContent="Section 11.29"/> for more considerations regarding the use of front-channel
communication techniques.</t>
          </section>
          <section anchor="request-interact-app" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.5.1.2">
            <name slugifiedName="name-open-an-application-specifi">Open an Application-Specific URI</name>
            <t indent="0" pn="section-2.5.1.2-1">If the client instance can open a URI associated with an application on
the end user's device, the client instance indicates this by including <tt>app</tt>
in the array under the <tt>start</tt> key. The means by which the client instance
determines the application to open with this URI are out of scope of
this specification.</t>
            <sourcecode type="json" markers="false" pn="section-2.5.1.2-2">
"interact": {
  "start": ["app"]
}
</sourcecode>
            <t indent="0" pn="section-2.5.1.2-3">If this interaction mode is supported for this client instance and
request, the AS returns an app interaction response with an app URI
payload (<xref target="response-interact-app" format="default" sectionFormat="of" derivedContent="Section 3.3.2"/>). The client instance manages
this interaction method as described in <xref target="interaction-app" format="default" sectionFormat="of" derivedContent="Section 4.1.4"/>.</t>
          </section>
          <section anchor="request-interact-usercode" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.5.1.3">
            <name slugifiedName="name-display-a-short-user-code">Display a Short User Code</name>
            <t indent="0" pn="section-2.5.1.3-1">If the client instance is capable of displaying or otherwise communicating
a short, human-entered code to the RO, the client instance indicates this
by including <tt>user_code</tt> in the array under the <tt>start</tt> key. This
code is to be entered at a static URI that does not change at
runtime. The client instance has no reasonable means to communicate a dynamic
URI to the RO, so this URI is usually communicated out of band to the
RO through documentation or other messaging outside of GNAP.
While this URI is generally hosted at the AS, the client
instance can make no assumptions about its contents, composition,
or relationship to the grant endpoint URI.</t>
            <sourcecode type="json" markers="false" pn="section-2.5.1.3-2">
"interact": {
    "start": ["user_code"]
}
</sourcecode>
            <t indent="0" pn="section-2.5.1.3-3">If this interaction mode is supported for this client instance and
request, the AS returns a user code as specified
in <xref target="response-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 3.3.3"/>. The client instance manages this interaction
method as described in <xref target="interaction-usercode" format="default" sectionFormat="of" derivedContent="Section 4.1.2"/>.</t>
          </section>
          <section anchor="request-interact-usercodeuri" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.5.1.4">
            <name slugifiedName="name-display-a-short-user-code-a">Display a Short User Code and URI</name>
            <t indent="0" pn="section-2.5.1.4-1">If the client instance is capable of displaying or otherwise communicating
a short, human-entered code along with a short, human-entered URI to the RO,
the client instance indicates this
by including <tt>user_code_uri</tt> in the array under the <tt>start</tt> key. This
code is to be entered at the dynamic URL given in the response.
While this URL is generally hosted at the AS, the client
instance can make no assumptions about its contents, composition,
or relationship to the grant endpoint URI.</t>
            <sourcecode type="json" markers="false" pn="section-2.5.1.4-2">
"interact": {
    "start": ["user_code_uri"]
}
</sourcecode>
            <t indent="0" pn="section-2.5.1.4-3">If this interaction mode is supported for this client instance and
request, the AS returns a user code and interaction URL as specified
in <xref target="response-interact-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 3.3.4"/>. The client instance manages this interaction
method as described in <xref target="interaction-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 4.1.3"/>.</t>
          </section>
        </section>
        <section anchor="request-interact-finish" numbered="true" removeInRFC="false" toc="include" pn="section-2.5.2">
          <name slugifiedName="name-interaction-finish-methods">Interaction Finish Methods</name>
          <t indent="0" pn="section-2.5.2-1">If the client instance is capable of receiving a message from the AS indicating
that the RO has completed their interaction, the client instance
indicates this by sending the following members of an object under the <tt>finish</tt> key.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.5.2-2">
            <dt pn="section-2.5.2-2.1"><tt>method</tt> (string):</dt>
            <dd pn="section-2.5.2-2.2">
              <t indent="0" pn="section-2.5.2-2.2.1">The callback method that the AS will use to contact the client instance.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-2.5.2-2.3"><tt>uri</tt> (string):</dt>
            <dd pn="section-2.5.2-2.4">
              <t indent="0" pn="section-2.5.2-2.4.1">Indicates the URI that the AS will use to signal the client
              instance that interaction has completed.  This URI
              <bcp14>MAY</bcp14> be unique per request and <bcp14>MUST</bcp14>
              be hosted by or accessible to the client instance. This URI
              <bcp14>MUST</bcp14> be an absolute URI and <bcp14>MUST NOT</bcp14> contain any fragment component. If the client
              instance needs any state information to tie to the front-channel
              interaction response, it <bcp14>MUST</bcp14> use a unique
              callback URI to link to that ongoing state. The allowable URIs
              and URI patterns <bcp14>MAY</bcp14> be restricted by the AS
              based on the client instance's presented key information. The
              callback URI <bcp14>SHOULD</bcp14> be presented to the RO during
              the interaction phase before redirect. <bcp14>REQUIRED</bcp14>
              for <tt>redirect</tt> and <tt>push</tt> methods.</t>
            </dd>
            <dt pn="section-2.5.2-2.5"><tt>nonce</tt> (string):</dt>
            <dd pn="section-2.5.2-2.6">
              <t indent="0" pn="section-2.5.2-2.6.1">Unique ASCII string value to be used in the
  calculation of the "hash" query parameter sent to the callback URI. It
  must be sufficiently random to be unguessable by an attacker. It
  <bcp14>MUST</bcp14> be generated by the client instance as a unique value for this
  request. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-2.5.2-2.7"><tt>hash_method</tt> (string):</dt>
            <dd pn="section-2.5.2-2.8">
              <t indent="0" pn="section-2.5.2-2.8.1">An identifier of a hash calculation mechanism to be used for the callback hash in <xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>,
  as defined in the IANA "Named Information Hash Algorithm Registry" <xref target="HASH-ALG" format="default" sectionFormat="of" derivedContent="HASH-ALG"/>.
  If absent, the default value is <tt>sha-256</tt>. <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-2.5.2-3">This specification defines the following values for the <tt>method</tt> parameter; additional values can be
defined in the "GNAP Interaction Finish Methods" registry (<xref target="IANA-interaction-finish-methods" format="default" sectionFormat="of" derivedContent="Section 10.10"> </xref>):</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.5.2-4">
            <dt pn="section-2.5.2-4.1"><tt>"redirect"</tt>:</dt>
            <dd pn="section-2.5.2-4.2">
              <t indent="0" pn="section-2.5.2-4.2.1">Indicates that the client instance can receive a redirect from the end user's device
  after interaction with the RO has concluded. See <xref target="request-interact-callback-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.2.1"/>.</t>
            </dd>
            <dt pn="section-2.5.2-4.3"><tt>"push"</tt>:</dt>
            <dd pn="section-2.5.2-4.4">
              <t indent="0" pn="section-2.5.2-4.4.1">Indicates that the client instance can receive an HTTP POST request from the AS
  after interaction with the RO has concluded. See <xref target="request-interact-callback-push" format="default" sectionFormat="of" derivedContent="Section 2.5.2.2"/>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-2.5.2-5">If interaction finishing is supported for this client instance and
request, the AS will return a nonce (<xref target="response-interact-finish" format="default" sectionFormat="of" derivedContent="Section 3.3.5"> </xref>) used by the client
instance to validate the callback.
All interaction finish methods <bcp14>MUST</bcp14> use this nonce to allow the client to verify the connection
between the pending interaction request and the callback. GNAP does this through the use of the
interaction hash, defined in <xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>.
All requests to the callback URI <bcp14>MUST</bcp14> be processed as described in
<xref target="interaction-finish" format="default" sectionFormat="of" derivedContent="Section 4.2"/>.</t>
          <t indent="0" pn="section-2.5.2-6">All interaction finish methods <bcp14>MUST</bcp14> require presentation of an interaction reference for continuing
this grant request. This means that the interaction
reference <bcp14>MUST</bcp14> be returned by the AS and <bcp14>MUST</bcp14> be presented by the client as described in
<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"/>. The means by which the interaction reference is returned to the
client instance are specific to the interaction finish method.</t>
          <section anchor="request-interact-callback-redirect" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.5.2.1">
            <name slugifiedName="name-receive-an-http-callback-th">Receive an HTTP Callback through the Browser</name>
            <t indent="0" pn="section-2.5.2.1-1">A finish <tt>method</tt> value of <tt>redirect</tt> indicates that the client instance
will expect a request from the RO's browser using the HTTP method
GET as described in <xref target="interaction-callback" format="default" sectionFormat="of" derivedContent="Section 4.2.1"/>.</t>
            <t indent="0" pn="section-2.5.2.1-2">The client instance's URI <bcp14>MUST</bcp14> be protected by HTTPS, be
hosted on a server local to the RO's browser ("localhost"), or
use an application-specific URI scheme that is loaded on the
end user's device.</t>
            <sourcecode type="json" markers="false" pn="section-2.5.2.1-3">
"interact": {
    "finish": {
        "method": "redirect",
        "uri": "https://client.example.net/return/123455",
        "nonce": "LKLTI25DK82FX4T4QFZC"
    }
}
</sourcecode>
            <t indent="0" pn="section-2.5.2.1-4">Requests to the callback URI <bcp14>MUST</bcp14> be processed by the client instance as described in
<xref target="interaction-callback" format="default" sectionFormat="of" derivedContent="Section 4.2.1"/>.</t>
            <t indent="0" pn="section-2.5.2.1-5">Since the incoming request to the callback URI is from the RO's
browser, this method is usually used when the RO and end user are the
same entity. See <xref target="security-sessions" format="default" sectionFormat="of" derivedContent="Section 11.24"/> for considerations on ensuring the incoming HTTP message
matches the expected context of the request.
See <xref target="security-front-channel" format="default" sectionFormat="of" derivedContent="Section 11.29"/> for more considerations regarding the use of front-channel
communication techniques.</t>
          </section>
          <section anchor="request-interact-callback-push" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.5.2.2">
            <name slugifiedName="name-receive-an-http-direct-call">Receive an HTTP Direct Callback</name>
            <t indent="0" pn="section-2.5.2.2-1">A finish <tt>method</tt> value of <tt>push</tt> indicates that the client instance will
expect a request from the AS directly using the HTTP method POST
as described in <xref target="interaction-pushback" format="default" sectionFormat="of" derivedContent="Section 4.2.2"/>.</t>
            <t indent="0" pn="section-2.5.2.2-2">The client instance's URI <bcp14>MUST</bcp14> be protected by HTTPS, be
hosted on a server local to the RO's browser ("localhost"), or
use an application-specific URI scheme that is loaded on the end user's device.</t>
            <sourcecode type="json" markers="false" pn="section-2.5.2.2-3">
"interact": {
    "finish": {
        "method": "push",
        "uri": "https://client.example.net/return/123455",
        "nonce": "LKLTI25DK82FX4T4QFZC"
    }
}
</sourcecode>
            <t indent="0" pn="section-2.5.2.2-4">Requests to the callback URI <bcp14>MUST</bcp14> be processed by the client instance as described in
<xref target="interaction-pushback" format="default" sectionFormat="of" derivedContent="Section 4.2.2"/>.</t>
            <t indent="0" pn="section-2.5.2.2-5">Since the incoming request to the callback URI is from the AS and
not from the RO's browser, this request is not expected to have any shared
session information from the start method. See Sections <xref target="security-sessions" format="counter" sectionFormat="of" derivedContent="11.24"/> and <xref target="security-polling" format="counter" sectionFormat="of" derivedContent="11.23"/> for
more considerations regarding the use of back-channel and polling mechanisms like this.</t>
          </section>
        </section>
        <section anchor="request-interact-hint" numbered="true" removeInRFC="false" toc="include" pn="section-2.5.3">
          <name slugifiedName="name-hints">Hints</name>
          <t indent="0" pn="section-2.5.3-1">The <tt>hints</tt> key is an object describing one or more suggestions from the client
instance that the AS can use to help drive user interaction.</t>
          <t indent="0" pn="section-2.5.3-2">This specification defines the following property under the <tt>hints</tt> key:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2.5.3-3">
            <dt pn="section-2.5.3-3.1"><tt>ui_locales</tt> (array of strings):</dt>
            <dd pn="section-2.5.3-3.2">
              <t indent="0" pn="section-2.5.3-3.2.1">Indicates the end user's preferred locales that the AS can use
  during interaction, particularly before the RO has
  authenticated. <bcp14>OPTIONAL</bcp14>. <xref target="request-interact-locale" format="default" sectionFormat="of" derivedContent="Section 2.5.3.1"/></t>
            </dd>
          </dl>
          <t indent="0" pn="section-2.5.3-4">The following subsection details requests for interaction
hints. Additional interaction hints can be defined in
the "GNAP Interaction Hints" registry (<xref target="IANA-interaction-hints" format="default" sectionFormat="of" derivedContent="Section 10.11"> </xref>).</t>
          <section anchor="request-interact-locale" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.5.3.1">
            <name slugifiedName="name-indicate-desired-interactio">Indicate Desired Interaction Locales</name>
            <t indent="0" pn="section-2.5.3.1-1">If the client instance knows the end user's locale and language preferences, the
client instance can send this information to the AS using the <tt>ui_locales</tt> field
with an array of locale strings as defined by <xref target="RFC5646" format="default" sectionFormat="of" derivedContent="RFC5646"/>.</t>
            <sourcecode type="json" markers="false" pn="section-2.5.3.1-2">
"interact": {
    "hints": {
        "ui_locales": ["en-US", "fr-CA"]
    }
}
</sourcecode>
            <t indent="0" pn="section-2.5.3.1-3">If possible, the AS <bcp14>SHOULD</bcp14> use one of the locales in the array, with
preference to the first item in the array supported by the AS. If none
of the given locales are supported, the AS <bcp14>MAY</bcp14> use a default locale.</t>
          </section>
        </section>
      </section>
    </section>
    <section anchor="response" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-grant-response">Grant Response</name>
      <t indent="0" pn="section-3-1">In response to a client instance's request, the AS responds with a JSON object
as the HTTP content. Each possible field is detailed in the subsections below.</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-3-2">
        <dt pn="section-3-2.1"><tt>continue</tt> (object):</dt>
        <dd pn="section-3-2.2">
          <t indent="0" pn="section-3-2.2.1">Indicates that the client instance can continue the request by making one or
  more continuation requests. <bcp14>REQUIRED</bcp14> if continuation calls are allowed for this client instance on this grant request. See <xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"/>.</t>
        </dd>
        <dt pn="section-3-2.3"><tt>access_token</tt> (object / array of objects):</dt>
        <dd pn="section-3-2.4">
          <t indent="0" pn="section-3-2.4.1">A single access token or set of access tokens that the client instance can use to call the RS on
  behalf of the RO. <bcp14>REQUIRED</bcp14> if an access token is included. See <xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"/>.</t>
        </dd>
        <dt pn="section-3-2.5"><tt>interact</tt> (object):</dt>
        <dd pn="section-3-2.6">
          <t indent="0" pn="section-3-2.6.1">Indicates that interaction through some set of defined mechanisms
  needs to take place. <bcp14>REQUIRED</bcp14> if interaction is expected. See <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/>.</t>
        </dd>
        <dt pn="section-3-2.7"><tt>subject</tt> (object):</dt>
        <dd pn="section-3-2.8">
          <t indent="0" pn="section-3-2.8.1">Claims about the RO as known and declared by the AS. <bcp14>REQUIRED</bcp14> if subject information is included. See <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/>.</t>
        </dd>
        <dt pn="section-3-2.9"><tt>instance_id</tt> (string):</dt>
        <dd pn="section-3-2.10">
          <t indent="0" pn="section-3-2.10.1">An identifier this client instance can use to identify itself when making
  future requests. <bcp14>OPTIONAL</bcp14>. See <xref target="response-dynamic-handles" format="default" sectionFormat="of" derivedContent="Section 3.5"/>.</t>
        </dd>
        <dt pn="section-3-2.11"><tt>error</tt> (object or string):</dt>
        <dd pn="section-3-2.12">
          <t indent="0" pn="section-3-2.12.1">An error code indicating that something has gone wrong. <bcp14>REQUIRED</bcp14> for an error condition. See <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>.</t>
        </dd>
      </dl>
      <t indent="0" pn="section-3-3">Additional fields can be defined by extensions to GNAP in the "GNAP Grant Response Parameters" registry (<xref target="IANA-grant-response" format="default" sectionFormat="of" derivedContent="Section 10.12"> </xref>).</t>
      <t indent="0" pn="section-3-4">In the following non-normative example, the AS is returning an interaction URI (<xref target="response-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 3.3.1"> </xref>),
a callback nonce (<xref target="response-interact-finish" format="default" sectionFormat="of" derivedContent="Section 3.3.5"> </xref>), and a continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>).</t>
      <sourcecode type="json" markers="false" pn="section-3-5">
NOTE: '\' line wrapping per RFC 8792

{
    "interact": {
        "redirect": "https://server.example.com/interact/4CF492ML\
          VMSW9MKMXKHQ",
        "finish": "MBDOFXG4Y5CVJCX821LH"
    },
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU",
        },
        "uri": "https://server.example.com/tx"
    }
}
</sourcecode>
      <t indent="0" pn="section-3-6">In the following non-normative example, the AS is returning a bearer access token (<xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"> </xref>) with a management URI and a Subject Identifier (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) in the form of
an opaque identifier.</t>
      <sourcecode type="json" markers="false" pn="section-3-7">
{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "flags": ["bearer"],
        "manage": {
            "uri": "https://server.example.com/token/PRY5NM33O",
            "access_token": {
                "value": "B8CDFONP21-4TB8N6.BW7ONM"
            }
        }
    },
    "subject": {
        "sub_ids": [ {
          "format": "opaque",
          "id": "J2G8G8O4AZ"
        } ]
    }
}
</sourcecode>
      <t indent="0" pn="section-3-8">In the following non-normative example, the AS is returning set of Subject Identifiers (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>),
simultaneously as an opaque identifier, an email address, and a decentralized identifier (DID), formatted as a set of Subject Identifiers as defined in <xref target="RFC9493" format="default" sectionFormat="of" derivedContent="RFC9493"/>.</t>
      <sourcecode type="json" markers="false" pn="section-3-9">
{
    "subject": {
        "sub_ids": [ {
          "format": "opaque",
          "id": "J2G8G8O4AZ"
        }, {
          "format": "email",
          "email": "user@example.com"
        }, {
          "format": "did",
          "url": "did:example:123456"
        } ]
    }
}
</sourcecode>
      <t indent="0" pn="section-3-10">The response <bcp14>MUST</bcp14> be sent as a JSON object in the content of the HTTP response with Content-Type <tt>application/json</tt>, unless otherwise specified by the specific response (e.g., an empty response with no Content-Type).</t>
      <t indent="0" pn="section-3-11">The AS <bcp14>MUST</bcp14> include the HTTP Cache-Control response header field <xref target="RFC9111" format="default" sectionFormat="of" derivedContent="RFC9111"/> with a value set to "no-store".</t>
      <section anchor="response-continue" numbered="true" removeInRFC="false" toc="include" pn="section-3.1">
        <name slugifiedName="name-request-continuation">Request Continuation</name>
        <t indent="0" pn="section-3.1-1">If the AS determines that the grant request can be continued by the
client instance, the AS responds with the <tt>continue</tt> field. This field
contains a JSON object with the following properties.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-3.1-2">
          <dt pn="section-3.1-2.1"><tt>uri</tt> (string):</dt>
          <dd pn="section-3.1-2.2">
            <t indent="0" pn="section-3.1-2.2.1">The URI at which the client instance can make
  continuation requests. This URI <bcp14>MAY</bcp14> vary per
  request or <bcp14>MAY</bcp14> be stable at the AS. This URI <bcp14>MUST</bcp14> be an absolute URI.
  The client instance <bcp14>MUST</bcp14> use this
  value exactly as given when making a continuation request (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>).
  <bcp14>REQUIRED</bcp14>.</t>
          </dd>
          <dt pn="section-3.1-2.3"><tt>wait</tt> (integer):</dt>
          <dd pn="section-3.1-2.4">
            <t indent="0" pn="section-3.1-2.4.1">The amount of time in integer
  seconds the client instance <bcp14>MUST</bcp14> wait after receiving this request continuation
  response and calling the continuation URI. The value <bcp14>SHOULD NOT</bcp14> be less than five seconds,
  and omission of the value <bcp14>MUST</bcp14> be interpreted as five seconds.
  <bcp14>RECOMMENDED</bcp14>.</t>
          </dd>
          <dt pn="section-3.1-2.5"><tt>access_token</tt> (object):</dt>
          <dd pn="section-3.1-2.6">
            <t indent="0" pn="section-3.1-2.6.1">A unique access token for continuing the request, called the "continuation access token".
  The value of this property <bcp14>MUST</bcp14> be an object in the format specified
  in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>. This access token <bcp14>MUST</bcp14> be bound to the
  client instance's key used in the request and <bcp14>MUST NOT</bcp14> be a bearer token. As a consequence,
  the <tt>flags</tt> array of this access token <bcp14>MUST NOT</bcp14> contain the string <tt>bearer</tt>, and the
  <tt>key</tt> field <bcp14>MUST</bcp14> be omitted.
  This access token <bcp14>MUST NOT</bcp14> have a <tt>manage</tt> field.
  The client instance <bcp14>MUST</bcp14> present the continuation access token in all requests to the continuation URI as described in <xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/>.
  <bcp14>REQUIRED</bcp14>.</t>
          </dd>
        </dl>
        <sourcecode type="json" markers="false" pn="section-3.1-3">
{
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU"
        },
        "uri": "https://server.example.com/continue",
        "wait": 60
    }
}
</sourcecode>
        <t indent="0" pn="section-3.1-4">This field is <bcp14>REQUIRED</bcp14> if the grant request is in the <em>pending</em> state, as
the field contains the information needed by the client request to continue the
request as described in <xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"/>. Note that the
continuation access token is bound to the client instance's key; therefore, the
client instance <bcp14>MUST</bcp14> sign all continuation requests with its key as described
in <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/> and
<bcp14>MUST</bcp14> present the continuation access token in its continuation request.</t>
      </section>
      <section anchor="response-token" numbered="true" removeInRFC="false" toc="include" pn="section-3.2">
        <name slugifiedName="name-access-tokens">Access Tokens</name>
        <t indent="0" pn="section-3.2-1">If the AS has successfully granted one or more access tokens to the client instance,
the AS responds with the <tt>access_token</tt> field. This field contains either a single
access token as described in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/> or an array of access tokens
as described in <xref target="response-token-multiple" format="default" sectionFormat="of" derivedContent="Section 3.2.2"/>.</t>
        <t indent="0" pn="section-3.2-2">The client instance uses any access tokens in this response to call the RS as
described in <xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/>.</t>
        <t indent="0" pn="section-3.2-3">The grant request <bcp14>MUST</bcp14> be in the <em>approved</em> state to include this field in the response.</t>
        <section anchor="response-token-single" numbered="true" removeInRFC="false" toc="include" pn="section-3.2.1">
          <name slugifiedName="name-single-access-token">Single Access Token</name>
          <t indent="0" pn="section-3.2.1-1">If the client instance has requested a single access token and the AS has
granted that access token, the AS responds with the "access_token"
field. The value of this field is an object with the following
properties.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-3.2.1-2">
            <dt pn="section-3.2.1-2.1"><tt>value</tt> (string):</dt>
            <dd pn="section-3.2.1-2.2">
              <t indent="0" pn="section-3.2.1-2.2.1">The value of the access token as a
  string. The value is opaque to the client instance. The value <bcp14>MUST</bcp14> be
  limited to the <tt>token68</tt> character set defined in <xref section="11.2" sectionFormat="of" target="RFC9110" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9110#section-11.2" derivedContent="HTTP"/> to facilitate transmission over HTTP
  headers and within other protocols without requiring additional encoding.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-3.2.1-2.3"><tt>label</tt> (string):</dt>
            <dd pn="section-3.2.1-2.4">
              <t indent="0" pn="section-3.2.1-2.4.1">The value of the <tt>label</tt> the client instance provided in the associated
  token request (<xref target="request-token" format="default" sectionFormat="of" derivedContent="Section 2.1"> </xref>), if present.
  <bcp14>REQUIRED</bcp14> for multiple access tokens or if a <tt>label</tt> was included in the single access token request; <bcp14>OPTIONAL</bcp14> for a single access token where no <tt>label</tt> was included in the request.</t>
            </dd>
            <dt pn="section-3.2.1-2.5"><tt>manage</tt> (object):</dt>
            <dd pn="section-3.2.1-2.6">
              <t indent="0" pn="section-3.2.1-2.6.1">Access information for the token management API for
    this access token.
  If provided, the client instance <bcp14>MAY</bcp14> manage its access
  token as described in <xref target="token-management" format="default" sectionFormat="of" derivedContent="Section 6"/>.
  This management API is a function of the AS and is separate from the RS
  the client instance is requesting access to.
  <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
            <dt pn="section-3.2.1-2.7"><tt>access</tt> (array of objects/strings):</dt>
            <dd pn="section-3.2.1-2.8">
              <t indent="0" pn="section-3.2.1-2.8.1">A description of the rights
  associated with this access token, as defined in
  <xref target="resource-access-rights" format="default" sectionFormat="of" derivedContent="Section 8"/>. If included, this <bcp14>MUST</bcp14> reflect the rights
  associated with the issued access token. These rights <bcp14>MAY</bcp14> vary
  from what was requested by the client instance.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-3.2.1-2.9"><tt>expires_in</tt> (integer):</dt>
            <dd pn="section-3.2.1-2.10">
              <t indent="0" pn="section-3.2.1-2.10.1">The number of seconds in
  which the access will expire. The client instance <bcp14>MUST NOT</bcp14> use the access
  token past this time. Note that the access token <bcp14>MAY</bcp14> be revoked by the
  AS or RS at any point prior to its expiration.
  <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
            <dt pn="section-3.2.1-2.11"><tt>key</tt> (object / string):</dt>
            <dd pn="section-3.2.1-2.12">
              <t indent="0" pn="section-3.2.1-2.12.1">The key that the token is bound to, if different from the
  client instance's presented key. The key <bcp14>MUST</bcp14> be an object or string in a format
  described in <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/>. The client instance <bcp14>MUST</bcp14> be able to
  dereference or process the key information in order to be able
  to sign subsequent requests using the access token (<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"> </xref>).
  When the key is provided by value from the AS, the token shares some security properties
  with bearer tokens as discussed in <xref target="security-as-keys" format="default" sectionFormat="of" derivedContent="Section 11.38"/>.
  It is <bcp14>RECOMMENDED</bcp14> that keys returned for use with access tokens be key references
  as described in <xref target="key-reference" format="default" sectionFormat="of" derivedContent="Section 7.1.1"/> that the client instance can correlate to
  its known keys.
  <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
            <dt pn="section-3.2.1-2.13"><tt>flags</tt> (array of strings):</dt>
            <dd pn="section-3.2.1-2.14">
              <t indent="0" pn="section-3.2.1-2.14.1">A set of flags that represent attributes or behaviors of the access token
  issued by the AS.
  <bcp14>OPTIONAL</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-3.2.1-3">The value of the <tt>manage</tt> field is an object with the following properties:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-3.2.1-4">
            <dt pn="section-3.2.1-4.1"><tt>uri</tt> (string):</dt>
            <dd pn="section-3.2.1-4.2">The URI of the token management API for this access token.
    This URI <bcp14>MUST</bcp14> be an absolute URI.

    This URI <bcp14>MUST NOT</bcp14> include the value of the access token being managed 
 or the value of the access token used to protect the URI.
        This URI <bcp14>SHOULD</bcp14> be different for each access
    token issued in a request. 
    <bcp14>REQUIRED</bcp14>.</dd>
            <dt pn="section-3.2.1-4.3"><tt>access_token</tt> (object):</dt>
            <dd pn="section-3.2.1-4.4">
              <t indent="0" pn="section-3.2.1-4.4.1">A unique access token for continuing the request, called the "token management access token".
  The value of this property <bcp14>MUST</bcp14> be an object in the format specified
  in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>. This access token <bcp14>MUST</bcp14> be bound to the
  client instance's key used in the request (or its most recent rotation) and <bcp14>MUST NOT</bcp14> be a bearer token. As a consequence,
  the <tt>flags</tt> array of this access token <bcp14>MUST NOT</bcp14> contain the string <tt>bearer</tt>, and the
  <tt>key</tt> field <bcp14>MUST</bcp14> be omitted.
  This access token <bcp14>MUST NOT</bcp14> have a <tt>manage</tt> field.
  This access token <bcp14>MUST NOT</bcp14> have the same value as the token it is managing.
  The client instance <bcp14>MUST</bcp14> present the continuation access token in all requests to the continuation URI as described in <xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/>.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-3.2.1-5">The values of the <tt>flags</tt> field defined by this specification are as follows:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-3.2.1-6">
            <dt pn="section-3.2.1-6.1"><tt>"bearer"</tt>:</dt>
            <dd pn="section-3.2.1-6.2">
              <t indent="0" pn="section-3.2.1-6.2.1">Flag indicating whether the token is a bearer token, not bound to a key and proofing mechanism.
  If the <tt>bearer</tt> flag is present, the access token is a bearer token, and the <tt>key</tt>
  field in this response <bcp14>MUST</bcp14> be omitted.
  See <xref target="security-bearer-tokens" format="default" sectionFormat="of" derivedContent="Section 11.9"/> for additional considerations on the use of bearer tokens.</t>
            </dd>
            <dt pn="section-3.2.1-6.3"><tt>"durable"</tt>:</dt>
            <dd pn="section-3.2.1-6.4">
              <t indent="0" pn="section-3.2.1-6.4.1">Flag indicating a hint of AS behavior on token rotation.
  If this flag is present, then the client instance can expect
  a previously issued access token to continue to work after it has been rotated (<xref target="rotate-access-token" format="default" sectionFormat="of" derivedContent="Section 6.1"> </xref>)
  or the underlying grant request has been modified (<xref target="continue-modify" format="default" sectionFormat="of" derivedContent="Section 5.3"> </xref>), resulting
  in the issuance of new access tokens. If this flag is omitted, the client
  instance can anticipate a given access token
  could stop working after token rotation or grant request modification.
  Note that a token flagged as <tt>durable</tt> can still expire or be revoked through
  any normal means.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-3.2.1-7">Flag values <bcp14>MUST NOT</bcp14> be included more than once.</t>
          <t indent="0" pn="section-3.2.1-8">Additional flags can be defined by extensions using the "GNAP Access Token Flags" registry (<xref target="IANA-token-flags" format="default" sectionFormat="of" derivedContent="Section 10.4"/>).</t>
          <t indent="0" pn="section-3.2.1-9">If the <tt>bearer</tt> flag and the <tt>key</tt> field
in this response are omitted, the token is bound to the key used by the client instance (<xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"> </xref>)
in its request for access. If the <tt>bearer</tt> flag is omitted and the <tt>key</tt> field is present,
the token is bound to the key and proofing mechanism indicated in the <tt>key</tt> field.
The means by which the AS determines how to bind an access token to a key
other than that presented by the client instance are out of scope for this
specification, but common practices include pre-registering specific keys in a static fashion.</t>
          <t indent="0" pn="section-3.2.1-10">The client software <bcp14>MUST</bcp14> reject any access token where the <tt>flags</tt> field contains the <tt>bearer</tt> flag
and the <tt>key</tt> field is present with any value.</t>
          <t indent="0" pn="section-3.2.1-11">The following non-normative example shows a single access token bound to
the client instance's key used in the initial request. The access token has a
management URI and has access to three described resources (one using an
object and two described by reference strings).
</t>
          <sourcecode type="json" markers="false" pn="section-3.2.1-12">
NOTE: '\' line wrapping per RFC 8792

"access_token": {
    "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
    "manage": {
        "uri": "https://server.example.com/token/PRY5NM33O",
        "access_token": {
            "value": "B8CDFONP21-4TB8N6.BW7ONM"
        }
    },
    "access": [
        {
            "type": "photo-api",
            "actions": [
                "read",
                "write",
                "dolphin"
            ],
            "locations": [
                "https://server.example.net/",
                "https://resource.local/other"
            ],
            "datatypes": [
                "metadata",
                "images"
            ]
        },
        "read", "dolphin-metadata"
    ]
}
</sourcecode>
          <t indent="0" pn="section-3.2.1-13">The following non-normative example shows a single bearer access token
with access to two described resources.</t>
          <sourcecode type="json" markers="false" pn="section-3.2.1-14">
"access_token": {
    "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
    "flags": ["bearer"],
    "access": [
        "finance", "medical"
    ]
}
</sourcecode>
          <t indent="0" pn="section-3.2.1-15">If the client instance requested a single access token (<xref target="request-token-single" format="default" sectionFormat="of" derivedContent="Section 2.1.1"> </xref>), the AS <bcp14>MUST NOT</bcp14> respond with the structure for multiple access
          tokens.</t>
        </section>
        <section anchor="response-token-multiple" numbered="true" removeInRFC="false" toc="include" pn="section-3.2.2">
          <name slugifiedName="name-multiple-access-tokens">Multiple Access Tokens</name>
          <t indent="0" pn="section-3.2.2-1">If the client instance has requested multiple access tokens and the AS has
granted at least one of them, the AS responds with the
"access_token" field. The value of this field is a JSON
array, the members of which are distinct access
tokens as described in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>.
Each object <bcp14>MUST</bcp14> have a unique <tt>label</tt> field, corresponding to the token labels
chosen by the client instance in the request for multiple access tokens (<xref target="request-token-multiple" format="default" sectionFormat="of" derivedContent="Section 2.1.2"> </xref>).</t>
          <t indent="0" pn="section-3.2.2-2">In the following non-normative example, two tokens are issued under the
names <tt>token1</tt> and <tt>token2</tt>, and only the first token has a management
URI associated with it.</t>
          <sourcecode type="json" markers="false" pn="section-3.2.2-3">
NOTE: '\' line wrapping per RFC 8792

"access_token": [
    {
        "label": "token1",
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "manage": {
            "uri": "https://server.example.com/token/PRY5NM33O",
            "access_token": {
                "value": "B8CDFONP21-4TB8N6.BW7ONM"
            }
        },
        "access": [ "finance" ]
    },
    {
        "label": "token2",
        "value": "UFGLO2FDAFG7VGZZPJ3IZEMN21EVU71FHCARP4J1",
        "access": [ "medical" ]
    }
}
</sourcecode>
          <t indent="0" pn="section-3.2.2-4">Each access token corresponds to one of the objects in the <tt>access_token</tt> array of
the client instance's request (<xref target="request-token-multiple" format="default" sectionFormat="of" derivedContent="Section 2.1.2"> </xref>).</t>
          <t indent="0" pn="section-3.2.2-5">The AS <bcp14>MAY</bcp14> refuse to issue one or more of the
requested access tokens for any reason. In such cases, the refused token is omitted
from the response, and all of the other issued access
tokens are included in the response under their respective requested labels.
If the client instance requested multiple access tokens (<xref target="request-token-multiple" format="default" sectionFormat="of" derivedContent="Section 2.1.2"> </xref>), the AS <bcp14>MUST NOT</bcp14> respond with a
single access token structure, even if only a single access token is granted. In such cases, the AS <bcp14>MUST</bcp14> respond
with a structure for multiple access tokens containing one access token.</t>
          <sourcecode type="json" markers="false" pn="section-3.2.2-6">
"access_token": [
    {
        "label": "token2",
        "value": "8N6BW7OZB8CDFONP219-OS9M2PMHKUR64TBRP1LT0",
        "manage": {
            "uri": "https://server.example.com/token/PRY5NM33O",
            "access_token": {
                "value": "B8CDFONP21-4TB8N6.BW7ONM"
            }
        },
        "access": [ "fruits" ]
    }
]
</sourcecode>
          <t indent="0" pn="section-3.2.2-7">The parameters of each access token are separate. For example, each access token is expected to
have a unique value and (if present) label, and each access token likely has different access rights associated with
it. Each access token could also be bound to different keys with different proofing mechanisms.</t>
        </section>
      </section>
      <section anchor="response-interact" numbered="true" removeInRFC="false" toc="include" pn="section-3.3">
        <name slugifiedName="name-interaction-modes">Interaction Modes</name>
        <t indent="0" pn="section-3.3-1">If the client instance has indicated a capability to interact with the RO in its request (<xref target="request-interact" format="default" sectionFormat="of" derivedContent="Section 2.5"> </xref>)
and the AS has determined that interaction is both
supported and necessary, the AS responds to the client instance with any of the
following values in the <tt>interact</tt> field of the response. There is
no preference order for interaction modes in the response,
and it is up to the client instance to determine which ones to use. All supported
interaction methods are included in the same <tt>interact</tt> object.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-3.3-2">
          <dt pn="section-3.3-2.1"><tt>redirect</tt> (string):</dt>
          <dd pn="section-3.3-2.2">
            <t indent="0" pn="section-3.3-2.2.1">Redirect to an arbitrary URI. <bcp14>REQUIRED</bcp14> if the <tt>redirect</tt> interaction start mode is possible for this request. See <xref target="response-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 3.3.1"/>.</t>
          </dd>
          <dt pn="section-3.3-2.3"><tt>app</tt> (string):</dt>
          <dd pn="section-3.3-2.4">
            <t indent="0" pn="section-3.3-2.4.1">Launch of an application URI. <bcp14>REQUIRED</bcp14> if the <tt>app</tt> interaction start mode is possible for this request. See <xref target="response-interact-app" format="default" sectionFormat="of" derivedContent="Section 3.3.2"/>.</t>
          </dd>
          <dt pn="section-3.3-2.5"><tt>user_code</tt> (string):</dt>
          <dd pn="section-3.3-2.6">
            <t indent="0" pn="section-3.3-2.6.1">Display a short user code. <bcp14>REQUIRED</bcp14> if the <tt>user_code</tt> interaction start mode is possible for this request. See <xref target="response-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 3.3.3"/>.</t>
          </dd>
          <dt pn="section-3.3-2.7"><tt>user_code_uri</tt> (object):</dt>
          <dd pn="section-3.3-2.8">
            <t indent="0" pn="section-3.3-2.8.1">Display a short user code and URI. <bcp14>REQUIRED</bcp14> if the <tt>user_code_uri</tt> interaction start mode is possible for this request. <xref target="response-interact-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 3.3.4"/></t>
          </dd>
          <dt pn="section-3.3-2.9"><tt>finish</tt> (string):</dt>
          <dd pn="section-3.3-2.10">
            <t indent="0" pn="section-3.3-2.10.1">A unique ASCII string value provided by the AS as a nonce. This is used by the client instance to verify the callback after interaction is completed. <bcp14>REQUIRED</bcp14> if the interaction finish method requested by the client instance is possible for this request. See <xref target="response-interact-finish" format="default" sectionFormat="of" derivedContent="Section 3.3.5"/>.</t>
          </dd>
          <dt pn="section-3.3-2.11"><tt>expires_in</tt> (integer):</dt>
          <dd pn="section-3.3-2.12">
            <t indent="0" pn="section-3.3-2.12.1">The number of integer seconds after which this set of interaction responses will expire and no longer be usable by the client instance. If the interaction methods expire, the client <bcp14>MAY</bcp14> restart the interaction process for this grant request by sending an update (<xref target="continue-modify" format="default" sectionFormat="of" derivedContent="Section 5.3"> </xref>) with a new interaction request field (<xref target="request-interact" format="default" sectionFormat="of" derivedContent="Section 2.5"> </xref>). <bcp14>OPTIONAL</bcp14>. If omitted, the interaction response modes returned do not expire but <bcp14>MAY</bcp14> be invalidated by the AS at any time.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-3.3-3">Additional interaction mode responses can be defined in the "GNAP Interaction Mode Responses" registry (<xref target="IANA-interaction-response" format="default" sectionFormat="of" derivedContent="Section 10.13"> </xref>).</t>
        <t indent="0" pn="section-3.3-4">The AS <bcp14>MUST NOT</bcp14> respond with any interaction mode that the
client instance did not indicate in its request, and the AS <bcp14>MUST NOT</bcp14> respond with
any interaction mode that the AS does not support. Since interaction
responses include secret or unique information, the AS <bcp14>SHOULD</bcp14>
respond to each interaction mode only once in an ongoing request,
particularly if the client instance modifies its request (<xref target="continue-modify" format="default" sectionFormat="of" derivedContent="Section 5.3"> </xref>).</t>
        <t indent="0" pn="section-3.3-5">The grant request <bcp14>MUST</bcp14> be in the <em>pending</em> state to include this field in the response.</t>
        <section anchor="response-interact-redirect" numbered="true" removeInRFC="false" toc="include" pn="section-3.3.1">
          <name slugifiedName="name-redirection-to-an-arbitrary">Redirection to an Arbitrary URI</name>
          <t indent="0" pn="section-3.3.1-1">If the client instance indicates that it can redirect to an arbitrary URI (<xref target="request-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.1.1"> </xref>) and the AS supports this mode for the client instance's
request, the AS responds with the "redirect" field, which is
a string containing the URI for the end user to visit. This URI <bcp14>MUST</bcp14> be
unique for the request and <bcp14>MUST NOT</bcp14> contain any security-sensitive
information such as user identifiers or access tokens.</t>
          <artwork align="left" pn="section-3.3.1-2">
"interact": {
    "redirect": "https://interact.example.com/4CF492MLVMSW9MKMXKHQ"
}
</artwork>
          <t indent="0" pn="section-3.3.1-3">The URI returned is a function of the AS, but the URI itself <bcp14>MAY</bcp14> be completely
distinct from the grant endpoint URI that the client instance uses to request access (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>), allowing an
AS to separate its user-interaction functionality from its backend security
functionality. The AS will need to dereference the specific grant
request and its information from the URI alone. If the AS does not directly host the functionality accessed through
the redirect URI, then the means for the interaction functionality to communicate
with the rest of the AS are out of scope for this specification.</t>
          <t indent="0" pn="section-3.3.1-4">The client instance sends the end user to the URI to interact with the AS. The
client instance <bcp14>MUST NOT</bcp14> alter the URI in any way. The means for the client instance
to send the end user to this URI are out of scope of this specification,
but common methods include an HTTP redirect, launching the system
browser, displaying a scannable code, or printing out the URI in an
interactive console. See details of the interaction in <xref target="interaction-redirect" format="default" sectionFormat="of" derivedContent="Section 4.1.1"/>.</t>
        </section>
        <section anchor="response-interact-app" numbered="true" removeInRFC="false" toc="include" pn="section-3.3.2">
          <name slugifiedName="name-launch-of-an-application-ur">Launch of an Application URI</name>
          <t indent="0" pn="section-3.3.2-1">If the client instance indicates that it can launch an application URI (<xref target="request-interact-app" format="default" sectionFormat="of" derivedContent="Section 2.5.1.2"> </xref>) and
the AS supports this mode for the client instance's request, the AS
responds with the "app" field, which is a string containing the URI
for the client instance to launch. This URI <bcp14>MUST</bcp14> be unique for the request and
<bcp14>MUST NOT</bcp14> contain any security-sensitive information such as user identifiers or access tokens.</t>
          <sourcecode type="json" markers="false" pn="section-3.3.2-2">
"interact": {
    "app": "https://app.example.com/launch?tx=4CF492MLV"
}
</sourcecode>
          <t indent="0" pn="section-3.3.2-3">The means for the launched application to communicate with the AS are out of
scope for this specification.</t>
          <t indent="0" pn="section-3.3.2-4">The client instance launches the URI as appropriate on its platform; the means for the client instance to launch this URI are out of scope of this
specification. The client instance <bcp14>MUST NOT</bcp14> alter the URI in any way. The
client instance <bcp14>MAY</bcp14> attempt to detect if an installed application will
service the URI being sent before attempting to launch the
application URI. See details of the interaction in <xref target="interaction-app" format="default" sectionFormat="of" derivedContent="Section 4.1.4"/>.</t>
        </section>
        <section anchor="response-interact-usercode" numbered="true" removeInRFC="false" toc="include" pn="section-3.3.3">
          <name slugifiedName="name-display-of-a-short-user-cod">Display of a Short User Code</name>
          <t indent="0" pn="section-3.3.3-1">If the client instance indicates that it can
display a short, user-typeable code (<xref target="request-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 2.5.1.3"> </xref>)
and the AS supports this mode for the client instance's
request, the AS responds with a "user_code" field. This field is string
containing a unique short code that the user
can type into a web page. To facilitate usability, this string <bcp14>MUST</bcp14> consist only of characters
that can be easily typed by the end user
(such as ASCII letters or numbers) and
<bcp14>MUST</bcp14> be processed by the AS in a case-insensitive manner (see <xref target="interaction-usercode" format="default" sectionFormat="of" derivedContent="Section 4.1.2"/>).
The string <bcp14>MUST</bcp14> be randomly generated
so as to be unguessable by an attacker within the time it is accepted. The time in which this
code will be accepted <bcp14>SHOULD</bcp14> be short lived, such as several
minutes. It is <bcp14>RECOMMENDED</bcp14> that this code be between six and eight
characters in length.</t>
          <sourcecode type="json" markers="false" pn="section-3.3.3-2">
"interact": {
    "user_code": "A1BC3DFF"
}
</sourcecode>
          <t indent="0" pn="section-3.3.3-3">The client instance <bcp14>MUST</bcp14> communicate the "user_code" value to the end user in some
fashion, such as displaying it on a screen or reading it out
audibly. This code is used by the interaction component of the AS as a means
of identifying the pending grant request and does not function as an
	  authentication factor for the RO.</t>
          <t indent="0" pn="section-3.3.3-4">The URI that the end user is intended to enter the code into <bcp14>MUST</bcp14> be stable,
since the client instance is expected to have no means of communicating a
dynamic URI to the end user at runtime.</t>
          <t indent="0" pn="section-3.3.3-5">As this interaction mode is designed to facilitate interaction
via a secondary device, it is not expected that the client instance redirect
the end user to the URI where the code is entered.
If the client instance is capable of communicating a
short arbitrary URI to the end user for use with the user code, the client
instance <bcp14>SHOULD</bcp14> instead use the "user_code_uri" mode (<xref target="request-interact-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 2.5.1.4"/>).
If the client instance is capable of communicating a long arbitrary URI to the end user,
such as through a scannable code, the
client instance <bcp14>SHOULD</bcp14> use the "redirect" mode (<xref target="request-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.1.1"> </xref>)
for this purpose, instead of or in addition to the user code mode.</t>
          <t indent="0" pn="section-3.3.3-6">See details of the interaction in <xref target="interaction-usercode" format="default" sectionFormat="of" derivedContent="Section 4.1.2"/>.</t>
        </section>
        <section anchor="response-interact-usercodeuri" numbered="true" removeInRFC="false" toc="include" pn="section-3.3.4">
          <name slugifiedName="name-display-of-a-short-user-code">Display of a Short User Code and URI</name>
          <t indent="0" pn="section-3.3.4-1">If the client instance indicates that it can
display a short, user-typeable code (<xref target="request-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 2.5.1.3"> </xref>)
and the AS supports this mode for the client instance's
request, the AS responds with a "user_code_uri"
object that contains the following members.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-3.3.4-2">
            <dt pn="section-3.3.4-2.1"><tt>code</tt> (string):</dt>
            <dd pn="section-3.3.4-2.2">
              <t indent="0" pn="section-3.3.4-2.2.1">A unique short code that the end user
  can type into a provided URI. To facilitate usability, this string <bcp14>MUST</bcp14> consist only of characters
  that can be easily typed by the end user
  (such as ASCII letters or numbers) and
  <bcp14>MUST</bcp14> be processed by the AS in a case-insensitive manner (see <xref target="interaction-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 4.1.3"/>).
  The string <bcp14>MUST</bcp14> be randomly generated
  so as to be unguessable by an attacker within the time it is accepted. The time in which this
  code will be accepted <bcp14>SHOULD</bcp14> be short lived, such as several
  minutes. It is <bcp14>RECOMMENDED</bcp14> that this code be between six and eight
  characters in length.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-3.3.4-2.3"><tt>uri</tt> (string):</dt>
            <dd pn="section-3.3.4-2.4">
              <t indent="0" pn="section-3.3.4-2.4.1">The interaction URI that the client instance
  will direct the RO to. This URI <bcp14>MUST</bcp14> be short enough to be
  communicated to the end user by the client instance. It is <bcp14>RECOMMENDED</bcp14> that this URI
  be short enough for an end user to type in manually. The URI
  <bcp14>MUST NOT</bcp14> contain the <tt>code</tt> value. This URI <bcp14>MUST</bcp14> be an absolute URI.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <sourcecode type="json" markers="false" pn="section-3.3.4-3">
"interact": {
    "user_code_uri": {
        "code": "A1BC3DFF",
        "uri": "https://s.example/device"
    }
}
</sourcecode>
          <t indent="0" pn="section-3.3.4-4">The client instance <bcp14>MUST</bcp14> communicate the "code" to the end user in some
fashion, such as displaying it on a screen or reading it out
audibly. This code is used by the interaction component of the AS as a means
of identifying the pending grant request and does not function as an
authentication factor for the RO.</t>
          <t indent="0" pn="section-3.3.4-5">The client instance <bcp14>MUST</bcp14> also communicate the URI to the end user. Since it is expected
that the end user will continue interaction on a secondary device,
the URI needs to be short enough to allow the end user to type or copy it to a secondary
device without mistakes.</t>
          <t indent="0" pn="section-3.3.4-6">The URI returned is a function of the AS, but the URI itself <bcp14>MAY</bcp14> be completely
distinct from the grant endpoint URI that the client instance uses to request access (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>), allowing an
AS to separate its user-interaction functionality from its backend security
functionality. If the AS does not directly host the functionality accessed through
the given URI, then the means for the interaction functionality to communicate
with the rest of the AS are out of scope for this specification.</t>
          <t indent="0" pn="section-3.3.4-7">See details of the interaction in <xref target="interaction-usercode" format="default" sectionFormat="of" derivedContent="Section 4.1.2"/>.</t>
        </section>
        <section anchor="response-interact-finish" numbered="true" removeInRFC="false" toc="include" pn="section-3.3.5">
          <name slugifiedName="name-interaction-finish">Interaction Finish</name>
          <t indent="0" pn="section-3.3.5-1">If the client instance indicates that it can receive a post-interaction redirect or push at a URI (<xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"> </xref>)
and the AS supports this mode for the
client instance's request, the AS responds with a <tt>finish</tt> field containing a nonce
that the client instance will use in validating the callback as defined in
<xref target="interaction-finish" format="default" sectionFormat="of" derivedContent="Section 4.2"/>.</t>
          <sourcecode type="json" markers="false" pn="section-3.3.5-2">
"interact": {
    "finish": "MBDOFXG4Y5CVJCX821LH"
}
</sourcecode>
          <t indent="0" pn="section-3.3.5-3">When the interaction is completed, the interaction component of the AS <bcp14>MUST</bcp14> contact the client instance using the means defined by the finish method
as described in <xref target="interaction-finish" format="default" sectionFormat="of" derivedContent="Section 4.2"/>.</t>
          <t indent="0" pn="section-3.3.5-4">If the AS returns the <tt>finish</tt> field, the client instance <bcp14>MUST NOT</bcp14>
continue a grant request before it receives the associated
interaction reference on the callback URI. See details in <xref target="interaction-finish" format="default" sectionFormat="of" derivedContent="Section 4.2"/>.</t>
        </section>
      </section>
      <section anchor="response-subject" numbered="true" removeInRFC="false" toc="include" pn="section-3.4">
        <name slugifiedName="name-returning-subject-informati">Returning Subject Information</name>
        <t indent="0" pn="section-3.4-1">If information about the RO is requested and the AS
grants the client instance access to that data, the AS returns the approved
information in the "subject" response field. The AS <bcp14>MUST</bcp14> return the <tt>subject</tt> field only in cases where the AS is sure that
the RO and the end user are the same party. This can be accomplished through some forms of
interaction with the RO (<xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"> </xref>).</t>
        <t indent="0" pn="section-3.4-2">This field is an object with the following properties.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-3.4-3">
          <dt pn="section-3.4-3.1"><tt>sub_ids</tt> (array of objects):</dt>
          <dd pn="section-3.4-3.2">
            <t indent="0" pn="section-3.4-3.2.1">An array of Subject Identifiers for the
  RO, as defined by
  <xref target="RFC9493" format="default" sectionFormat="of" derivedContent="RFC9493"/>.
  <bcp14>REQUIRED</bcp14> if returning Subject Identifiers.</t>
          </dd>
          <dt pn="section-3.4-3.3"><tt>assertions</tt> (array of objects):</dt>
          <dd pn="section-3.4-3.4">
            <t indent="0" pn="section-3.4-3.4.1">An array containing assertions as objects, each containing the assertion
  object described below.
  <bcp14>REQUIRED</bcp14> if returning assertions.</t>
          </dd>
          <dt pn="section-3.4-3.5"><tt>updated_at</tt> (string):</dt>
          <dd pn="section-3.4-3.6">
            <t indent="0" pn="section-3.4-3.6.1">Timestamp as a date string as described in <xref target="RFC3339" format="default" sectionFormat="of" derivedContent="RFC3339"/>, indicating
  when the identified account was last updated. The client instance <bcp14>MAY</bcp14> use
  this value to determine if it needs to request updated profile
  information through an identity API. The definition of such an
  identity API is out of scope for this specification.
  <bcp14>RECOMMENDED</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-3.4-4">Assertion objects contain the following fields:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-3.4-5">
          <dt pn="section-3.4-5.1"><tt>format</tt> (string):</dt>
          <dd pn="section-3.4-5.2">
            <t indent="0" pn="section-3.4-5.2.1">The assertion format.
  Possible formats are listed in <xref target="assertion-formats" format="default" sectionFormat="of" derivedContent="Section 3.4.1"/>.
  Additional assertion formats can be defined in the "GNAP Assertion Formats" registry (<xref target="IANA-assertion-formats" format="default" sectionFormat="of" derivedContent="Section 10.6"> </xref>).
  <bcp14>REQUIRED</bcp14>.</t>
          </dd>
          <dt pn="section-3.4-5.3"><tt>value</tt> (string):</dt>
          <dd pn="section-3.4-5.4">
            <t indent="0" pn="section-3.4-5.4.1">The assertion value as the JSON string serialization of the assertion.
  <bcp14>REQUIRED</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-3.4-6">The following non-normative example contains an opaque identifier and an OpenID Connect ID Token:</t>
        <sourcecode type="json" markers="false" pn="section-3.4-7">
"subject": {
  "sub_ids": [ {
    "format": "opaque",
    "id": "XUT2MFM1XBIKJKSDU8QM"
  } ],
  "assertions": [ {
    "format": "id_token",
    "value": "eyj..."
  } ]
}
</sourcecode>
        <t indent="0" pn="section-3.4-8">Subject Identifiers returned by the AS <bcp14>SHOULD</bcp14> uniquely identify the RO at the
AS. Some forms of Subject Identifiers are opaque to the client instance (such as the subject of an
issuer and subject pair), while other forms (such as email address and phone number) are
intended to allow the client instance to correlate the identifier with other account information
at the client instance. The client instance <bcp14>MUST NOT</bcp14> request or use any returned Subject Identifiers for communication
purposes (see <xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"/>). That is, a Subject Identifier returned in the format of an email address or
a phone number only identifies the RO to the AS and does not indicate that the
AS has validated that the represented email address or phone number in the identifier
is suitable for communication with the current user. To get such information,
the client instance <bcp14>MUST</bcp14> use an identity protocol to request and receive additional identity
claims. The details of an identity protocol and associated schema
are outside the scope of this specification.</t>
        <t indent="0" pn="section-3.4-9">The AS <bcp14>MUST</bcp14> ensure that the returned subject information represents the RO. In most cases,
the AS will also ensure that the returned subject information represents the end user authenticated
interactively at the AS.
The AS <bcp14>SHOULD NOT</bcp14> reuse Subject Identifiers for multiple different ROs.</t>
        <t indent="0" pn="section-3.4-10">The "sub_ids" and "assertions" response fields are independent of each other. That is, a
returned assertion <bcp14>MAY</bcp14> use a different Subject Identifier than other assertions and
Subject Identifiers in the response. However, all Subject Identifiers and assertions returned
<bcp14>MUST</bcp14> refer to the same party.</t>
        <t indent="0" pn="section-3.4-11">The client instance <bcp14>MUST</bcp14> interpret all subject information in the context of the AS from which the
subject information is received, as is discussed in Section 6 of <xref target="SP80063C" format="default" sectionFormat="of" derivedContent="SP80063C"/>. For example, one AS could
return an email identifier of  "user@example.com" for one RO, and a different AS could return that
same email identifier of "user@example.com" for a completely different RO. A client instance talking to
both ASes needs to differentiate between these two accounts by accounting for the AS source
of each identifier and not assuming that either has a canonical claim on the identifier without
additional configuration and trust agreements. Otherwise, a rogue AS could exploit this to
take over a targeted account asserted by a different AS.</t>
        <t indent="0" pn="section-3.4-12">Extensions to this specification <bcp14>MAY</bcp14> define additional response
properties in the "GNAP Subject Information Response Fields" registry (<xref target="IANA-subject-response" format="default" sectionFormat="of" derivedContent="Section 10.14"> </xref>).</t>
        <t indent="0" pn="section-3.4-13">The grant request <bcp14>MUST</bcp14> be in the <em>approved</em> state to return this field in the response.</t>
        <t indent="0" pn="section-3.4-14">See <xref target="security-assertions" format="default" sectionFormat="of" derivedContent="Section 11.30"/> for considerations that the client instance has to make when accepting
and processing assertions from the AS.</t>
        <section anchor="assertion-formats" numbered="true" removeInRFC="false" toc="include" pn="section-3.4.1">
          <name slugifiedName="name-assertion-formats">Assertion Formats</name>
          <t indent="0" pn="section-3.4.1-1">The following assertion formats are defined in this specification:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-3.4.1-2">
            <dt pn="section-3.4.1-2.1"><tt>id_token</tt>:</dt>
            <dd pn="section-3.4.1-2.2">
              <t indent="0" pn="section-3.4.1-2.2.1">An OpenID Connect ID Token <xref target="OIDC" format="default" sectionFormat="of" derivedContent="OIDC"/>, in JSON Web
              Token (JWT) compact format as a single string.</t>
            </dd>
            <dt pn="section-3.4.1-2.3"><tt>saml2</tt>:</dt>
            <dd pn="section-3.4.1-2.4">
              <t indent="0" pn="section-3.4.1-2.4.1">A SAML 2.0 assertion <xref target="SAML2" format="default" sectionFormat="of" derivedContent="SAML2"/>, encoded as a single base64url string with no padding.</t>
            </dd>
          </dl>
        </section>
      </section>
      <section anchor="response-dynamic-handles" numbered="true" removeInRFC="false" toc="include" pn="section-3.5">
        <name slugifiedName="name-returning-a-dynamically-bou">Returning a Dynamically Bound Client Instance Identifier</name>
        <t indent="0" pn="section-3.5-1">Many parts of the client instance's request can be passed as either a value
or a reference. The use of a reference in place of a value allows
for a client instance to optimize requests to the AS.</t>
        <t indent="0" pn="section-3.5-2">Some references, such as for the client instance's identity (<xref target="request-instance" format="default" sectionFormat="of" derivedContent="Section 2.3.1"> </xref>)
or the requested resources (<xref target="resource-access-reference" format="default" sectionFormat="of" derivedContent="Section 8.1"> </xref>), can be managed statically through an
admin console or developer portal provided by the AS or RS. The developer
of the client software can include these values in their code for a more
efficient and compact request.</t>
        <t indent="0" pn="section-3.5-3">If desired, the AS <bcp14>MAY</bcp14> also generate and return an instance identifier
dynamically to the client instance in the response to facilitate multiple
interactions with the same client instance over time. The client instance <bcp14>SHOULD</bcp14> use this
instance identifier in future requests in lieu of sending the associated data
values in the <tt>client</tt> field.</t>
        <t indent="0" pn="section-3.5-4">Dynamically generated client instance identifiers are string values that <bcp14>MUST</bcp14> be
protected by the client instance as secrets. Instance identifier values <bcp14>MUST</bcp14> be unguessable
and <bcp14>MUST NOT</bcp14> contain any information that would compromise any party if revealed. Instance identifier values are
opaque to the client instance, and their content is determined by the AS. The instance
identifier <bcp14>MUST</bcp14> be unique per client instance at the AS.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-3.5-5">
          <dt pn="section-3.5-5.1"><tt>instance_id</tt> (string):</dt>
          <dd pn="section-3.5-5.2">
            <t indent="0" pn="section-3.5-5.2.1">A string value used to represent the information
  in the <tt>client</tt> object that the client instance can use in a future request, as
  described in <xref target="request-instance" format="default" sectionFormat="of" derivedContent="Section 2.3.1"/>.
  <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-3.5-6">The following non-normative example shows an instance identifier alongside an issued access token.</t>
        <sourcecode type="json" markers="false" pn="section-3.5-7">
{
    "instance_id": "7C7C4AZ9KHRS6X63AJAO",
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0"
    }
}
</sourcecode>
      </section>
      <section anchor="response-error" numbered="true" removeInRFC="false" toc="include" pn="section-3.6">
        <name slugifiedName="name-error-response">Error Response</name>
        <t indent="0" pn="section-3.6-1">If the AS determines that the request cannot be completed for any reason, it responds to the client instance with an <tt>error</tt> field in the response message. This field is either an object or a string.</t>
        <t indent="0" pn="section-3.6-2">When returned as an object, the object contains the following fields:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-3.6-3">
          <dt pn="section-3.6-3.1"><tt>code</tt> (string):</dt>
          <dd pn="section-3.6-3.2">
            <t indent="0" pn="section-3.6-3.2.1">A single ASCII error code defining the error.
The value <bcp14>MUST</bcp14> be defined in the "GNAP Error Codes" registry (<xref target="IANA-error-code" format="default" sectionFormat="of" derivedContent="Section 10.15"> </xref>).
<bcp14>REQUIRED</bcp14>.</t>
          </dd>
          <dt pn="section-3.6-3.3"><tt>description</tt> (string):</dt>
          <dd pn="section-3.6-3.4">
            <t indent="0" pn="section-3.6-3.4.1">A human-readable string description of the error intended for the
developer of the client. The value is chosen by the implementation.
<bcp14>OPTIONAL</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-3.6-4">This specification defines the following <tt>code</tt> values:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-3.6-5">
          <dt pn="section-3.6-5.1"><tt>"invalid_request"</tt>:</dt>
          <dd pn="section-3.6-5.2">
            <t indent="0" pn="section-3.6-5.2.1">The request is missing a required parameter, includes an
  invalid parameter value, or is otherwise malformed.</t>
          </dd>
          <dt pn="section-3.6-5.3"><tt>"invalid_client"</tt>:</dt>
          <dd pn="section-3.6-5.4">
            <t indent="0" pn="section-3.6-5.4.1">The request was made from a client that was not recognized
  or allowed by the AS, or the client's signature validation failed.</t>
          </dd>
          <dt pn="section-3.6-5.5"><tt>"invalid_interaction"</tt>:</dt>
          <dd pn="section-3.6-5.6">
            <t indent="0" pn="section-3.6-5.6.1">The client instance has provided an interaction reference that is incorrect
  for this request, or the interaction modes in use have expired.</t>
          </dd>
          <dt pn="section-3.6-5.7"><tt>"invalid_flag"</tt>:</dt>
          <dd pn="section-3.6-5.8">
            <t indent="0" pn="section-3.6-5.8.1">The flag configuration is not valid.</t>
          </dd>
          <dt pn="section-3.6-5.9"><tt>"invalid_rotation"</tt>:</dt>
          <dd pn="section-3.6-5.10">
            <t indent="0" pn="section-3.6-5.10.1">The token rotation request is not valid.</t>
          </dd>
          <dt pn="section-3.6-5.11"><tt>"key_rotation_not_supported"</tt>:</dt>
          <dd pn="section-3.6-5.12">
            <t indent="0" pn="section-3.6-5.12.1">The AS does not allow rotation of this access token's key.</t>
          </dd>
          <dt pn="section-3.6-5.13"><tt>"invalid_continuation"</tt>:</dt>
          <dd pn="section-3.6-5.14">
            <t indent="0" pn="section-3.6-5.14.1">The continuation of the referenced grant could not be processed.</t>
          </dd>
          <dt pn="section-3.6-5.15"><tt>"user_denied"</tt>:</dt>
          <dd pn="section-3.6-5.16">
            <t indent="0" pn="section-3.6-5.16.1">The RO denied the request.</t>
          </dd>
          <dt pn="section-3.6-5.17"><tt>"request_denied"</tt>:</dt>
          <dd pn="section-3.6-5.18">
            <t indent="0" pn="section-3.6-5.18.1">The request was denied for an unspecified reason.</t>
          </dd>
          <dt pn="section-3.6-5.19"><tt>"unknown_user"</tt>:</dt>
          <dd pn="section-3.6-5.20">
            <t indent="0" pn="section-3.6-5.20.1">The user presented in the request is not known to the AS or does not match the user present during interaction.</t>
          </dd>
          <dt pn="section-3.6-5.21"><tt>"unknown_interaction"</tt>:</dt>
          <dd pn="section-3.6-5.22">
            <t indent="0" pn="section-3.6-5.22.1">The interaction integrity could not be established.</t>
          </dd>
          <dt pn="section-3.6-5.23"><tt>"too_fast"</tt>:</dt>
          <dd pn="section-3.6-5.24">
            <t indent="0" pn="section-3.6-5.24.1">The client instance did not respect the timeout in the wait response before the next call.</t>
          </dd>
          <dt pn="section-3.6-5.25"><tt>"too_many_attempts"</tt>:</dt>
          <dd pn="section-3.6-5.26">
            <t indent="0" pn="section-3.6-5.26.1">A limit has been reached in the total number of reasonable attempts. This number is either defined statically or adjusted based on runtime conditions by the AS.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-3.6-6">Additional error codes can be defined in the "GNAP Error Codes" registry (<xref target="IANA-error-code" format="default" sectionFormat="of" derivedContent="Section 10.15"> </xref>).</t>
        <t indent="0" pn="section-3.6-7">For example, if the RO denied the request while interacting with the AS,
the AS would return the following error when the client instance tries to
continue the grant request:</t>
        <sourcecode type="json" markers="false" pn="section-3.6-8">
{
    "error": {
        "code": "user_denied",
        "description": "The RO denied the request"
    }
}
</sourcecode>
        <t indent="0" pn="section-3.6-9">Alternatively, the AS <bcp14>MAY</bcp14> choose to only return the error as codes and provide the error as a string. Since the <tt>description</tt> field is not intended to be machine-readable, the following response is considered functionally equivalent to the previous example for the purposes of the client software's understanding:</t>
        <sourcecode type="json" markers="false" pn="section-3.6-10">
{
    "error": "user_denied"
}
</sourcecode>
        <t indent="0" pn="section-3.6-11">If an error state is reached but the grant is in the <em>pending</em> state (and therefore the client instance can continue), the AS <bcp14>MAY</bcp14> include the <tt>continue</tt> field in the response along with the <tt>error</tt>, as defined in <xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"/>. This allows the client instance to modify its request for access, potentially leading to prompting the RO again. Other fields <bcp14>MUST NOT</bcp14> be included in the response.</t>
      </section>
    </section>
    <section anchor="authorization" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-determining-authorization-a">Determining Authorization and Consent</name>
      <t indent="0" pn="section-4-1">When the client instance makes its initial request (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>) to the AS for delegated access, it
is capable of asking for several different kinds of information in response:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-2">
        <li pn="section-4-2.1">
          <t indent="0" pn="section-4-2.1.1">the access being requested, in the <tt>access_token</tt> request parameter</t>
        </li>
        <li pn="section-4-2.2">
          <t indent="0" pn="section-4-2.2.1">the subject information being requested, in the <tt>subject</tt> request parameter</t>
        </li>
        <li pn="section-4-2.3">
          <t indent="0" pn="section-4-2.3.1">any additional requested information defined by extensions of this protocol</t>
        </li>
      </ul>
      <t indent="0" pn="section-4-3">When the grant request is in the <em>processing</em> state, the AS determines what authorizations and
consents are required to fulfill this requested delegation. The details of how the
AS makes this determination are out of scope for this document. However, there are several common
patterns defined and supported by GNAP for fulfilling these requirements, including information
sent by the client instance, information gathered through the interaction process, and information
supplied by external parties. An individual AS can define its own policies and processes for
deciding when and how to gather the necessary authorizations and consent and how those are applied
to the grant request.</t>
      <t indent="0" pn="section-4-4">To facilitate the AS fulfilling this request, the client instance sends information about the
actions the client software can take, including:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-5">
        <li pn="section-4-5.1">
          <t indent="0" pn="section-4-5.1.1">starting interaction with the end user, in the <tt>interact</tt> request parameter</t>
        </li>
        <li pn="section-4-5.2">
          <t indent="0" pn="section-4-5.2.1">receiving notification that interaction with the RO has concluded, in the <tt>interact</tt> request parameter</t>
        </li>
        <li pn="section-4-5.3">
          <t indent="0" pn="section-4-5.3.1">any additional capabilities defined by extensions of this protocol</t>
        </li>
      </ul>
      <t indent="0" pn="section-4-6">The client instance can also supply information directly to the AS in its request. The client instance can send several kinds of things, including:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-7">
        <li pn="section-4-7.1">
          <t indent="0" pn="section-4-7.1.1">the identity of the client instance, known from the keys or identifiers in the <tt>client</tt> request parameter</t>
        </li>
        <li pn="section-4-7.2">
          <t indent="0" pn="section-4-7.2.1">the identity of the end user, in the <tt>user</tt> request parameter</t>
        </li>
        <li pn="section-4-7.3">
          <t indent="0" pn="section-4-7.3.1">any additional information presented by the client instance in the request defined by extensions of this protocol</t>
        </li>
      </ul>
      <t indent="0" pn="section-4-8">The AS will process this presented information in the context of the client instance's request and
can only trust the information as much as it trusts the presentation and context of that request.
If the AS determines that the information presented in the initial request is sufficient for granting the requested
access, the AS <bcp14>MAY</bcp14> move the grant request to the <em>approved</em> state and return results <xref target="response" format="default" sectionFormat="of" derivedContent="Section 3">immediately in its response</xref> with
access tokens and subject information.</t>
      <t indent="0" pn="section-4-9">If the AS determines that additional runtime authorization is required, the AS can either deny the
request outright (if there is no possible recovery) or move the grant request to the <em>pending</em>
state and use a number of means at its disposal to gather that authorization from the appropriate ROs, including:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-10">
        <li pn="section-4-10.1">
          <t indent="0" pn="section-4-10.1.1">starting interaction with the end user facilitated by the client software, such as a redirection or user code</t>
        </li>
        <li pn="section-4-10.2">
          <t indent="0" pn="section-4-10.2.1">challenging the client instance through a challenge-response mechanism</t>
        </li>
        <li pn="section-4-10.3">
          <t indent="0" pn="section-4-10.3.1">requesting that the client instance present specific additional information, such as a user's credential or an assertion</t>
        </li>
        <li pn="section-4-10.4">
          <t indent="0" pn="section-4-10.4.1">contacting an RO through an out-of-band mechanism, such as a push notification</t>
        </li>
        <li pn="section-4-10.5">
          <t indent="0" pn="section-4-10.5.1">executing an auxiliary software process through an out-of-band mechanism, such as querying a digital wallet</t>
        </li>
      </ul>
      <t indent="0" pn="section-4-11">The process of gathering authorization and consent in GNAP is left deliberately flexible to allow for a
wide variety of different deployments, interactions, and methodologies.
In this process, the AS can gather consent from the RO or apply the RO's policy as necessitated by the access that has
been requested. The AS can sometimes determine which RO needs to prompt for consent based on what has been requested
by the client instance, such as a specific RS record, an identified subject, or a request requiring specific
access such as approval by an administrator. In other cases, the request is applied to whichever RO is present at the time of consent gathering. This pattern is especially prevalent when the
end user is sent to the AS for an interactive session, during which the end user takes on the role of the RO. In these cases, the end user is delegating their own access as RO to the client instance.</t>
      <t indent="0" pn="section-4-12">The client instance can indicate that it is capable of facilitating interaction with the end user,
another party, or another piece of software through its interaction start request (<xref target="request-interact-start" format="default" sectionFormat="of" derivedContent="Section 2.5.1"/>). Here, the
AS usually needs to interact directly with
the end user to determine their identity, determine their status as an RO, and collect their consent. If the AS has determined
that authorization is required and the AS can support one or more of the requested interaction start
methods, the AS returns the associated interaction start responses (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>). The client
instance <bcp14>SHOULD</bcp14> initiate one or more of these interaction methods (<xref target="interaction-start" format="default" sectionFormat="of" derivedContent="Section 4.1"> </xref>) in order to
facilitate the granting of the request. If more than one interaction start method is available,
the means by which the client chooses which methods to follow are out of scope of this specification.</t>
      <t indent="0" pn="section-4-13">After starting interaction, the client instance can then make a continuation request (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>)
either in response to a signal indicating the finish of the interaction (<xref target="interaction-finish" format="default" sectionFormat="of" derivedContent="Section 4.2"> </xref>), after a time-based
polling, or through some other method defined by an extension of this specification through the "GNAP Interaction Mode Responses" registry (<xref target="IANA-interaction-response" format="default" sectionFormat="of" derivedContent="Section 10.13"/>).</t>
      <t indent="0" pn="section-4-14">If the grant request is not in the <em>approved</em> state, the
client instance can repeat the interaction process by sending a grant update request (<xref target="continue-modify" format="default" sectionFormat="of" derivedContent="Section 5.3"/>) with new interaction methods (<xref target="request-interact" format="default" sectionFormat="of" derivedContent="Section 2.5"> </xref>).</t>
      <t indent="0" pn="section-4-15">The client instance <bcp14>MUST</bcp14> use each interaction method once at most if a response can be detected.
The AS <bcp14>MUST</bcp14> handle any interact request as a one-time-use mechanism and <bcp14>SHOULD</bcp14> apply suitable
timeouts to any interaction start methods provided, including user codes and redirection URIs.
The client instance <bcp14>SHOULD</bcp14> apply suitable timeouts to any interaction finish method.</t>
      <t indent="0" pn="section-4-16">In order to support client software deployed in disadvantaged network conditions, the AS <bcp14>MAY</bcp14>
allow for processing of the same interaction method multiple times if the AS can determine
that the request is from the same party and the results are idempotent.
For example, if a client instance launches a redirect to the AS but does not receive a response
within a reasonable time, the client software can launch the redirect again, assuming that it never
reached the AS in the first place. However, if the AS in question
receives both requests, it could mistakenly process them separately, creating an undefined state for the
client instance. If the AS can determine that both requests come from the same origin or under the same session,
and the requests both came before any additional state change to the grant occurs, the AS can reasonably
conclude that the initial response was not received and the same response can be returned to the client instance.</t>
      <t indent="0" pn="section-4-17">If the AS instead has a means of contacting the RO directly, it could
do so without involving the client instance in its consent-gathering process. For example, the AS could
push a notification to a known RO and have the RO approve the pending request asynchronously. These interactions
can be through an interface of the AS itself (such as a hosted web page), through another application (such as
something installed on the RO's device), through a messaging fabric, or any other means.</t>
      <t indent="0" pn="section-4-18">When interacting with an RO, the AS can use various strategies to determine
the authorization of the requested grant, including:
</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4-19">
        <li pn="section-4-19.1">
          <t indent="0" pn="section-4-19.1.1">authenticate the RO through a local account or some other means, such as federated login</t>
        </li>
        <li pn="section-4-19.2">
          <t indent="0" pn="section-4-19.2.1">validate the RO through presentation of claims, attributes, or other information</t>
        </li>
        <li pn="section-4-19.3">
          <t indent="0" pn="section-4-19.3.1">prompt the RO for consent for the requested delegation</t>
        </li>
        <li pn="section-4-19.4">
          <t indent="0" pn="section-4-19.4.1">describe to the RO what information is being released, to whom, and for what purpose</t>
        </li>
        <li pn="section-4-19.5">
          <t indent="0" pn="section-4-19.5.1">provide warnings to the RO about potential attacks or negative effects of allowing the information</t>
        </li>
        <li pn="section-4-19.6">
          <t indent="0" pn="section-4-19.6.1">allow the RO to modify the client instance's requested access, including limiting or expanding that access</t>
        </li>
        <li pn="section-4-19.7">
          <t indent="0" pn="section-4-19.7.1">provide the RO with artifacts such as receipts to facilitate an audit trail of authorizations</t>
        </li>
        <li pn="section-4-19.8">
          <t indent="0" pn="section-4-19.8.1">allow the RO to deny the requested delegation</t>
        </li>
      </ul>
      <t indent="0" pn="section-4-20">The AS is also allowed to request authorization from more than one RO, if the AS deems fit. For example, a medical
record might need to be released by both an attending nurse and a physician, or both owners of a bank account
need to sign off on a transfer request. Alternatively, the AS could require N of M possible ROs
to approve a given request. In some circumstances, the AS could even determine that the end user
present during the interaction is not the appropriate RO
for a given request and reach out to the appropriate RO asynchronously.</t>
      <t indent="0" pn="section-4-21">The RO is also allowed to define an automated policy at the AS to determine which kind of end user can get access to the resource and under which conditions. For instance, such a condition might require the end user to log in and accept the RO's legal provisions. Alternatively, client software could be acting without an end user, and the RO's policy allows issuance of access tokens to specific instances of that client software without human interaction.</t>
      <t indent="0" pn="section-4-22">While all of these cases are supported by GNAP, the details of their
implementation and the methods for determining which ROs or related policies
are required for a given request are out of scope for this specification.
</t>
      <section anchor="interaction-start" numbered="true" removeInRFC="false" toc="include" pn="section-4.1">
        <name slugifiedName="name-starting-interaction-with-t">Starting Interaction with the End User</name>
        <t indent="0" pn="section-4.1-1">When a grant request is in the <em>pending</em> state, the interaction start methods sent by
the client instance can be used to facilitate interaction with the end user.
To initiate an interaction start method indicated by the
interaction start responses (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>) from the AS, the client instance
follows the steps defined by that interaction start mode. The actions of the client instance
required for the interaction start modes defined in this specification are described
in the following subsections. Interaction start modes defined in extensions to this specification
<bcp14>MUST</bcp14> define the expected actions of the client software when that interaction start mode is used.</t>
        <t indent="0" pn="section-4.1-2">If the client instance does not start an interaction start mode within an AS-determined amount of
time, the AS <bcp14>MUST</bcp14> reject attempts to use the interaction start modes. If the client instance has
already begun one interaction start mode and the interaction has been successfully completed, the AS <bcp14>MUST</bcp14> reject attempts to use other interaction
start modes. For example, if a user code has been successfully entered for a grant request, the AS
will need to reject requests to an arbitrary redirect URI on the same grant request in order to prevent an
attacker from capturing and altering an active authorization process.</t>
        <section anchor="interaction-redirect" numbered="true" removeInRFC="false" toc="include" pn="section-4.1.1">
          <name slugifiedName="name-interaction-at-a-redirected">Interaction at a Redirected URI</name>
          <t indent="0" pn="section-4.1.1-1">When the end user is directed to an arbitrary URI through the "redirect" mode (<xref target="response-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 3.3.1"> </xref>), the client instance facilitates opening the URI through the end user's web browser.
The client instance could launch the URI through the system browser, provide a clickable
link, redirect the user through HTTP response codes, or display the URI in a form
the end user can use to launch, such as a multidimensional barcode. In all cases, the URI
is accessed with an HTTP GET request, and the resulting page is assumed to allow direct interaction
with the end user through an HTTP user agent.
With this method, it is common (though not required) for the RO to be the same party as the end user, since
the client instance has to communicate the redirection URI to the end user.</t>
          <t indent="0" pn="section-4.1.1-2">In many cases, the URI indicates a web page hosted at the AS, allowing the
AS to authenticate the end user as the RO and interactively provide consent.
The URI value is used to identify the grant request being authorized.
If the URI cannot be associated with a currently active
request, the AS <bcp14>MUST</bcp14> display an error to the RO and <bcp14>MUST NOT</bcp14> attempt
to redirect the RO back to any client instance, even if a redirect finish method is supplied (<xref target="request-interact-callback-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.2.1"> </xref>).
If the URI is not hosted by the AS directly, the means of communication between
the AS and the service provided by this URI are out of scope for this specification.</t>
          <t indent="0" pn="section-4.1.1-3">The client instance <bcp14>MUST NOT</bcp14> modify the URI when launching it;
in particular, the client instance <bcp14>MUST NOT</bcp14> add any parameters to the URI.
The URI <bcp14>MUST</bcp14> be reachable from the end user's browser, though
the URI <bcp14>MAY</bcp14> be opened on a separate device from the client instance
itself. The URI <bcp14>MUST</bcp14> be accessible from an HTTP GET
request, and it <bcp14>MUST</bcp14> be protected by HTTPS, be
hosted on a server local to the RO's browser ("localhost"), or
use an application-specific URI scheme that is loaded on the end user's device.</t>
        </section>
        <section anchor="interaction-usercode" numbered="true" removeInRFC="false" toc="include" pn="section-4.1.2">
          <name slugifiedName="name-interaction-at-the-static-u">Interaction at the Static User Code URI</name>
          <t indent="0" pn="section-4.1.2-1">When the end user is directed to enter a short code through the "user_code" mode (<xref target="response-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 3.3.3"> </xref>), the client instance communicates the user code to the end user and
directs the end user to enter that code at an associated URI.
The client instance <bcp14>MAY</bcp14>
format the user code in such a way as to facilitate memorability and transfer of the
code, so long as this formatting does not alter the value as accepted at the user code
URI. For example, a client instance receiving the user code "A1BC3DFF" could choose to
display this to the user as "A1BC 3DFF", breaking up the long string into two shorter
strings.</t>
          <t indent="0" pn="section-4.1.2-2">When processing input codes, the AS <bcp14>MUST</bcp14> transform the input string to remove invalid characters.
In the above example, the space in between the two parts would be removed upon its
entry into the interactive form at the user code URI. Additionally, the AS <bcp14>MUST</bcp14> treat
user input as case insensitive. For example, if the user inputs the string "a1bc 3DFF", the
AS will treat the input the same as "A1BC3DFF". To facilitate this, it is <bcp14>RECOMMENDED</bcp14>
that the AS use only ASCII letters and numbers as valid characters for the user code.</t>
          <t indent="0" pn="section-4.1.2-3">It is <bcp14>RECOMMENDED</bcp14> that the AS choose from character values that are easily copied and typed without ambiguity.
For example, some glyphs have multiple Unicode code points for the same visual character, and the end user
could potentially type a different character than what the AS has returned.
For additional considerations of internationalized character strings, see <xref target="RFC8264" format="default" sectionFormat="of" derivedContent="RFC8264"/>.</t>
          <t indent="0" pn="section-4.1.2-4">This mode is designed to be used when the client instance is not able to communicate or facilitate launching
an arbitrary URI. The associated URI could be statically configured with the client instance or
in the client software's documentation. As a consequence, these URIs <bcp14>SHOULD</bcp14> be short.
The user code URI <bcp14>MUST</bcp14> be reachable from the end user's browser, though
the URI is usually opened on a separate device from the client instance
itself. The URI <bcp14>MUST</bcp14> be accessible from an HTTP GET
request, and it <bcp14>MUST</bcp14> be protected by HTTPS, be
hosted on a server local to the RO's browser ("localhost"), or
use an application-specific URI scheme that is loaded on the end user's device.</t>
          <t indent="0" pn="section-4.1.2-5">In many cases, the URI indicates a web page hosted at the AS, allowing the
AS to authenticate the end user as the RO and interactively provide consent.
The value of the user code is used to identify the grant request being authorized.
If the user code cannot be associated with a currently active
request, the AS <bcp14>MUST</bcp14> display an error to the RO and <bcp14>MUST NOT</bcp14> attempt
to redirect the RO back to any client instance, even if a redirect finish method is supplied (<xref target="request-interact-callback-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.2.1"> </xref>).
If the interaction component at the user code URI is not hosted by the AS directly, the means of communication between
the AS and this URI, including communication of the user code itself, are out of scope for this specification.</t>
          <t indent="0" pn="section-4.1.2-6">When the RO enters this code at the user code URI,
the AS <bcp14>MUST</bcp14> uniquely identify the pending request that the code was associated
with. If the AS does not recognize the entered code, the interaction component <bcp14>MUST</bcp14>
display an error to the user. If the AS detects too many unrecognized code
enter attempts, the interaction component <bcp14>SHOULD</bcp14> display an error to the user indicating too many attempts and
<bcp14>MAY</bcp14> take additional actions such as slowing down the input interactions.
The user should be warned as such an error state is approached, if possible.</t>
        </section>
        <section anchor="interaction-usercodeuri" numbered="true" removeInRFC="false" toc="include" pn="section-4.1.3">
          <name slugifiedName="name-interaction-at-a-dynamic-us">Interaction at a Dynamic User Code URI</name>
          <t indent="0" pn="section-4.1.3-1">When the end user is directed to enter a short code through the "user_code_uri" mode (<xref target="response-interact-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 3.3.4"> </xref>), the client instance communicates the user code and associated URI to the end user and
directs the end user to enter that code at the URI.
The client instance <bcp14>MAY</bcp14>
format the user code in such a way as to facilitate memorability and transfer of the
code, so long as this formatting does not alter the value as accepted at the user code
URI. For example, a client instance receiving the user code "A1BC3DFF" could choose to
display this to the user as "A1BC 3DFF", breaking up the long string into two shorter
strings.</t>
          <t indent="0" pn="section-4.1.3-2">When processing input codes, the AS <bcp14>MUST</bcp14> transform the input string to remove invalid characters.
In the above example, the space in between the two parts would be removed upon its
entry into the interactive form at the user code URI. Additionally, the AS <bcp14>MUST</bcp14> treat
user input as case insensitive. For example, if the user inputs the string "a1bc 3DFF", the
AS will treat the input the same as "A1BC3DFF". To facilitate this, it is <bcp14>RECOMMENDED</bcp14>
that the AS use only ASCII letters and numbers as valid characters for the user code.</t>
          <t indent="0" pn="section-4.1.3-3">This mode is used when the client instance is not able to facilitate launching
a complex arbitrary URI but can communicate arbitrary values like URIs. As a consequence, these URIs
<bcp14>SHOULD</bcp14> be short enough to allow the URI to be typed by the end user,
such as a total length of 20 characters or fewer.
The client instance <bcp14>MUST NOT</bcp14> modify the URI when communicating it to the end user;
in particular the client instance <bcp14>MUST NOT</bcp14> add any parameters to the URI.
The user code URI <bcp14>MUST</bcp14> be reachable from the end user's browser, though
the URI is usually be opened on a separate device from the client instance
itself. The URI <bcp14>MUST</bcp14> be accessible from an HTTP GET
request, and it <bcp14>MUST</bcp14> be protected by HTTPS, be
hosted on a server local to the RO's browser ("localhost"), or
use an application-specific URI scheme that is loaded on the end user's device.</t>
          <t indent="0" pn="section-4.1.3-4">In many cases, the URI indicates a web page hosted at the AS, allowing the
AS to authenticate the end user as the RO and interactively provide consent.
The value of the user code is used to identify the grant request being authorized.
If the user code cannot be associated with a currently active
request, the AS <bcp14>MUST</bcp14> display an error to the RO and <bcp14>MUST NOT</bcp14> attempt
to redirect the RO back to any client instance, even if a redirect finish method is supplied (<xref target="request-interact-callback-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.2.1"> </xref>).
If the interaction component at the user code URI is not hosted by the AS directly, the means of communication between
the AS and this URI, including communication of the user code itself, are out of scope for this specification.</t>
          <t indent="0" pn="section-4.1.3-5">When the RO enters this code at the given URI,
the AS <bcp14>MUST</bcp14> uniquely identify the pending request that the code was associated
with. If the AS does not recognize the entered code, the interaction component <bcp14>MUST</bcp14>
display an error to the user. If the AS detects too many unrecognized code
enter attempts, the interaction component <bcp14>SHOULD</bcp14> display an error to the user indicating too many attempts and
<bcp14>MAY</bcp14> take additional actions such as slowing down the input interactions.
The user should be warned as such an error state is approached, if possible.</t>
        </section>
        <section anchor="interaction-app" numbered="true" removeInRFC="false" toc="include" pn="section-4.1.4">
          <name slugifiedName="name-interaction-through-an-appl">Interaction through an Application URI</name>
          <t indent="0" pn="section-4.1.4-1">When the client instance is directed to launch an application through the
"app" mode (<xref target="response-interact-app" format="default" sectionFormat="of" derivedContent="Section 3.3.2"> </xref>), the client launches the
URI as appropriate to the system, such as through a deep link or custom URI
scheme registered to a mobile application. The means by which the AS and the
launched application communicate with each other and perform any
of the required actions are out of scope for this specification.</t>
        </section>
      </section>
      <section anchor="interaction-finish" numbered="true" removeInRFC="false" toc="include" pn="section-4.2">
        <name slugifiedName="name-post-interaction-completion">Post-Interaction Completion</name>
        <t indent="0" pn="section-4.2-1">If an interaction "finish" method (<xref target="response-interact-finish" format="default" sectionFormat="of" derivedContent="Section 3.3.5"> </xref>) is
associated with the current request, the AS <bcp14>MUST</bcp14> follow the appropriate
method upon completion of interaction in order to signal the client
instance to continue, except for some limited error cases discussed below.
If a finish method is not available, the AS <bcp14>SHOULD</bcp14> instruct the RO to
return to the client instance upon completion. In such cases, it is expected
that the client instance will poll the continuation endpoint as described in <xref target="continue-poll" format="default" sectionFormat="of" derivedContent="Section 5.2"/>.</t>
        <t indent="0" pn="section-4.2-2">The AS <bcp14>MUST</bcp14> create an interaction reference and associate that
reference with the current interaction and the underlying pending
request. The interaction reference value is an ASCII string consisting of only
unreserved characters per <xref section="2.3" sectionFormat="of" target="RFC3986" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3986#section-2.3" derivedContent="RFC3986"/>.
The interaction reference value <bcp14>MUST</bcp14> be sufficiently random so as not to be
guessable by an attacker. The interaction reference <bcp14>MUST</bcp14> be
one-time-use to prevent interception and replay attacks.</t>
        <t indent="0" pn="section-4.2-3">The AS <bcp14>MUST</bcp14> calculate a hash value based on the client instance, AS nonces, and the
interaction reference, as described in
<xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>. The client instance will use this value to
validate the "finish" call.</t>
        <t indent="0" pn="section-4.2-4">All interaction finish methods <bcp14>MUST</bcp14> define a way
to convey the hash and interaction reference back to the client instance. When an
interaction finish method is used, the client instance <bcp14>MUST</bcp14> present the interaction
reference back to the AS as part of its continuation request (<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"> </xref>).</t>
        <t indent="0" pn="section-4.2-5">Note that in many error cases, such as when the RO has denied
access, the "finish" method is still enacted by the AS.
This pattern allows the client instance to potentially recover from the error
state by modifying its request or providing additional information directly to the AS in a
continuation request. The AS <bcp14>MUST NOT</bcp14> follow the "finish" method in the
following circumstances:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2-6">
          <li pn="section-4.2-6.1">
            <t indent="0" pn="section-4.2-6.1.1">The AS has determined that any URIs involved with the finish method are dangerous or blocked.</t>
          </li>
          <li pn="section-4.2-6.2">
            <t indent="0" pn="section-4.2-6.2.1">The AS cannot determine which ongoing grant request is being referenced.</t>
          </li>
          <li pn="section-4.2-6.3">
            <t indent="0" pn="section-4.2-6.3.1">The ongoing grant request has been canceled or otherwise blocked.</t>
          </li>
        </ul>
        <section anchor="interaction-callback" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.1">
          <name slugifiedName="name-completing-interaction-with">Completing Interaction with a Browser Redirect to the Callback URI</name>
          <t indent="0" pn="section-4.2.1-1">When using the <tt>redirect</tt> interaction finish method defined in Sections <xref target="request-interact-callback-redirect" format="counter" sectionFormat="of" derivedContent="2.5.2.1"/> and <xref target="response-interact-finish" format="counter" sectionFormat="of" derivedContent="3.3.5"/>,
the AS signals to the client instance that interaction is
complete and the request can be continued by directing the RO (in
their browser) back to the client instance's redirect URI.</t>
          <t indent="0" pn="section-4.2.1-2">The AS secures this redirect by adding the hash and interaction
reference as query parameters to the client instance's redirect URI.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-4.2.1-3">
            <dt pn="section-4.2.1-3.1"><tt>hash</tt>:</dt>
            <dd pn="section-4.2.1-3.2">
              <t indent="0" pn="section-4.2.1-3.2.1">The interaction hash value as
  described in <xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-4.2.1-3.3"><tt>interact_ref</tt>:</dt>
            <dd pn="section-4.2.1-3.4">
              <t indent="0" pn="section-4.2.1-3.4.1">The interaction reference
  generated for this interaction.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-4.2.1-4">The means of directing the RO to this URI are outside the scope
of this specification, but common options include redirecting the
RO from a web page and launching the system browser with the
target URI. See <xref target="security-redirect-status-codes" format="default" sectionFormat="of" derivedContent="Section 11.19"/> for considerations on
which HTTP status code to use when redirecting a request that
potentially contains credentials.</t>
          <artwork align="left" pn="section-4.2.1-5">
NOTE: '\' line wrapping per RFC 8792

https://client.example.net/return/123455\
  ?hash=x-gguKWTj8rQf7d7i3w3UhzvuJ5bpOlKyAlVpLxBffY\
  &amp;interact_ref=4IFWWIKYBC2PQ6U56NL1
</artwork>
          <t indent="0" pn="section-4.2.1-6">The client instance <bcp14>MUST</bcp14> be able to process a request on the URI. If the URI is
HTTP, the request <bcp14>MUST</bcp14> be an HTTP GET.</t>
          <t indent="0" pn="section-4.2.1-7">When receiving the request, the client instance <bcp14>MUST</bcp14> parse the query
parameters to extract the hash and interaction reference values.
The client instance <bcp14>MUST</bcp14> calculate and validate the hash value as described in
<xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>. If the hash validates, the client instance
sends a continuation request to the AS as described in
<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"/>, using the interaction
reference value received here. If the hash does not validate, the client instance
<bcp14>MUST NOT</bcp14> send the interaction reference to the AS.</t>
        </section>
        <section anchor="interaction-pushback" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.2">
          <name slugifiedName="name-completing-interaction-with-">Completing Interaction with a Direct HTTP Request Callback</name>
          <t indent="0" pn="section-4.2.2-1">When using the <tt>push</tt> interaction finish method defined in Sections <xref target="request-interact-callback-redirect" format="counter" sectionFormat="of" derivedContent="2.5.2.1"/> and <xref target="response-interact-finish" format="counter" sectionFormat="of" derivedContent="3.3.5"/>,
the AS signals to the client instance that interaction is
complete and the request can be continued by sending an HTTP POST
request to the client instance's callback URI.</t>
          <t indent="0" pn="section-4.2.2-2">The HTTP message content is a JSON object consisting of the
following two fields:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-4.2.2-3">
            <dt pn="section-4.2.2-3.1"><tt>hash</tt> (string):</dt>
            <dd pn="section-4.2.2-3.2">
              <t indent="0" pn="section-4.2.2-3.2.1">The interaction hash value as
  described in <xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-4.2.2-3.3"><tt>interact_ref</tt> (string):</dt>
            <dd pn="section-4.2.2-3.4">
              <t indent="0" pn="section-4.2.2-3.4.1">The interaction reference
  generated for this interaction.
  <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <sourcecode type="json" markers="false" pn="section-4.2.2-4">
POST /push/554321 HTTP/1.1
Host: client.example.net
Content-Type: application/json

{
  "hash": "pjdHcrti02HLCwGU3qhUZ3wZXt8IjrV_BtE3oUyOuKNk",
  "interact_ref": "4IFWWIKYBC2PQ6U56NL1"
}
</sourcecode>
          <t indent="0" pn="section-4.2.2-5">Since the AS is making an outbound connection to a URI supplied by an outside party (the client
instance), the AS <bcp14>MUST</bcp14> protect itself against Server-Side Request Forgery (SSRF) attacks when making this call, as discussed in
<xref target="security-ssrf" format="default" sectionFormat="of" derivedContent="Section 11.34"/>.</t>
          <t indent="0" pn="section-4.2.2-6">When receiving the request, the client instance <bcp14>MUST</bcp14> parse the JSON object
and validate the hash value as described in
<xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/>. If either fails, the client instance <bcp14>MUST</bcp14> return an <tt>unknown_interaction</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>). If the hash validates, the client instance sends
a continuation request to the AS as described in <xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"/>, using the interaction
reference value received here.</t>
        </section>
        <section anchor="interaction-hash" numbered="true" removeInRFC="false" toc="include" pn="section-4.2.3">
          <name slugifiedName="name-calculating-the-interaction">Calculating the Interaction Hash</name>
          <t indent="0" pn="section-4.2.3-1">The "hash" parameter in the request to the client instance's callback URI ties
the front-channel response to an ongoing request by using values
known only to the parties involved. This security mechanism allows the client instance to protect itself against
several kinds of session fixation and injection attacks as discussed in <xref target="security-interact-hash" format="default" sectionFormat="of" derivedContent="Section 11.25"/>. The AS <bcp14>MUST</bcp14>
always provide this hash, and the client instance <bcp14>MUST</bcp14> validate the hash when received.</t>
          <t indent="0" pn="section-4.2.3-2">To calculate the "hash" value, the party doing the calculation
creates a hash base string by concatenating the following values in the following order
using a single newline (0x0A) character to separate them:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.2.3-3">
            <li pn="section-4.2.3-3.1">
              <t indent="0" pn="section-4.2.3-3.1.1">the "nonce" value sent by the client instance in the interaction <tt>finish</tt> field of the initial request (<xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"> </xref>)</t>
            </li>
            <li pn="section-4.2.3-3.2">
              <t indent="0" pn="section-4.2.3-3.2.1">the AS's nonce value from the interaction finish response (<xref target="response-interact-finish" format="default" sectionFormat="of" derivedContent="Section 3.3.5"> </xref>)</t>
            </li>
            <li pn="section-4.2.3-3.3">
              <t indent="0" pn="section-4.2.3-3.3.1">the "interact_ref" returned from the AS as part of the interaction finish method (<xref target="interaction-finish" format="default" sectionFormat="of" derivedContent="Section 4.2"> </xref>)</t>
            </li>
            <li pn="section-4.2.3-3.4">
              <t indent="0" pn="section-4.2.3-3.4.1">the grant endpoint URI the client instance used to make its initial request (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>)</t>
            </li>
          </ul>
          <t indent="0" pn="section-4.2.3-4">There is no padding or whitespace before or after any of the lines
and no trailing newline character. The following non-normative example shows a constructed
hash base string consisting of these four elements.</t>
          <artwork align="left" pn="section-4.2.3-5">
VJLO6A4CATR0KRO
MBDOFXG4Y5CVJCX821LH
4IFWWIKYB2PQ6U56NL1
https://server.example.com/tx
</artwork>
          <t indent="0" pn="section-4.2.3-6">The party then hashes the bytes of the ASCII encoding of this string with the appropriate algorithm
based on the "hash_method" parameter under the "finish" key of the interaction finish request (<xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"> </xref>). The resulting
byte array from the hash function is then encoded using URL-Safe base64
with no padding <xref target="RFC4648" format="default" sectionFormat="of" derivedContent="RFC4648"/>. The resulting string is the hash value.</t>
          <t indent="0" pn="section-4.2.3-7">If provided, the "hash_method" value <bcp14>MUST</bcp14> be one of the hash name strings defined in the
IANA "Named Information Hash Algorithm Registry" <xref target="HASH-ALG" format="default" sectionFormat="of" derivedContent="HASH-ALG"/>.
If the "hash_method" value is not present in the client instance's
request, the algorithm defaults to "sha-256".</t>
          <t indent="0" pn="section-4.2.3-8">For example, the "sha-256" hash method consists of hashing the input string
with the 256-bit SHA2 algorithm. The following is the encoded "sha-256" hash of the hash base string in the example above.
</t>
          <artwork align="left" pn="section-4.2.3-9">
x-gguKWTj8rQf7d7i3w3UhzvuJ5bpOlKyAlVpLxBffY
</artwork>
          <t indent="0" pn="section-4.2.3-10">As another example, the "sha3-512" hash method consists of hashing the input string
with the 512-bit SHA3 algorithm. The following is the encoded "sha3-512" hash of the hash base string in the example above.
          </t>
          <artwork align="left" pn="section-4.2.3-11">
NOTE: '\' line wrapping per RFC 8792

pyUkVJSmpqSJMaDYsk5G8WCvgY91l-agUPe1wgn-cc5rUtN69gPI2-S_s-Eswed8iB4\
  PJ_a5Hg6DNi7qGgKwSQ
</artwork>
        </section>
      </section>
    </section>
    <section anchor="continue-request" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-continuing-a-grant-request">Continuing a Grant Request</name>
      <t indent="0" pn="section-5-1">While it is possible for the AS to return an approved grant response (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) with all the
client instance's requested information (including access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) and
subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/>)) immediately, it's more common that the AS will
place the grant request into the <em>pending</em> state and require communication with
the client instance several times over the lifetime of a grant request.
This is often part of facilitating interaction (<xref target="authorization" format="default" sectionFormat="of" derivedContent="Section 4"> </xref>), but it could
also be used to allow the AS and client instance to continue negotiating the parameters of
the original grant request (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>) through modification of the request.</t>
      <t indent="0" pn="section-5-2">The ability to continue an already-started request allows the client instance to perform several
important functions, including presenting additional information from interaction,
modifying the initial request, and revoking a grant request in progress.</t>
      <t indent="0" pn="section-5-3">To enable this ongoing negotiation, the AS provides a continuation API to the client software.
The AS returns a <tt>continue</tt> field
in the response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) that contains information the client instance needs to
access this API, including a URI to access
as well as a special access token to use during the requests, called the "continuation access token".</t>
      <t indent="0" pn="section-5-4">All requests to the continuation API are protected by a bound continuation access token.
The continuation access token is bound to the same key and method the client instance used to make
the initial request (or its most recent rotation). As a consequence,
when the client instance makes any calls to the continuation URI, the client instance <bcp14>MUST</bcp14> present
the continuation access token as described in <xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/> and present
proof of the client instance's key (or its most recent rotation)
by signing the request as described in <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/>.
The AS <bcp14>MUST</bcp14> validate the signature and ensure that it is bound to the appropriate key for
the continuation access token.</t>
      <t indent="0" pn="section-5-5">Access tokens other than the continuation access tokens <bcp14>MUST NOT</bcp14> be usable for continuation
requests. Conversely, continuation access tokens <bcp14>MUST NOT</bcp14> be usable to make authorized requests to
RSs, even if co-located within the AS.</t>
      <t indent="0" pn="section-5-6">In the following non-normative example, the client instance makes a POST request to a unique URI and signs
the request with HTTP message signatures:</t>
      <sourcecode type="http-message" markers="false" pn="section-5-7">
POST /continue/KSKUOMUKM HTTP/1.1
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Host: server.example.com
Content-Length: 0
Signature-Input: sig1=...
Signature: sig1=...
</sourcecode>
      <t indent="0" pn="section-5-8">The AS <bcp14>MUST</bcp14> be able to tell from the client instance's request which specific ongoing request
is being accessed, using a combination of the continuation URI and
the continuation access token.
If the AS cannot determine a single active grant request to map the
continuation request to, the AS <bcp14>MUST</bcp14> return an <tt>invalid_continuation</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
      <t indent="0" pn="section-5-9">In the following non-normative example, the client instance makes a POST request to a stable continuation endpoint
URI with the interaction reference (<xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"> </xref>),
includes the access token, and signs with HTTP message signatures:</t>
      <sourcecode type="http-message" markers="false" pn="section-5-10">
POST /continue HTTP/1.1
Host: server.example.com
Content-Type: application/json
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
  "interact_ref": "4IFWWIKYBC2PQ6U56NL1"
}
</sourcecode>
      <t indent="0" pn="section-5-11">In the following non-normative alternative example, the client instance had been provided a continuation URI unique to this ongoing grant request:</t>
      <sourcecode type="http-message" markers="false" pn="section-5-12">
POST /tx/rxgIIEVMBV-BQUO7kxbsp HTTP/1.1
Host: server.example.com
Content-Type: application/json
Authorization: GNAP eyJhbGciOiJub25lIiwidHlwIjoiYmFkIn0
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
  "interact_ref": "4IFWWIKYBC2PQ6U56NL1"
}
</sourcecode>
      <t indent="0" pn="section-5-13">In both cases, the AS determines which grant is being asked for based on the URI and continuation access token provided.</t>
      <t indent="0" pn="section-5-14">If a <tt>wait</tt> parameter was included in the continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>), the
client instance <bcp14>MUST NOT</bcp14> call the continuation URI prior to waiting the number of
seconds indicated. If no <tt>wait</tt> period is indicated, the client instance
<bcp14>MUST NOT</bcp14> poll immediately and <bcp14>SHOULD</bcp14>
wait at least 5 seconds. If the client instance does not respect the
given wait period, the AS <bcp14>MUST</bcp14> return the <tt>too_fast</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
      <t indent="0" pn="section-5-15">The response from the AS is a JSON object of a grant response and <bcp14>MAY</bcp14> contain any of the
fields described in <xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"/>, as described in more detail in the
subsections below.</t>
      <t indent="0" pn="section-5-16">If the AS determines that the client instance can
make further requests to the continuation API, the AS <bcp14>MUST</bcp14> include a new
continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>).
The new continuation response <bcp14>MUST</bcp14> include a continuation access token as well, and
this token <bcp14>SHOULD</bcp14> be a new access token, invalidating the previous access token.
If the AS does not return a new continuation response, the client instance
<bcp14>MUST NOT</bcp14> make an additional continuation request. If a client instance does so,
the AS <bcp14>MUST</bcp14> return an <tt>invalid_continuation</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
      <t indent="0" pn="section-5-17">For continuation functions that require the client instance to send message content, the content <bcp14>MUST</bcp14> be
a JSON object.</t>
      <t indent="0" pn="section-5-18">For all requests to the grant continuation API, the AS <bcp14>MAY</bcp14> make use of long polling mechanisms such as those discussed in <xref target="RFC6202" format="default" sectionFormat="of" derivedContent="RFC6202"/>. That is to say, instead of
returning the current status immediately, the long polling technique
allows the AS additional time to process and fulfill the request before returning the HTTP response
to the client instance. For example, when the AS receives a continuation request but the
grant request is in the <em>processing</em> state, the AS could wait until the grant request has moved
to the <em>pending</em> or <em>approved</em> state before returning the response message.</t>
      <section anchor="continue-after-interaction" numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-continuing-after-a-complete">Continuing after a Completed Interaction</name>
        <t indent="0" pn="section-5.1-1">When the AS responds to the client instance's <tt>finish</tt> method as in <xref target="interaction-callback" format="default" sectionFormat="of" derivedContent="Section 4.2.1"/>, this
response includes an interaction reference. The client instance <bcp14>MUST</bcp14> include that value as the field
<tt>interact_ref</tt> in a POST request to the continuation URI.</t>
        <sourcecode type="http-message" markers="false" pn="section-5.1-2">
POST /continue HTTP/1.1
Host: server.example.com
Content-Type: application/json
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
  "interact_ref": "4IFWWIKYBC2PQ6U56NL1"
}
</sourcecode>
        <t indent="0" pn="section-5.1-3">Since the interaction reference is a one-time-use value as described in <xref target="interaction-callback" format="default" sectionFormat="of" derivedContent="Section 4.2.1"/>,
if the client instance needs to make additional continuation calls after this request, the client instance
<bcp14>MUST NOT</bcp14> include the interaction reference in subsequent calls. If the AS detects a client instance
submitting an interaction reference when the request is not in the <em>pending</em> state, the AS <bcp14>MUST</bcp14>
return a <tt>too_many_attempts</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>) and <bcp14>SHOULD</bcp14> invalidate
the ongoing request by moving it to the <em>finalized</em> state.</t>
        <t indent="0" pn="section-5.1-4">If the grant request is in the <em>approved</em> state, the grant response (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) <bcp14>MAY</bcp14> contain any
newly created access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) or
newly released subject information (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>). The response <bcp14>MAY</bcp14> contain
a new continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) as described above. The response
<bcp14>SHOULD NOT</bcp14> contain any interaction responses (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>).</t>
        <t indent="0" pn="section-5.1-5">If the grant request is in the <em>pending</em> state, the grant response (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) <bcp14>MUST NOT</bcp14> contain access tokens or subject information and <bcp14>MAY</bcp14> contain a new interaction response (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>) to any interaction methods that have not been exhausted at the AS.</t>
        <t indent="0" pn="section-5.1-6">For example, if the request is successful in causing the AS to issue access tokens and
release opaque subject claims, the response could look like this:</t>
        <sourcecode type="json" markers="false" pn="section-5.1-7">
NOTE: '\' line wrapping per RFC 8792

{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "manage": {
            "uri": "https://server.example.com/token/PRY5NM33O",
            "access_token": {
                "value": "B8CDFONP21-4TB8N6.BW7ONM"
            }
        }
    },
    "subject": {
        "sub_ids": [ {
          "format": "opaque",
          "id": "J2G8G8O4AZ"
        } ]
    }
}
</sourcecode>
        <t indent="0" pn="section-5.1-8">With the above example, the client instance cannot make an additional continuation request because
a <tt>continue</tt> field is not included.</t>
        <t indent="0" pn="section-5.1-9">In the following non-normative example, the RO has denied the client instance's request, and the AS responds with the following response:</t>
        <artwork align="left" pn="section-5.1-10">
{
    "error": "user_denied",
    "continue": {
        "access_token": {
            "value": "33OMUKMKSKU80UPRY5NM"
        },
        "uri": "https://server.example.com/continue",
        "wait": 30
    }
}
</artwork>
        <t indent="0" pn="section-5.1-11">In the preceding example, the AS includes the <tt>continue</tt> field in the response. Therefore, the client instance can continue the grant negotiation process, perhaps modifying the request as discussed in <xref target="continue-modify" format="default" sectionFormat="of" derivedContent="Section 5.3"/>.</t>
      </section>
      <section anchor="continue-poll" numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-continuing-during-pending-i">Continuing during Pending Interaction (Polling)</name>
        <t indent="0" pn="section-5.2-1">When the client instance does not include a <tt>finish</tt> parameter, the client instance will often need to
poll the AS until the RO has authorized the request. To do so, the client instance makes a POST
request to the continuation URI as in <xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"/> but does not
include message content.</t>
        <sourcecode type="http-message" markers="false" pn="section-5.2-2">
POST /continue HTTP/1.1
Host: server.example.com
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
</sourcecode>
        <t indent="0" pn="section-5.2-3">If the grant request is in the <em>approved</em> state, the grant response (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) <bcp14>MAY</bcp14> contain any
newly created access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) or
newly released subject claims (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>). The response <bcp14>MAY</bcp14> contain
a new continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) as described above. If a <tt>continue</tt>
field is included, it <bcp14>SHOULD</bcp14> include a <tt>wait</tt> field to facilitate a reasonable polling rate by
the client instance. The response <bcp14>SHOULD NOT</bcp14> contain interaction responses (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>).</t>
        <t indent="0" pn="section-5.2-4">If the grant request is in the <em>pending</em> state, the grant response (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) <bcp14>MUST NOT</bcp14> contain access tokens or subject information and <bcp14>MAY</bcp14> contain a new interaction response (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>) to any interaction methods that have not been exhausted at the AS.</t>
        <t indent="0" pn="section-5.2-5">For example, if the request has not yet been authorized by the RO, the AS could respond
by telling the client instance to make another continuation request in the future. In the following non-normative example,
a new, unique access token has been issued for the call, which the client instance will use in its
next continuation request.</t>
        <sourcecode type="json" markers="false" pn="section-5.2-6">
{
    "continue": {
        "access_token": {
            "value": "33OMUKMKSKU80UPRY5NM"
        },
        "uri": "https://server.example.com/continue",
        "wait": 30
    }
}
</sourcecode>
        <t indent="0" pn="section-5.2-7">If the request is successful in causing the AS to issue access tokens and
release subject information, the response could look like the following non-normative example:</t>
        <sourcecode type="json" markers="false" pn="section-5.2-8">
NOTE: '\' line wrapping per RFC 8792

{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "manage": {
            "uri": "https://server.example.com/token/PRY5NM33O",
            "access_token": {
                "value": "B8CDFONP21-4TB8N6.BW7ONM"
            }
        }
    },
    "subject": {
        "sub_ids": [ {
          "format": "opaque",
          "id": "J2G8G8O4AZ"
        } ]
    }
}
</sourcecode>
        <t indent="0" pn="section-5.2-9">See <xref target="security-polling" format="default" sectionFormat="of" derivedContent="Section 11.23"/> for considerations on polling for continuation without an interaction
<tt>finish</tt> method.</t>
        <t indent="0" pn="section-5.2-10">In error conditions, the AS responds to the client instance with an error code as discussed in <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>.
For example, if the client instance has polled too many times before the RO has approved the request, the AS would respond with a message like the following:</t>
        <artwork align="left" pn="section-5.2-11">
{
    "error": "too_many_attempts"
}
</artwork>
        <t indent="0" pn="section-5.2-12">Since this response does not include a <tt>continue</tt> field, the client instance cannot continue to
poll the AS for additional updates and the grant request is <em>finalized</em>. If the client instance
still needs access to the resource, it will need to start with a new grant request.</t>
      </section>
      <section anchor="continue-modify" numbered="true" removeInRFC="false" toc="include" pn="section-5.3">
        <name slugifiedName="name-modifying-an-existing-reque">Modifying an Existing Request</name>
        <t indent="0" pn="section-5.3-1">The client instance might need to modify an ongoing request, whether or not tokens have already been
issued or subject information has already been released. In such cases, the client instance makes an HTTP PATCH
request to the continuation URI and includes any fields it needs to modify. Fields
that aren't included in the request are considered unchanged from the original request.</t>
        <t indent="0" pn="section-5.3-2">A grant request associated with a modification request <bcp14>MUST</bcp14> be in the <em>approved</em> or <em>pending</em> state.
When the AS receives a valid modification request, the AS <bcp14>MUST</bcp14> place the grant request into the
<em>processing</em> state and re-evaluate the authorization in the new context created by the update
request, since the extent and context of the request could have changed.</t>
        <t indent="0" pn="section-5.3-3">The client instance <bcp14>MAY</bcp14> include the <tt>access_token</tt> and <tt>subject</tt> fields as described in Sections <xref target="request-token" format="counter" sectionFormat="of" derivedContent="2.1"/>
and <xref target="request-subject" format="counter" sectionFormat="of" derivedContent="2.2"/>. Inclusion of these fields override any values in the initial request,
which <bcp14>MAY</bcp14> trigger additional requirements and policies by the AS. For example, if the client instance is asking for
more access, the AS could require additional interaction with the RO to gather additional consent.
If the client instance is asking for more limited access, the AS could determine that sufficient authorization
has been granted to the client instance and return the more limited access rights immediately.
If the grant request was previously in the <em>approved</em> state, the AS could decide to remember the larger scale of access rights associated
with the grant request, allowing the client instance to make subsequent requests of different
subsets of granted access. The details of this processing are out of scope for this specification,
but a one possible approach is as follows:</t>
        <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-5.3-4"><li pn="section-5.3-4.1" derivedCounter="1.">
            <t indent="0" pn="section-5.3-4.1.1">A client instance requests access to <tt>Foo</tt>, and this is granted by the RO. This results in an access token: <tt>AT1</tt>.</t>
          </li>
          <li pn="section-5.3-4.2" derivedCounter="2.">
            <t indent="0" pn="section-5.3-4.2.1">The client instance later modifies the grant request to include <tt>Foo</tt> and <tt>Bar</tt> together. Since the client instance was previously granted <tt>Foo</tt> under this grant request, the RO is prompted to allow the client instance access to <tt>Foo</tt> and <tt>Bar</tt> together. This results in a new access token: <tt>AT2</tt>. This access token has access to both <tt>Foo</tt> and <tt>Bar</tt>. The rights of the original access token <tt>AT1</tt> are not modified.</t>
          </li>
          <li pn="section-5.3-4.3" derivedCounter="3.">
            <t indent="0" pn="section-5.3-4.3.1">The client instance makes another grant modification to ask only for <tt>Bar</tt>. Since the client instance was previously granted <tt>Foo</tt> and <tt>Bar</tt> together under this grant request, the RO is not prompted, and the access to <tt>Bar</tt> is granted in a new access token: <tt>AT3</tt>. This new access token does not allow access to <tt>Foo</tt>.</t>
          </li>
          <li pn="section-5.3-4.4" derivedCounter="4.">
            <t indent="0" pn="section-5.3-4.4.1">The original access token <tt>AT1</tt> expires, and the client seeks a new access token to replace it. The client instance makes another grant modification to ask only for <tt>Foo</tt>. Since the client instance was previously granted <tt>Foo</tt> and <tt>Bar</tt> together under this grant request, the RO is not prompted, and the access to <tt>Foo</tt> is granted in a new access token: <tt>AT4</tt>. This new access token does not allow access to <tt>Bar</tt>.</t>
          </li>
        </ol>
        <t indent="0" pn="section-5.3-5">All four access tokens are independent of each other and associated with the same underlying grant request. Each of these access tokens could possibly also be rotated using token management, if available. For example, instead of asking for a new token to replace <tt>AT1</tt>, the client instance could ask for a refresh of <tt>AT1</tt> using the rotation method of the token management API. This would result in a refreshed <tt>AT1</tt> with a different token value and expiration from the original <tt>AT1</tt> but with the same access rights of allowing only access to <tt>Foo</tt>.</t>
        <t indent="0" pn="section-5.3-6">The client instance <bcp14>MAY</bcp14> include the <tt>interact</tt> field as described in <xref target="request-interact" format="default" sectionFormat="of" derivedContent="Section 2.5"/>.
Inclusion of this field indicates that the client instance is capable of driving interaction with
the end user, and this field replaces any values from a previous request. The AS <bcp14>MAY</bcp14> respond to any
of the interaction responses as described in <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/>, just like it would to a new
request.</t>
        <t indent="0" pn="section-5.3-7">The client instance <bcp14>MAY</bcp14> include the <tt>user</tt> field as described in <xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"/> to present new assertions
or information about the end user. The AS <bcp14>SHOULD</bcp14> check that this presented user information is
consistent with any user information previously presented by the client instance or otherwise
associated with this grant request.</t>
        <t indent="0" pn="section-5.3-8">The client instance <bcp14>MUST NOT</bcp14> include the <tt>client</tt> field of the request, since the client
instance is assumed not to have changed. Modification of client instance information, including
rotation of keys associated with the client instance, is outside the
scope of this specification.</t>
        <t indent="0" pn="section-5.3-9">The client instance <bcp14>MUST NOT</bcp14> include post-interaction responses such as those described in <xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"/>.</t>
        <t indent="0" pn="section-5.3-10">Modification requests <bcp14>MUST NOT</bcp14> alter previously issued access tokens. Instead, any access
tokens issued from a continuation are considered new, separate access tokens. The AS
<bcp14>MAY</bcp14> revoke previously issued access tokens after a modification has occurred.</t>
        <t indent="0" pn="section-5.3-11">If the modified request can be granted immediately by the AS (the grant request is in the <em>approved</em> state),
the grant response (<xref target="response" format="default" sectionFormat="of" derivedContent="Section 3"> </xref>) <bcp14>MAY</bcp14> contain any newly created access tokens (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>) or
newly released subject claims (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>). The response <bcp14>MAY</bcp14> contain
a new continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) as described above. If interaction
can occur, the response <bcp14>SHOULD</bcp14> contain interaction responses (<xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"> </xref>) as well.</t>
        <t indent="0" pn="section-5.3-12">For example, a client instance initially requests a set of resources using references:</t>
        <sourcecode type="http-message" markers="false" pn="section-5.3-13">
POST /tx HTTP/1.1
Host: server.example.com
Content-Type: application/json
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            "read", "write"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.example.net/return/123455",
            "nonce": "LKLTI25DK82FX4T4QFZC"
        }
    },
    "client": "987YHGRT56789IOLK"
}
</sourcecode>
        <t indent="0" pn="section-5.3-14">Access is granted by the RO, and a token is issued by the AS.
In its final response, the AS includes a <tt>continue</tt> field, which includes
a separate access token for accessing the continuation API:</t>
        <sourcecode type="json" markers="false" pn="section-5.3-15">
{
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU"
        },
        "uri": "https://server.example.com/continue",
        "wait": 30
    },
    "access_token": {
        "value": "RP1LT0-OS9M2P_R64TB",
        "access": [
            "read", "write"
        ]
    }
}
</sourcecode>
        <t indent="0" pn="section-5.3-16">This <tt>continue</tt> field allows the client instance to make an eventual continuation call.
Some time later, the client instance realizes that it no longer needs
"write" access and therefore modifies its ongoing request, here asking for just "read" access
instead of both "read" and "write" as before.</t>
        <sourcecode type="json" markers="false" pn="section-5.3-17">
PATCH /continue HTTP/1.1
Host: server.example.com
Content-Type: application/json
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            "read"
        ]
    }
    ...
}
</sourcecode>
        <t indent="0" pn="section-5.3-18">The AS replaces the previous <tt>access</tt> from the first request, allowing the AS to
determine if any previously granted consent already applies. In this case, the AS would
determine that reducing the breadth of the requested access means that new access
tokens can be issued to the client instance without additional interaction or consent. The AS would likely revoke previously issued access tokens
that had the greater access rights associated with them, unless they had been issued
with the <tt>durable</tt> flag.</t>
        <sourcecode type="json" markers="false" pn="section-5.3-19">
{
    "continue": {
        "access_token": {
            "value": "M33OMUK80UPRY5NMKSKU"
        },
        "uri": "https://server.example.com/continue",
        "wait": 30
    },
    "access_token": {
        "value": "0EVKC7-2ZKwZM_6N760",
        "access": [
            "read"
        ]
    }
}
</sourcecode>
        <t indent="0" pn="section-5.3-20">As another example, the client instance initially requests read-only access but later
needs to step up its access. The initial request could look like the following HTTP message:</t>
        <sourcecode type="http-message" markers="false" pn="section-5.3-21">
POST /tx HTTP/1.1
Host: server.example.com
Content-Type: application/json
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            "read"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.example.net/return/123455",
            "nonce": "LKLTI25DK82FX4T4QFZC"
        }
    },
    "client": "987YHGRT56789IOLK"
}
</sourcecode>
        <t indent="0" pn="section-5.3-22">Access is granted by the RO, and a token is issued by the AS.
In its final response, the AS includes a <tt>continue</tt> field:</t>
        <sourcecode type="http-message" markers="false" pn="section-5.3-23">
{
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU"
        },
        "uri": "https://server.example.com/continue",
        "wait": 30
    },
    "access_token": {
        "value": "RP1LT0-OS9M2P_R64TB",
        "access": [
            "read"
        ]
    }
}
</sourcecode>
        <t indent="0" pn="section-5.3-24">This allows the client instance to make an eventual continuation call. The client instance later realizes that it now
needs "write" access in addition to the "read" access. Since this is an expansion of what
it asked for previously, the client instance also includes a new interaction field in case the AS needs
to interact with the RO again to gather additional authorization. Note that the client instance's
nonce and callback are different from the initial request. Since the original callback was
already used in the initial exchange and the callback is intended for one-time use, a new one
needs to be included in order to use the callback again.</t>
        <sourcecode type="http-message" markers="false" pn="section-5.3-25">
PATCH /continue HTTP/1.1
Host: server.example.com
Content-Type: application/json
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            "read", "write"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.example.net/return/654321",
            "nonce": "K82FX4T4LKLTI25DQFZC"
        }
    }
}
</sourcecode>
        <t indent="0" pn="section-5.3-26">From here, the AS can determine that the client instance is asking for more than it was previously granted,
but since the client instance has also provided a mechanism to interact with the RO, the AS can use that
to gather the additional consent. The protocol continues as it would with a new request.
Since the old access tokens are good for a subset of the rights requested here, the
AS might decide to not revoke them. However, any access tokens granted after this update
process are new access tokens and do not modify the rights of existing access tokens.</t>
      </section>
      <section anchor="continue-delete" numbered="true" removeInRFC="false" toc="include" pn="section-5.4">
        <name slugifiedName="name-revoking-a-grant-request">Revoking a Grant Request</name>
        <t indent="0" pn="section-5.4-1">If the client instance wishes to cancel an ongoing grant request and place it into the <em>finalized</em>
state, the client instance makes an
HTTP DELETE request to the continuation URI.</t>
        <sourcecode type="http-message" markers="false" pn="section-5.4-2">
DELETE /continue HTTP/1.1
Host: server.example.com
Content-Type: application/json
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
</sourcecode>
        <t indent="0" pn="section-5.4-3">If the request is successfully revoked, the AS responds with HTTP status code 204 (No Content).
The AS <bcp14>SHOULD</bcp14> revoke all associated access tokens, if possible. The AS <bcp14>SHOULD</bcp14> disable all
token rotation and other token management functions on such access tokens, if possible.
Once the grant request is in the <em>finalized</em> state, it <bcp14>MUST NOT</bcp14> be moved to any other state.</t>
        <t indent="0" pn="section-5.4-4">If the request is not revoked, the AS responds with an <tt>invalid_continuation</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
      </section>
    </section>
    <section anchor="token-management" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-token-management">Token Management</name>
      <t indent="0" pn="section-6-1">If an access token response includes the <tt>manage</tt> field as
described in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>, the client instance <bcp14>MAY</bcp14> call
this URI to manage the access token with the rotate and revoke actions defined in
the following subsections. Other actions are undefined by this
specification.</t>
      <sourcecode type="json" markers="false" pn="section-6-2">
{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "flags": ["bearer"],
        "manage": {
            "uri": "https://server.example.com/token/PRY5NM33O",
            "access_token": {
                "value": "B8CDFONP21-4TB8N6.BW7ONM"
            }
        }
    }
}
</sourcecode>
      <t indent="0" pn="section-6-3">The token management access token issued under the <tt>manage</tt> field is used to protect
all calls to the token management API.
The client instance <bcp14>MUST</bcp14> present proof of the key associated with the token
along with the value of the token management access token.</t>
      <t indent="0" pn="section-6-4">The AS <bcp14>MUST</bcp14> validate the proof and ensure that it is associated with the
token management access token.</t>
      <t indent="0" pn="section-6-5">The AS <bcp14>MUST</bcp14> uniquely identify the token being managed from the token management URI,
the token management access token, or a combination of both.</t>
      <section anchor="rotate-access-token" numbered="true" removeInRFC="false" toc="include" pn="section-6.1">
        <name slugifiedName="name-rotating-the-access-token-v">Rotating the Access Token Value</name>
        <t indent="0" pn="section-6.1-1">If the client instance has an access token and that access token expires, the
client instance might want to rotate the access token to a new value without expiration.
Rotating an access token consists of issuing a new access token in place of an
existing access token, with the same rights and properties as the original token,
apart from an updated token value and expiration time.</t>
        <t indent="0" pn="section-6.1-2">To rotate an access token, the client instance makes an HTTP POST to the token management URI
with no message content,
sending the access token in the authorization header as described in <xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/> and signing the request
with the appropriate key.</t>
        <sourcecode type="http-message" markers="false" pn="section-6.1-3">
POST /token/PRY5NM33O HTTP/1.1
Host: server.example.com
Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...
</sourcecode>
        <t indent="0" pn="section-6.1-4">The client instance cannot request to alter the access rights
associated with the access token during a rotation request. To get an access token with different
access rights for this grant request, the client instance has to call the continuation API's update functionality (<xref target="continue-modify" format="default" sectionFormat="of" derivedContent="Section 5.3"> </xref>)
to get a new access token. The client instance can also create a new grant request
with the required access rights.</t>
        <t indent="0" pn="section-6.1-5">The AS validates that the token management access token presented is associated with the management
URI, that the AS issued the token to the given client instance, and that
the presented key is the correct key for the token management access token. The AS determines
which access token is being rotated from the token management URI, the token management access token, or both.</t>
        <t indent="0" pn="section-6.1-6">If the token is validated and the key is appropriate for the
request, the AS <bcp14>MUST</bcp14> invalidate the current access token value associated
with this URI, if possible. Note that stateless access tokens can make proactive
revocation difficult within a system; see <xref target="security-stateless-tokens" format="default" sectionFormat="of" derivedContent="Section 11.32"/>.</t>
        <t indent="0" pn="section-6.1-7">For successful rotations, the AS responds with an HTTP status code 200 (OK) with JSON-formatted message content consisting of the rotated access token
in the <tt>access_token</tt> field described in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>. The value of the
access token <bcp14>MUST NOT</bcp14> be the same as the current value of the access
token used to access the management API. The response <bcp14>MUST</bcp14> include an
access token management URI, and the value of this URI <bcp14>MAY</bcp14> be different
from the URI used by the client instance to make the rotation call. The client instance
<bcp14>MUST</bcp14> use this new URI to manage the rotated access token.</t>
        <t indent="0" pn="section-6.1-8">The access rights in the <tt>access</tt> array for the rotated access token <bcp14>MUST</bcp14>
be included in the response and <bcp14>MUST</bcp14> be the same
as the token before rotation.</t>
        <sourcecode type="json" markers="false" pn="section-6.1-9">
NOTE: '\' line wrapping per RFC 8792

{
    "access_token": {
        "value": "FP6A8H6HY37MH13CK76LBZ6Y1UADG6VEUPEER5H2",
        "manage": {
            "uri": "https://server.example.com/token/PRY5NM33O",
            "access_token": {
                "value": "B8CDFONP21-4TB8N6.BW7ONM"
            }
        },
        "expires_in": 3600,
        "access": [
            {
                "type": "photo-api",
                "actions": [
                    "read",
                    "write",
                    "dolphin"
                ],
                "locations": [
                    "https://server.example.net/",
                    "https://resource.local/other"
                ],
                "datatypes": [
                    "metadata",
                    "images"
                ]
            },
            "read", "dolphin-metadata"
        ]
    }
}
</sourcecode>
        <t indent="0" pn="section-6.1-10">If the AS is unable or unwilling to rotate the value of the access token, the AS responds with an <tt>invalid_rotation</tt> error (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>). Upon receiving such an error, the client instance <bcp14>MUST</bcp14> consider the access token to not have changed its state.</t>
        <section anchor="rotate-access-token-key" numbered="true" removeInRFC="false" toc="include" pn="section-6.1.1">
          <name slugifiedName="name-binding-a-new-key-to-the-ro">Binding a New Key to the Rotated Access Token</name>
          <t indent="0" pn="section-6.1.1-1">If the client instance wishes to bind a new presentation key to an access token, the client
instance <bcp14>MUST</bcp14> present both the new key and the proof of previous key material in the access token rotation request.
The client instance makes an HTTP POST as a JSON object with the following field:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-6.1.1-2">
            <dt pn="section-6.1.1-2.1"><tt>key</tt>:</dt>
            <dd pn="section-6.1.1-2.2">
              <t indent="0" pn="section-6.1.1-2.2.1">The new key value or reference in the format described in <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/>. Note that keys
  passed by value are always public keys. <bcp14>REQUIRED</bcp14> when doing key rotation.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-6.1.1-3">The proofing method and parameters for the new key <bcp14>MUST</bcp14> be the same as those established for the
previous key.</t>
          <t indent="0" pn="section-6.1.1-4">The client instance <bcp14>MUST</bcp14> prove possession of both the currently bound key and the newly requested
key simultaneously in the rotation request. Specifically, the signature from the previous key <bcp14>MUST</bcp14>
cover the value or reference of the new key, and the signature of the new key <bcp14>MUST</bcp14> cover the
signature value of the old key. The
means of doing so vary depending on the proofing method in use. For example, the HTTP message
signatures proofing method uses multiple signatures in the request as described in
<xref target="httpsig-rotate" format="default" sectionFormat="of" derivedContent="Section 7.3.1.1"/>. This is shown in the following example.</t>
          <sourcecode type="http-message" markers="false" pn="section-6.1.1-5">
POST /token/PRY5NM33O HTTP/1.1
Host: server.example.com
Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM
Signature-Input: \
  sig1=("@method" "@target-uri" "content-digest" \
        "authorization"),\
  sig2=("@method" "@target-uri" "content-digest" \
        "authorization" "signature";key="sig1" \
        "signature-input";key="sig1")
Signature: sig1=..., sig2=...
Content-Digest: sha-256=...

{
    "key": {
        "proof": "httpsig",
        "jwk": {
            "kty": "RSA",
            "e": "AQAB",
            "kid": "xyz-2",
            "alg": "RS256",
            "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..."
        }
    }
}
</sourcecode>
          <t indent="0" pn="section-6.1.1-6">Failure to present the appropriate proof of either the new key or the previous key for the access token, as defined by the proofing method, <bcp14>MUST</bcp14> result in an <tt>invalid_rotation</tt> error code from the AS (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
          <t indent="0" pn="section-6.1.1-7">An attempt to change the proofing method or parameters, including an attempt to rotate the key of a bearer token (which has no key), <bcp14>MUST</bcp14> result in an <tt>invalid_rotation</tt> error code returned from the AS (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
          <t indent="0" pn="section-6.1.1-8">If the AS does not allow rotation of the access token's key for any reason, including but not limited to lack of permission for this client instance or lack of capability by the AS, the AS <bcp14>MUST</bcp14> return a <tt>key_rotation_not_supported</tt> error code (<xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/>).</t>
        </section>
      </section>
      <section anchor="revoke-access-token" numbered="true" removeInRFC="false" toc="include" pn="section-6.2">
        <name slugifiedName="name-revoking-the-access-token">Revoking the Access Token</name>
        <t indent="0" pn="section-6.2-1">If the client instance wishes to revoke the access token proactively, such as when
a user indicates to the client instance that they no longer wish for it to have
access or the client instance application detects that it is being uninstalled,
the client instance can use the token management URI to indicate to the AS that
the AS <bcp14>SHOULD</bcp14> invalidate the access token for all purposes.</t>
        <t indent="0" pn="section-6.2-2">The client instance makes an HTTP DELETE request to the token management
URI, presenting the access token and signing the request with
the appropriate key.</t>
        <sourcecode type="http-message" markers="false" pn="section-6.2-3">
DELETE /token/PRY5NM33O HTTP/1.1
Host: server.example.com
Authorization: GNAP B8CDFONP21-4TB8N6.BW7ONM
Signature-Input: sig1=...
Signature: sig1=...
</sourcecode>
        <t indent="0" pn="section-6.2-4">If the key presented is associated with the token (or the client instance, in
the case of a bearer token), the AS <bcp14>MUST</bcp14> invalidate the access token, if
possible, and return an HTTP response code 204.</t>
        <sourcecode type="http-message" markers="false" pn="section-6.2-5">
204 No Content
</sourcecode>
        <t indent="0" pn="section-6.2-6">Though the AS <bcp14>MAY</bcp14> revoke an access token at any time for
any reason, the token management function is specifically for the client instance's use.
If the access token has already expired or has been revoked through other
means, the AS <bcp14>SHOULD</bcp14> honor the revocation request to
the token management URI as valid, since the end result is
   that the token is still not usable.
</t>
      </section>
    </section>
    <section anchor="secure-requests" numbered="true" removeInRFC="false" toc="include" pn="section-7">
      <name slugifiedName="name-securing-requests-from-the-">Securing Requests from the Client Instance</name>
      <t indent="0" pn="section-7-1">In GNAP, the client instance secures its requests to an AS and RS by presenting an access
token, proof of a key that it possesses (aka, a "key proof"), or both an access token and
key proof together.</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7-2">
        <li pn="section-7-2.1">
          <t indent="0" pn="section-7-2.1.1">When an access token is used with a key proof, this is a bound token request. This type of
  request is used for calls to the RS as well as the AS during grant negotiation.</t>
        </li>
        <li pn="section-7-2.2">
          <t indent="0" pn="section-7-2.2.1">When a key proof is used with no access token, this is a non-authorized signed request. This
  type of request is used for calls to the AS to initiate a grant negotiation.</t>
        </li>
        <li pn="section-7-2.3">
          <t indent="0" pn="section-7-2.3.1">When an access token is used with no key proof, this is a bearer token request. This type of
  request is used only for calls to the RS and only with access tokens that are
  not bound to any key as described in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>.</t>
        </li>
        <li pn="section-7-2.4">
          <t indent="0" pn="section-7-2.4.1">When neither an access token nor key proof are used, this is an unsecured request. This type
  of request is used optionally for calls to the RS as part of an RS-first discovery
  process as described in <xref target="rs-request-without-token" format="default" sectionFormat="of" derivedContent="Section 9.1"/>.</t>
        </li>
      </ul>
      <section anchor="key-format" numbered="true" removeInRFC="false" toc="include" pn="section-7.1">
        <name slugifiedName="name-key-formats">Key Formats</name>
        <t indent="0" pn="section-7.1-1">Several different places in GNAP require the presentation of key material
by value or by reference. Key material sent by value is sent using a JSON object with several fields described in this section.</t>
        <t indent="0" pn="section-7.1-2">All keys are associated with a specific key proofing method.
The proofing method associated with the key
is indicated using the <tt>proof</tt> field of the key object.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-7.1-3">
          <dt pn="section-7.1-3.1"><tt>proof</tt> (string or object):</dt>
          <dd pn="section-7.1-3.2">
            <t indent="0" pn="section-7.1-3.2.1">The form of proof that the client instance will use when
  presenting the key. The valid values of this field and
  the processing requirements for each are detailed in
  <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/>. <bcp14>REQUIRED</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-7.1-4">A key presented by value <bcp14>MUST</bcp14> be a public key and <bcp14>MUST</bcp14> be presented in only one
supported format, as discussed in <xref target="security-multiple-key-formats" format="default" sectionFormat="of" derivedContent="Section 11.35"/>. Note that
while most formats present the full value of the public key, some
formats present a value cryptographically derived from the public key. See
additional discussion of the presentation of public keys in <xref target="security-symmetric" format="default" sectionFormat="of" derivedContent="Section 11.7"/>.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-7.1-5">
          <dt pn="section-7.1-5.1"><tt>jwk</tt> (object):</dt>
          <dd pn="section-7.1-5.2">
            <t indent="0" pn="section-7.1-5.2.1">The public key and its properties represented as a JSON Web Key (JWK) <xref target="RFC7517" format="default" sectionFormat="of" derivedContent="RFC7517"/>.
  A JWK <bcp14>MUST</bcp14> contain the <tt>alg</tt> (Algorithm) and <tt>kid</tt> (Key ID) parameters. The <tt>alg</tt>
  parameter <bcp14>MUST NOT</bcp14> be "none". The <tt>x5c</tt> (X.509 Certificate Chain) parameter <bcp14>MAY</bcp14>
  be used to provide the X.509 representation of the provided public key.
  <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
          <dt pn="section-7.1-5.3"><tt>cert</tt> (string):</dt>
          <dd pn="section-7.1-5.4">
            <t indent="0" pn="section-7.1-5.4.1">The Privacy-Enhanced Mail (PEM) serialized value of the certificate used to
  sign the request, with optional internal whitespace per <xref target="RFC7468" format="default" sectionFormat="of" derivedContent="RFC7468"/>. The
  PEM header and footer are optionally removed.
  <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
          <dt pn="section-7.1-5.5"><tt>cert#S256</tt> (string):</dt>
          <dd pn="section-7.1-5.6">
            <t indent="0" pn="section-7.1-5.6.1">The certificate thumbprint calculated as
  per MTLS for OAuth <xref target="RFC8705" format="default" sectionFormat="of" derivedContent="RFC8705"> </xref> in base64url
  encoding. Note that this format does not include
  the full public key.
  <bcp14>OPTIONAL</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-7.1-6">Additional key formats can be defined in the "GNAP Key Formats" registry (<xref target="IANA-key-formats" format="default" sectionFormat="of" derivedContent="Section 10.17"> </xref>).</t>
        <t indent="0" pn="section-7.1-7">The following non-normative example shows a single key presented in two different formats. The example key is intended to be used with the HTTP message signatures proofing mechanism (<xref target="httpsig-binding" format="default" sectionFormat="of" derivedContent="Section 7.3.1"> </xref>), as indicated by the <tt>httpsig</tt> value of the <tt>proof</tt> field.</t>
        <t indent="0" pn="section-7.1-8">As a JWK:</t>
        <sourcecode type="json" markers="false" pn="section-7.1-9">
"key": {
    "proof": "httpsig",
    "jwk": {
        "kty": "RSA",
        "e": "AQAB",
        "kid": "xyz-1",
        "alg": "RS256",
        "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..."
    }
}
</sourcecode>
        <t indent="0" pn="section-7.1-10">As a certificate in PEM format:</t>
        <sourcecode type="json" markers="false" pn="section-7.1-11">
"key": {
    "proof": "httpsig",
    "cert": "MIIEHDCCAwSgAwIBAgIBATANBgkqhkiG9w0BAQsFA..."
}
</sourcecode>
        <t indent="0" pn="section-7.1-12">When the key is presented in GNAP, proof of this key material <bcp14>MUST</bcp14> be used to bind the request, the nature of which varies with
the location in the protocol where the key is used. For a key used as part of a client instance's initial request
in <xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"/>, the key value represents the client instance's public key, and
proof of that key <bcp14>MUST</bcp14> be presented in that request. For a key used as part of an
access token response in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>, the proof of that key <bcp14>MUST</bcp14>
be used when the client instance later presents the access token to the RS.</t>
        <section anchor="key-reference" numbered="true" removeInRFC="false" toc="include" pn="section-7.1.1">
          <name slugifiedName="name-key-references">Key References</name>
          <t indent="0" pn="section-7.1.1-1">Keys in GNAP can also be passed by reference such that the party receiving
the reference will be able to determine the appropriate keying material for
use in that part of the protocol. A key reference is a single opaque string.</t>
          <sourcecode type="json" markers="false" pn="section-7.1.1-2">
    "key": "S-P4XJQ_RYJCRTSU1.63N3E"
</sourcecode>
          <t indent="0" pn="section-7.1.1-3">Keys referenced in this manner <bcp14>MAY</bcp14> be shared symmetric keys. See the additional considerations for symmetric keys in <xref target="security-symmetric" format="default" sectionFormat="of" derivedContent="Section 11.7"/>.
The key reference <bcp14>MUST NOT</bcp14> contain any unencrypted private or shared symmetric key information.</t>
          <t indent="0" pn="section-7.1.1-4">Keys referenced in this manner <bcp14>MUST</bcp14> be bound to a single proofing mechanism.</t>
          <t indent="0" pn="section-7.1.1-5">The means of dereferencing this reference to a key value and proofing mechanism are out of scope for this specification.
Commonly, key references are created by the AS and do not necessarily need
to be understood by the client. These types of key references are an
internal reference to the AS, such as an identifier of a record in a database.
In other applications, it can be useful to use key references that are resolvable
by both clients and the AS, which could be accomplished by a client publishing
a public key at a URI, for example. For interoperability, this method could later be described
as an extension, but doing so is out of scope for this specification.</t>
        </section>
        <section anchor="key-protection" numbered="true" removeInRFC="false" toc="include" pn="section-7.1.2">
          <name slugifiedName="name-key-protection">Key Protection</name>
          <t indent="0" pn="section-7.1.2-1">The security of GNAP relies on the cryptographic security of the keys themselves.
When symmetric keys are used in GNAP, a key management system or secure key derivation mechanism <bcp14>MUST</bcp14> be used to supply the keys. Symmetric keys <bcp14>MUST NOT</bcp14> be a human-memorable password or a value derived from one. Symmetric keys <bcp14>MUST NOT</bcp14> be passed by value from the client instance to the AS.</t>
          <t indent="0" pn="section-7.1.2-2">Additional security considerations apply when rotating keys (see <xref target="security-key-rotation" format="default" sectionFormat="of" derivedContent="Section 11.22"> </xref>).</t>
        </section>
      </section>
      <section anchor="use-access-token" numbered="true" removeInRFC="false" toc="include" pn="section-7.2">
        <name slugifiedName="name-presenting-access-tokens">Presenting Access Tokens</name>
        <t indent="0" pn="section-7.2-1">Access tokens are issued to client instances in GNAP to allow the client instance to make
an authorized call to an API.
The method the client instance uses to send an access token depends on whether
the token is bound to a key and, if so, which proofing method is associated
with the key. This information is conveyed by the
<tt>key</tt> parameter and the <tt>bearer</tt> flag in the access token response structure (<xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"> </xref>).</t>
        <t indent="0" pn="section-7.2-2">If the <tt>flags</tt> field does not contain the <tt>bearer</tt> flag and the <tt>key</tt> is absent, the access token
<bcp14>MUST</bcp14> be sent using the same key and proofing mechanism that the client instance used
in its initial request (or its most recent rotation).</t>
        <t indent="0" pn="section-7.2-3">If the <tt>flags</tt> field does not contain the <tt>bearer</tt> flag and the <tt>key</tt> value is an object as
described in <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/>, the access token <bcp14>MUST</bcp14> be sent using the key and proofing
mechanism defined by the value of the <tt>proof</tt> field within the key object.</t>
        <t indent="0" pn="section-7.2-4">The access token <bcp14>MUST</bcp14> be sent using the HTTP Authorization request header field and
the "GNAP" authorization scheme along with a key proof as described in <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/>
for the key bound to the access token. For example, an access token bound using HTTP message signatures would be sent as follows:</t>
        <sourcecode type="http-message" markers="false" pn="section-7.2-5">
NOTE: '\' line wrapping per RFC 8792

GET /stuff HTTP/1.1
Host: resource.example.com
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=("@method" "@target-uri" "authorization")\
  ;created=1618884473;keyid="gnap-rsa";nonce="NAOEJF12ER2";tag="gnap"
Signature: sig1=:FQ+EjWqc38uLFByKa5y+c4WyYYwCTGUhidWKfr5L1Cha8FiPEw\
  DxG7nWttpBLS/B6VLfkZJogPbclySs9MDIsAIJwHnzlcJjwXWR2lfvm2z3X7EkJHm\
  Zp4SmyKOS34luAiKR1xwf32NYFolHmZf/SbHZJuWvQuS4U33C+BbsXz8MflFH1Dht\
  H/C1E5i244gSbdLCPxzABc/Q0NHVSLo1qaouYIvnxXB8OT3K7mwWjsLh1GC5vFThb\
  3XQ363r6f0OPRa4qWHhubR/d/J/lNOjbBdjq9AJ69oqNJ+A2XT+ZCrVasEJE0OBvD\
  auQoiywhb8BMB7+PEINsPk5/8UvaNxbw==:
</sourcecode>
        <t indent="0" pn="section-7.2-6">If the <tt>flags</tt> field contains the <tt>bearer</tt> flag, the access token is a bearer token
that <bcp14>MUST</bcp14> be sent using the Authorization request header field method defined in <xref target="RFC6750" format="default" sectionFormat="of" derivedContent="RFC6750"/>.</t>
        <sourcecode type="http-message" markers="false" pn="section-7.2-7">
Authorization: Bearer OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0
</sourcecode>
        <t indent="0" pn="section-7.2-8">The <tt>Form-Encoded Body Parameter</tt> and <tt>URI Query Parameter</tt> methods of <xref target="RFC6750" format="default" sectionFormat="of" derivedContent="RFC6750"/> <bcp14>MUST NOT</bcp14>
be used for GNAP access tokens.</t>
      </section>
      <section anchor="binding-keys" numbered="true" removeInRFC="false" toc="include" pn="section-7.3">
        <name slugifiedName="name-proving-possession-of-a-key">Proving Possession of a Key with a Request</name>
        <t indent="0" pn="section-7.3-1">Any keys presented by the client instance to the AS or RS <bcp14>MUST</bcp14> be validated as
part of the request in which they are presented. The type of binding
used is indicated by the <tt>proof</tt> parameter of the key object in <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/>.
Key proofing methods are specified either by a string, which consists of the key proofing
method name on its own, or by a JSON object with the required field <tt>method</tt>:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-7.3-2">
          <dt pn="section-7.3-2.1"><tt>method</tt>:</dt>
          <dd pn="section-7.3-2.2">
            <t indent="0" pn="section-7.3-2.2.1">The name of the key proofing method to be used.
  <bcp14>REQUIRED</bcp14>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-7.3-3">Individual methods defined as objects <bcp14>MAY</bcp14> define additional parameters as members in this object.</t>
        <t indent="0" pn="section-7.3-4">Values for the <tt>method</tt> defined by this specification are as follows:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-7.3-5">
          <dt pn="section-7.3-5.1"><tt>"httpsig"</tt> (string or object):</dt>
          <dd pn="section-7.3-5.2">
            <t indent="0" pn="section-7.3-5.2.1">HTTP message signing. See <xref target="httpsig-binding" format="default" sectionFormat="of" derivedContent="Section 7.3.1"/>.</t>
          </dd>
          <dt pn="section-7.3-5.3"><tt>"mtls"</tt> (string):</dt>
          <dd pn="section-7.3-5.4">
            <t indent="0" pn="section-7.3-5.4.1">MTLS certificate verification. See <xref target="mtls" format="default" sectionFormat="of" derivedContent="Section 7.3.2"/>.</t>
          </dd>
          <dt pn="section-7.3-5.5"><tt>"jwsd"</tt> (string):</dt>
          <dd pn="section-7.3-5.6">
            <t indent="0" pn="section-7.3-5.6.1">A detached JWS signature header. See <xref target="detached-jws" format="default" sectionFormat="of" derivedContent="Section 7.3.3"/>.</t>
          </dd>
          <dt pn="section-7.3-5.7"><tt>"jws"</tt> (string):</dt>
          <dd pn="section-7.3-5.8">
            <t indent="0" pn="section-7.3-5.8.1">Attached JWS Payload. See <xref target="attached-jws" format="default" sectionFormat="of" derivedContent="Section 7.3.4"/>.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-7.3-6">Additional proofing methods can be defined in the "GNAP Key Proofing Methods" registry (<xref target="IANA-key-proof-methods" format="default" sectionFormat="of" derivedContent="Section 10.16"> </xref>).</t>
        <t indent="0" pn="section-7.3-7">Proofing methods <bcp14>MAY</bcp14> be defined as both an object and a string. For example, the <tt>httpsig</tt> method can be specified as an
object with its parameters explicitly declared, such as:</t>
        <sourcecode type="json" markers="false" pn="section-7.3-8">
{
    "proof": {
        "method": "httpsig",
        "alg": "ecdsa-p384-sha384",
        "content-digest-alg": "sha-256"
    }
}
</sourcecode>
        <t indent="0" pn="section-7.3-9">The <tt>httpsig</tt> method also defines default behavior when it is passed as a string form,
using the signature algorithm specified by the associated key
material and the content digest is calculated using sha-256. This configuration can be selected
using the following shortened form:</t>
        <sourcecode type="json" markers="false" pn="section-7.3-10">
{
    "proof": "httpsig"
}
</sourcecode>
        <t indent="0" pn="section-7.3-11">All key binding methods used by this specification <bcp14>MUST</bcp14> cover all relevant portions
of the request, including anything that would change the nature of the request, to allow
for secure validation of the request. Relevant aspects include
the URI being called, the HTTP method being used, any relevant HTTP headers and
values, and the HTTP message content itself. The verifier of the signed message
<bcp14>MUST</bcp14> validate all components of the signed message to ensure that nothing
has been tampered with or substituted in a way that would change the nature of
the request. Definitions of key binding methods <bcp14>MUST</bcp14> enumerate how these
requirements are fulfilled.</t>
        <t indent="0" pn="section-7.3-12">When a key proofing mechanism is bound to an access token, the key being presented <bcp14>MUST</bcp14>
be the key associated with the access token, and the access token <bcp14>MUST</bcp14> be covered
by the signature method of the proofing mechanism.</t>
        <t indent="0" pn="section-7.3-13">The key binding methods in this section <bcp14>MAY</bcp14> be used by other
components making calls as part of GNAP, such as the extensions allowing the
RS to make calls to the AS defined in <xref target="I-D.ietf-gnap-resource-servers" format="default" sectionFormat="of" derivedContent="GNAP-RS"/>. To facilitate this extended use,
"signer" and "verifier" are used as generic terms in the subsections below.
In the core functions of GNAP specified in this document, the "signer" is the
client instance, and the "verifier" is the AS (for grant requests) or RS (for
resource requests), as appropriate.</t>
        <t indent="0" pn="section-7.3-14">When used for delegation in GNAP, these key binding mechanisms allow
the AS to ensure that the keys presented by the client instance in the initial request are in
control of the party calling any follow-up or continuation requests. To facilitate
this requirement, the continuation response (<xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"> </xref>) includes
an access token bound to the client instance's key (<xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"> </xref>), and that key (or its most recent rotation)
<bcp14>MUST</bcp14> be proved in all continuation requests
(<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"/>). Token management requests (<xref target="token-management" format="default" sectionFormat="of" derivedContent="Section 6"/>) are similarly bound
to either the access token's own key or, in the case of bearer tokens, the client instance's key.</t>
        <t indent="0" pn="section-7.3-15">In the following subsections, unless otherwise noted, the <tt>RS256</tt> JSON Object Signing and Encryption (JOSE) signature algorithm (defined in <xref section="3.3" sectionFormat="of" target="RFC7518" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7518#section-3.3" derivedContent="RFC7518"/>) is applied
using the following RSA key (presented here in JWK format):</t>
        <sourcecode type="json" markers="false" pn="section-7.3-16">
NOTE: '\' line wrapping per RFC 8792

{
    "kid": "gnap-rsa",
    "p": "xS4-YbQ0SgrsmcA7xDzZKuVNxJe3pCYwdAe6efSy4hdDgF9-vhC5gjaRk\
        i1wWuERSMW4Tv44l5HNrL-Bbj_nCJxr_HAOaesDiPn2PnywwEfg3Nv95Nn-\
        eilhqXRaW-tJKEMjDHu_fmJBeemHNZI412gBnXdGzDVo22dvYoxd6GM",
    "kty": "RSA",
    "q": "rVdcT_uy-CD0GKVLGpEGRR7k4JO6Tktc8MEHkC6NIFXihk_6vAIOCzCD6\
        LMovMinOYttpRndKoGTNdJfWlDFDScAs8C5n2y1STCQPRximBY-bw39-aZq\
        JXMxOLyPjzuVgiTOCBIvLD6-8-mvFjXZk_eefD0at6mQ5qV3U1jZt88",
    "d": "FHlhdTF0ozTliDxMBffT6aJVKZKmbbFJOVNten9c3lXKB3ux3NAb_D2dB\
        7inp9EV23oWrDspFtvCvD9dZrXgRKMHofkEpo_SSvBZfgtH-OTkbY_TqtPF\
        FLPKAw0JX5cFPnn4Q2xE4n-dQ7tpRCKl59vZLHBrHShr90zqzFp0AKXU5fj\
        b1gC9LPwsFA2Fd7KXmI1drQQEVq9R-o18Pnn4BGQNQNjO_VkcJTiBmEIVT_\
        KJRPdpVJAmbgnYWafL_hAfeb_dK8p85yurEVF8nCK5oO3EPrqB7IL4UqaEn\
        5Sl3u0j8x5or-xrrAoNz-gdOv7ONfZY6NFoa-3f8q9wBAHUuQ",
    "e": "AQAB",
    "qi": "ogpNEkDKg22Rj9cDV_-PJBZaXMk66Fp557RT1tafIuqJRHEufSOYnsto\
        bWPJ0gHxv1gVJw3gm-zYvV-wTMNgr2wVsBSezSJjPSjxWZtmT2z68W1DuvK\
        kZy15vz7Jd85hmDlriGcXNCoFEUsGLWkpHH9RwPIzguUHWmTt8y0oXyI",
    "dp": "dvCKGI2G7RLh3WyjoJ_Dr6hZ3LhXweB3YcY3qdD9BnxZ71mrLiMQg4c_\
        EBnwqCETN_5sStn2cRc2JXnvLP3G8t7IFKHTT_i_TSTacJ7uT04MSa053Y3\
        RfwbvLjRNPR0UKAE3ZxROUoIaVNuU_6-QMf8-2ilUv2GIOrCN87gP_Vk",
    "alg": "RS256",
    "dq": "iMZmELaKgT9_W_MRT-UfDWtTLeFjIGRW8aFeVmZk9R7Pnyt8rNzyN-IQ\
        M40ql8u8J6vc2GmQGfokLlPQ6XLSCY68_xkTXrhoU1f-eDntkhP7L6XawSK\
        Onv5F2H7wyBQ75HUmHTg8AK2B_vRlMyFKjXbVlzKf4kvqChSGEz4IjQ",
    "n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8BfYdHsFzAt\
        YKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZGYX\
        jHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZx\
        e0jRETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0\
        bunS0K3bA_3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kO\
        zywzwPTuq-cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ"
}
</sourcecode>
        <t indent="0" pn="section-7.3-17">Key proofing methods <bcp14>SHOULD</bcp14> define a mechanism to allow the rotation of keys discussed
in <xref target="rotate-access-token-key" format="default" sectionFormat="of" derivedContent="Section 6.1.1"/>. Key rotation mechanisms <bcp14>MUST</bcp14> define a way for presenting
proof of two keys simultaneously with the following attributes:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7.3-18">
          <li pn="section-7.3-18.1">
            <t indent="0" pn="section-7.3-18.1.1">The value of or reference to the new key material <bcp14>MUST</bcp14> be signed by the existing key.
  Generally speaking, this amounts to using the existing key to sign the content of the
  message that contains the new key.</t>
          </li>
          <li pn="section-7.3-18.2">
            <t indent="0" pn="section-7.3-18.2.1">The signature of the old key <bcp14>MUST</bcp14> be signed by the new key.
  Generally speaking, this means including the signature value of the old key under the
  coverage of the new key.</t>
          </li>
        </ul>
        <section anchor="httpsig-binding" numbered="true" removeInRFC="false" toc="include" pn="section-7.3.1">
          <name slugifiedName="name-http-message-signatures">HTTP Message Signatures</name>
          <t indent="0" pn="section-7.3.1-1">This method is indicated by the method value <tt>httpsig</tt> and can be declared in either object
form or string form.</t>
          <t indent="0" pn="section-7.3.1-2">When the proofing method is specified in object form, the following parameters are defined:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.1-3">
            <dt pn="section-7.3.1-3.1"><tt>alg</tt>:</dt>
            <dd pn="section-7.3.1-3.2">
              <t indent="0" pn="section-7.3.1-3.2.1">The HTTP signature algorithm, from the "HTTP Signature Algorithms" registry. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.1-3.3"><tt>content-digest-alg</tt>:</dt>
            <dd pn="section-7.3.1-3.4">
              <t indent="0" pn="section-7.3.1-3.4.1">The algorithm used for the Content-Digest field, used to protect the content when present in the message. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.1-4">This example uses the Elliptic Curve Digital Signature Algorithm (ECDSA) signing algorithm over the P384 curve and the SHA-512 hashing
algorithm for the content digest.</t>
          <sourcecode type="json" markers="false" pn="section-7.3.1-5">
{
    "proof": {
        "method": "httpsig",
        "alg": "ecdsa-p384-sha384",
        "content-digest-alg": "sha-512"
    }
}
</sourcecode>
          <t indent="0" pn="section-7.3.1-6">When the proofing method is specified in string form, the signing algorithm <bcp14>MUST</bcp14> be derived from the
key material (such as using the JWS algorithm in a JWK formatted key), and the content digest
algorithm <bcp14>MUST</bcp14> be <tt>sha-256</tt>.</t>
          <sourcecode type="json" markers="false" pn="section-7.3.1-7">
{
    "proof": "httpsig"
}
</sourcecode>
          <t indent="0" pn="section-7.3.1-8">When using this method, the signer creates an HTTP message signature as described in
<xref target="RFC9421" format="default" sectionFormat="of" derivedContent="RFC9421"/>. The covered components of the signature <bcp14>MUST</bcp14> include the
following:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.1-9">
            <dt pn="section-7.3.1-9.1"><tt>"@method"</tt>:</dt>
            <dd pn="section-7.3.1-9.2">
              <t indent="0" pn="section-7.3.1-9.2.1">The method used in the HTTP request.</t>
            </dd>
            <dt pn="section-7.3.1-9.3"><tt>"@target-uri"</tt>:</dt>
            <dd pn="section-7.3.1-9.4">
              <t indent="0" pn="section-7.3.1-9.4.1">The full request URI of the HTTP request.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.1-10">When the message contains request content, the covered components <bcp14>MUST</bcp14> also include the following:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.1-11">
            <dt pn="section-7.3.1-11.1"><tt>"content-digest"</tt>:</dt>
            <dd pn="section-7.3.1-11.2">
              <t indent="0" pn="section-7.3.1-11.2.1">The Content-Digest header as defined in <xref target="RFC9530" format="default" sectionFormat="of" derivedContent="RFC9530"/>. When the
  request message has content, the signer <bcp14>MUST</bcp14> calculate this field value and include
  the field in the request. The verifier
  <bcp14>MUST</bcp14> validate this field value. <bcp14>REQUIRED</bcp14> when the message request contains message content.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.1-12">When the request is bound to an access token, the covered components
<bcp14>MUST</bcp14> also include the following:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.1-13">
            <dt pn="section-7.3.1-13.1"><tt>"authorization"</tt>:</dt>
            <dd pn="section-7.3.1-13.2">
              <t indent="0" pn="section-7.3.1-13.2.1">The Authorization header used to present the access token as discussed in
<xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.1-14">Other message components <bcp14>MAY</bcp14> also be included.</t>
          <t indent="0" pn="section-7.3.1-15">The signer <bcp14>MUST</bcp14> include the <tt>tag</tt> signature  parameter with the value <tt>gnap</tt>, and the verifier <bcp14>MUST</bcp14> verify that the parameter exists with this value. The signer <bcp14>MUST</bcp14> include the <tt>created</tt> signature parameter with a timestamp of when the signature was created, and the verifier <bcp14>MUST</bcp14> ensure that the creation timestamp is sufficiently close to the current time given expected network delay and clock skew. The signer <bcp14>SHOULD</bcp14> include the <tt>nonce</tt> parameter with a unique and unguessable value. When included, the verifier <bcp14>MUST</bcp14> determine that the nonce value is unique within a reasonably short time period such as several minutes.</t>
          <t indent="0" pn="section-7.3.1-16">If the signer's key presented is a JWK, the <tt>keyid</tt> parameter of the signature <bcp14>MUST</bcp14> be set
to the <tt>kid</tt> value of the JWK, and the signing algorithm used <bcp14>MUST</bcp14> be the JWS
algorithm denoted by the key's <tt>alg</tt> field of the JWK.</t>
          <t indent="0" pn="section-7.3.1-17">The explicit <tt>alg</tt> signature parameter <bcp14>MUST NOT</bcp14> be included in the signature, since the algorithm
	  will be derived from either the key material or the <tt>proof</tt> value.</t>
          <t indent="0" pn="section-7.3.1-18">In the following non-normative example, the message content is a JSON object:</t>
          <sourcecode type="json" markers="false" pn="section-7.3.1-19">
NOTE: '\' line wrapping per RFC 8792

{
    "access_token": {
        "access": [
            "dolphin-metadata"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.foo/callback",
            "nonce": "VJLO6A4CAYLBXHTR0KRO"
        }
    },
    "client": {
      "key": {
        "proof": "httpsig",
        "jwk": {
            "kid": "gnap-rsa",
            "kty": "RSA",
            "e": "AQAB",
            "alg": "PS512",
            "n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8Bf\
  YdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZG\
  YXjHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZxe0jR\
  ETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0bunS0K3bA_\
  3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kOzywzwPTuq-cVQDyE\
  N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ"
        }
      }
      "display": {
        "name": "My Client Display Name",
        "uri": "https://client.foo/"
      },
    }
}
</sourcecode>
          <t indent="0" pn="section-7.3.1-20">This content is hashed for the Content-Digest header using <tt>sha-256</tt> into the following encoded value:</t>
          <artwork align="left" pn="section-7.3.1-21">
sha-256=:q2XBmzRDCREcS2nWo/6LYwYyjrlN1bRfv+HKLbeGAGg=:
</artwork>
          <t indent="0" pn="section-7.3.1-22">The HTTP message signature input string is calculated to be the following:</t>
          <artwork align="left" pn="section-7.3.1-23">
NOTE: '\' line wrapping per RFC 8792

"@method": POST
"@target-uri": https://server.example.com/gnap
"content-digest": \
  sha-256=:q2XBmzRDCREcS2nWo/6LYwYyjrlN1bRfv+HKLbeGAGg=:
"content-length": 988
"content-type": application/json
"@signature-params": ("@method" "@target-uri" "content-digest" \
  "content-length" "content-type");created=1618884473\
  ;keyid="gnap-rsa";nonce="NAOEJF12ER2";tag="gnap"
</artwork>
          <t indent="0" pn="section-7.3.1-24">This leads to the following full HTTP message request:</t>
          <sourcecode type="http-message" markers="false" pn="section-7.3.1-25">
NOTE: '\' line wrapping per RFC 8792

POST /gnap HTTP/1.1
Host: server.example.com
Content-Type: application/json
Content-Length: 988
Content-Digest: sha-256=:q2XBmzRDCREcS2nWo/6LYwYyjrlN1bRfv+HKLbeGAG\
  g=:
Signature-Input: sig1=("@method" "@target-uri" "content-digest" \
  "content-length" "content-type");created=1618884473\
  ;keyid="gnap-rsa";nonce="NAOEJF12ER2";tag="gnap"
Signature: sig1=:c2uwTa6ok3iHZsaRKl1ediKlgd5cCAYztbym68XgX8gSOgK0Bt\
  +zLJ19oGjSAHDjJxX2gXP2iR6lh9bLMTfPzbFVn4Eh+5UlceP+0Z5mES7v0R1+eHe\
  OqBl0YlYKaSQ11YT7n+cwPnCSdv/6+62m5zwXEEftnBeA1ECorfTuPtau/yrTYEvD\
  9A/JqR2h9VzAE17kSlSSsDHYA6ohsFqcRJavX29duPZDfYgkZa76u7hJ23yVxoUpu\
  2J+7VUdedN/72N3u3/z2dC8vQXbzCPTOiLru12lb6vnBZoDbUGsRR/zHPauxhj9T+\
  218o5+tgwYXw17othJSxIIOZ9PkIgz4g==:

{
    "access_token": {
        "access": [
            "dolphin-metadata"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.foo/callback",
            "nonce": "VJLO6A4CAYLBXHTR0KRO"
        }
    },
    "client": {
      "key": {
        "proof": "httpsig",
        "jwk": {
            "kid": "gnap-rsa",
            "kty": "RSA",
            "e": "AQAB",
            "alg": "PS512",
            "n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8Bf\
  YdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZG\
  YXjHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZxe0jR\
  ETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0bunS0K3bA_\
  3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kOzywzwPTuq-cVQDyE\
  N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ"
        }
      }
      "display": {
        "name": "My Client Display Name",
        "uri": "https://client.foo/"
      },
    }
}
</sourcecode>
          <t indent="0" pn="section-7.3.1-26">The verifier <bcp14>MUST</bcp14> ensure that the signature covers all required message components.
If the HTTP message includes content, the verifier <bcp14>MUST</bcp14>
calculate and verify the value of the <tt>Content-Digest</tt> header. The verifier <bcp14>MUST</bcp14> validate
the signature against the expected key of the signer.</t>
          <t indent="0" pn="section-7.3.1-27">A received message <bcp14>MAY</bcp14> include multiple signatures, each with its own label. The verifier <bcp14>MUST</bcp14> examine all included signatures until it finds (at least) one that is acceptable according to its policy and meets the requirements in this section.</t>
          <section anchor="httpsig-rotate" numbered="true" removeInRFC="false" toc="exclude" pn="section-7.3.1.1">
            <name slugifiedName="name-key-rotation-using-http-mes">Key Rotation Using HTTP Message Signatures</name>
            <t indent="0" pn="section-7.3.1.1-1">When rotating a key using HTTP message signatures, the message, which includes the new public key
value or reference, is first signed with the old key following all of the requirements in <xref target="httpsig-binding" format="default" sectionFormat="of" derivedContent="Section 7.3.1"/>.
The message is then signed again with the new key by following all of the requirements in <xref target="httpsig-binding" format="default" sectionFormat="of" derivedContent="Section 7.3.1"/> again,
with the following additional requirements:</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-7.3.1.1-2">
              <li pn="section-7.3.1.1-2.1">
                <t indent="0" pn="section-7.3.1.1-2.1.1">The covered components <bcp14>MUST</bcp14> include the Signature and Signature-Input values from the signature generated with the old key.</t>
              </li>
              <li pn="section-7.3.1.1-2.2">
                <t indent="0" pn="section-7.3.1.1-2.2.1">The tag value <bcp14>MUST</bcp14> be <tt>gnap-rotate</tt>.</t>
              </li>
            </ul>
            <t indent="0" pn="section-7.3.1.1-3">For example, the following request to the token management endpoint for rotating a token value
contains the new key in the request. The message is first signed using the old key,
and the resulting signature is placed in "old-key":</t>
            <sourcecode type="http-message" markers="false" pn="section-7.3.1.1-4">
NOTE: '\' line wrapping per RFC 8792

POST /token/PRY5NM33 HTTP/1.1
Host: server.example.com
Authorization: GNAP 4398.34-12-asvDa.a
Content-Digest: sha-512=:Fb/A5vnawhuuJ5xk2RjGrbbxr6cvinZqd4+JPY85u/\
  JNyTlmRmCOtyVhZ1Oz/cSS4tsYen6fzpCwizy6UQxNBQ==:
Signature-Input: old-key=("@method" "@target-uri" "content-digest" \
  "authorization");created=1618884475;keyid="test-key-ecc-p256"\
  ;tag="gnap"
Signature: old-key=:vN4IKYsJl2RLFe+tYEm4dHM4R4BToqx5D2FfH4ge5WOkgxo\
  dI2QRrjB8rysvoSEGvAfiVJOWsGcPD1lU639Amw==:

{
    "key": {
        "proof": "httpsig",
        "jwk": {
            "kty": "RSA",
            "e": "AQAB",
            "kid": "xyz-2",
            "alg": "RS256",
            "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..."
        }
    }
}
</sourcecode>
            <t indent="0" pn="section-7.3.1.1-5">The signer then creates a new signature using the new key, adding the signature
input and value to the signature base.</t>
            <artwork align="left" pn="section-7.3.1.1-6">
NOTE: '\' line wrapping per RFC 8792

"@method": POST
"@target-uri": https://server.example.com/token/PRY5NM33
"content-digest": sha-512=:Fb/A5vnawhuuJ5xk2RjGrbbxr6cvinZqd4+JPY85\
  u/JNyTlmRmCOtyVhZ1Oz/cSS4tsYen6fzpCwizy6UQxNBQ==:
"authorization": GNAP 4398.34-12-asvDa.a
"signature";key="old-key": :YdDJjDn2Sq8FR82e5IcOLWmmf6wILoswlnRcz+n\
  M+e8xjFDpWS2YmiMYDqUdri2UiJsZx63T1z7As9Kl6HTGkQ==:
"signature-input";key="old-key": ("@method" "@target-uri" \
  "content-digest" "authorization");created=1618884475\
  ;keyid="test-key-ecc-p256";tag="gnap"
"@signature-params": ("@method" "@target-uri" "content-digest" \
  "authorization" "signature";key="old-key" "signature-input"\
  ;key="old-key");created=1618884480;keyid="xyz-2"
  ;tag="gnap-rotate"
</artwork>
            <t indent="0" pn="section-7.3.1.1-7">This signature is then added to the message:</t>
            <sourcecode type="http-message" markers="false" pn="section-7.3.1.1-8">
NOTE: '\' line wrapping per RFC 8792

POST /token/PRY5NM33 HTTP/1.1
Host: server.example.com
Authorization: GNAP 4398.34-12-asvDa.a
Content-Digest: sha-512=:Fb/A5vnawhuuJ5xk2RjGrbbxr6cvinZqd4+JPY85u/\
  JNyTlmRmCOtyVhZ1Oz/cSS4tsYen6fzpCwizy6UQxNBQ==:
Signature-Input: old-key=("@method" "@target-uri" "content-digest" \
    "authorization");created=1618884475;keyid="test-key-ecc-p256"\
    ;tag="gnap", \
  new-key=("@method" "@target-uri" "content-digest" \
    "authorization" "signature";key="old-key" "signature-input"\
    ;key="old-key");created=1618884480;keyid="xyz-2"
    ;tag="gnap-rotate"
Signature: old-key=:vN4IKYsJl2RLFe+tYEm4dHM4R4BToqx5D2FfH4ge5WOkgxo\
    dI2QRrjB8rysvoSEGvAfiVJOWsGcPD1lU639Amw==:, \
  new-key=:VWUExXQ0geWeTUKhCfDT7WJyT++OHSVbfPA1ukW0o7mmstdbvIz9iOuH\
    DRFzRBm0MQPFVMpLDFXQdE3vi2SL3ZjzcX2qLwzAtyRB9+RsV2caAA80A5ZGMoo\
    gUsKPk4FFDN7KRUZ0vT9Mo9ycx9Dq/996TOWtAmq5z0YUYEwwn+T6+NcW8rFtms\
    s1ZfXG0EoAfV6ve25p+x40Y1rvDHsfkakTRB4J8jWVDybSe39tjIKQBo3uicDVw\
    twewBMNidIa+66iF3pWj8w9RSb0cncEgvbkHgASqaZeXmxxG4gM8p1HH9v/OqQT\
    Oggm5gTWmCQs4oxEmWsfTOxefunfh3X+Qw==:

{
    "key": {
        "proof": "httpsig",
        "jwk": {
            "kty": "RSA",
            "e": "AQAB",
            "kid": "xyz-2",
            "alg": "RS256",
            "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8xY..."
        }
    }
}
</sourcecode>
            <t indent="0" pn="section-7.3.1.1-9">The verifier <bcp14>MUST</bcp14> validate both signatures before processing the request for key rotation.</t>
          </section>
        </section>
        <section anchor="mtls" numbered="true" removeInRFC="false" toc="include" pn="section-7.3.2">
          <name slugifiedName="name-mutual-tls">Mutual TLS</name>
          <t indent="0" pn="section-7.3.2-1">This method is indicated by the method value <tt>mtls</tt> in string form.</t>
          <sourcecode type="json" markers="false" pn="section-7.3.2-2">
{
    "proof": "mtls"
}
</sourcecode>
          <t indent="0" pn="section-7.3.2-3">The signer presents its TLS client certificate during TLS negotiation with the verifier.</t>
          <t indent="0" pn="section-7.3.2-4">In the following non-normative example, the certificate is communicated to the application
through the Client-Cert header field from a TLS reverse proxy as per <xref target="RFC9440" format="default" sectionFormat="of" derivedContent="RFC9440"/>, leading
to the following full HTTP request message:</t>
          <sourcecode type="http-message" markers="false" pn="section-7.3.2-5">
POST /gnap HTTP/1.1
Host: server.example.com
Content-Type: application/jose
Content-Length: 1567
Client-Cert: \
  :MIIC6jCCAdKgAwIBAgIGAXjw74xPMA0GCSqGSIb3DQEBCwUAMDYxNDAyBgNVBAMM\
  K05JWU15QmpzRGp5QkM5UDUzN0Q2SVR6a3BEOE50UmppOXlhcEV6QzY2bVEwHhcN\
  MjEwNDIwMjAxODU0WhcNMjIwMjE0MjAxODU0WjA2MTQwMgYDVQQDDCtOSVlNeUJq\
  c0RqeUJDOVA1MzdENklUemtwRDhOdFJqaTl5YXBFekM2Nm1RMIIBIjANBgkqhkiG\
  9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhYOJ+XOKISdMMShn/G4W9m20mT0VWtQBsmBB\
  kI2cmRt4Ai8BfYdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8I\
  kZ8NMwSrcUIBZGYXjHpwjzvfGvXH/5KJlnR3/uRUp4Z4Ujk2bCaKegDn11V2vxE4\
  1hqaPUnhRZxe0jRETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo+\
  uv4BC0bunS0K3bA/3UgVp7zBlQFoFnLTO2uWp/muLEWGl67gBq9MO3brKXfGhi3k\
  OzywzwPTuq+cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQIDAQABMA0GCSqG\
  SIb3DQEBCwUAA4IBAQBnYFK0eYHy+hVf2D58usj39lhL5znb/q9G35GBd/XsWfCE\
  wHuLOSZSUmG71bZtrOcx0ptle9bp2kKl4HlSTTfbtpuG5onSa3swRNhtKtUy5NH9\
  W/FLViKWfoPS3kwoEpC1XqKY6l7evoTCtS+kTQRSrCe4vbNprCAZRxz6z1nEeCgu\
  NMk38yTRvx8ihZpVOuU+Ih+dOtVe/ex5IAPYxlQsvtfhsUZqc7IyCcy72WHnRHlU\
  fn3pJm0S5270+Yls3Iv6h3oBAP19i906UjiUTNH3g0xMW+V4uLxgyckt4wD4Mlyv\
  jnaQ7Z3sR6EsXMocAbXHIAJhwKdtU/fLgdwL5vtx:


{
    "access_token": {
        "access": [
            "dolphin-metadata"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.foo/callback",
            "nonce": "VJLO6A4CAYLBXHTR0KRO"
        }
    },
    "client": {
      "key": {
        "proof": "mtls",
        "cert": "MIIC6jCCAdKgAwIBAgIGAXjw74xPMA0GCSqGSIb3DQEBCwUAMD\
  YxNDAyBgNVBAMMK05JWU15QmpzRGp5QkM5UDUzN0Q2SVR6a3BEOE50UmppOXlhcEV\
  6QzY2bVEwHhcNMjEwNDIwMjAxODU0WhcNMjIwMjE0MjAxODU0WjA2MTQwMgYDVQQD\
  DCtOSVlNeUJqc0RqeUJDOVA1MzdENklUemtwRDhOdFJqaTl5YXBFekM2Nm1RMIIBI\
  jANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhYOJ+XOKISdMMShn/G4W9m20mT\
  0VWtQBsmBBkI2cmRt4Ai8BfYdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8\
  KowlyVy8IkZ8NMwSrcUIBZGYXjHpwjzvfGvXH/5KJlnR3/uRUp4Z4Ujk2bCaKegDn\
  11V2vxE41hqaPUnhRZxe0jRETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDad\
  z8BkPo+uv4BC0bunS0K3bA/3UgVp7zBlQFoFnLTO2uWp/muLEWGl67gBq9MO3brKX\
  fGhi3kOzywzwPTuq+cVQDyEN7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQIDAQABMA0\
  GCSqGSIb3DQEBCwUAA4IBAQBnYFK0eYHy+hVf2D58usj39lhL5znb/q9G35GBd/Xs\
  WfCEwHuLOSZSUmG71bZtrOcx0ptle9bp2kKl4HlSTTfbtpuG5onSa3swRNhtKtUy5\
  NH9W/FLViKWfoPS3kwoEpC1XqKY6l7evoTCtS+kTQRSrCe4vbNprCAZRxz6z1nEeC\
  guNMk38yTRvx8ihZpVOuU+Ih+dOtVe/ex5IAPYxlQsvtfhsUZqc7IyCcy72WHnRHl\
  Ufn3pJm0S5270+Yls3Iv6h3oBAP19i906UjiUTNH3g0xMW+V4uLxgyckt4wD4Mlyv\
  jnaQ7Z3sR6EsXMocAbXHIAJhwKdtU/fLgdwL5vtx"
      }
      "display": {
        "name": "My Client Display Name",
        "uri": "https://client.foo/"
      },
    },
    "subject": {
        "formats": ["iss_sub", "opaque"]
    }
}
</sourcecode>
          <t indent="0" pn="section-7.3.2-6">The verifier compares the TLS client certificate presented during
MTLS negotiation to the expected key of the signer. Since the
TLS connection covers the entire message, there are no additional
requirements to check.</t>
          <t indent="0" pn="section-7.3.2-7">Note that in many instances, the verifier will not do a full
          certificate chain validation of the presented TLS client
          certificate, as the means of trust for this certificate could be in
          something other than a PKI system, such as a static registration or
          trust-on-first-use.  See Sections <xref target="security-mtls" format="counter" sectionFormat="of" derivedContent="11.3"/> and <xref target="security-mtls-patterns" format="counter" sectionFormat="of" derivedContent="11.4"/> for some additional considerations for this key
          proofing method.</t>
          <section anchor="key-rotation-using-mtls" numbered="true" removeInRFC="false" toc="exclude" pn="section-7.3.2.1">
            <name slugifiedName="name-key-rotation-using-mtls">Key Rotation Using MTLS</name>
            <t indent="0" pn="section-7.3.2.1-1">Since it is not possible to present two client authenticated certificates to a MTLS
connection simultaneously, dynamic key rotation for this proofing method is not defined.
Instead, key rotation for MTLS-based client instances is expected to be managed through
deployment practices, as discussed in <xref target="security-mtls-patterns" format="default" sectionFormat="of" derivedContent="Section 11.4"/>.</t>
          </section>
        </section>
        <section anchor="detached-jws" numbered="true" removeInRFC="false" toc="include" pn="section-7.3.3">
          <name slugifiedName="name-detached-jws">Detached JWS</name>
          <t indent="0" pn="section-7.3.3-1">This method is indicated by the method value <tt>jwsd</tt> in string form.</t>
          <sourcecode type="json" markers="false" pn="section-7.3.3-2">
{
    "proof": "jwsd"
}
</sourcecode>
          <t indent="0" pn="section-7.3.3-3">The signer creates a JSON Web Signature (JWS) <xref target="RFC7515" format="default" sectionFormat="of" derivedContent="RFC7515"/> object as follows.</t>
          <t indent="0" pn="section-7.3.3-4">To protect the request, the JOSE header of the signature contains the following
claims:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.3-5">
            <dt pn="section-7.3.3-5.1"><tt>kid</tt> (string):</dt>
            <dd pn="section-7.3.3-5.2">
              <t indent="0" pn="section-7.3.3-5.2.1">The key identifier. <bcp14>REQUIRED</bcp14> if the key is presented in JWK format. This
<bcp14>MUST</bcp14> be the value of the <tt>kid</tt> field of the key.</t>
            </dd>
            <dt pn="section-7.3.3-5.3"><tt>alg</tt> (string):</dt>
            <dd pn="section-7.3.3-5.4">
              <t indent="0" pn="section-7.3.3-5.4.1">The algorithm used to sign the request. The algorithm <bcp14>MUST</bcp14> be appropriate to the key presented.
If the key is presented as a JWK, this <bcp14>MUST</bcp14> be equal to the <tt>alg</tt> parameter of the key. The algorithm <bcp14>MUST NOT</bcp14> be <tt>none</tt>.
<bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.3-5.5"><tt>typ</tt> (string):</dt>
            <dd pn="section-7.3.3-5.6">
              <t indent="0" pn="section-7.3.3-5.6.1">The type header, value "gnap-binding-jwsd". <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.3-5.7"><tt>htm</tt> (string):</dt>
            <dd pn="section-7.3.3-5.8">
              <t indent="0" pn="section-7.3.3-5.8.1">The HTTP method used to make this request, as a case-sensitive ASCII string. Note that most public HTTP methods are in uppercase ASCII by convention. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.3-5.9"><tt>uri</tt> (string):</dt>
            <dd pn="section-7.3.3-5.10">
              <t indent="0" pn="section-7.3.3-5.10.1">The HTTP URI used for this request. This value <bcp14>MUST</bcp14> be an absolute URI, including all path and query components and no fragment components. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.3-5.11"><tt>created</tt> (integer):</dt>
            <dd pn="section-7.3.3-5.12">
              <t indent="0" pn="section-7.3.3-5.12.1">A timestamp of when the signature was created, in integer seconds since UNIX Epoch. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.3-6">When the request is bound to an access token, the JOSE header <bcp14>MUST</bcp14> also include the following:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.3-7">
            <dt pn="section-7.3.3-7.1"><tt>ath</tt> (string):</dt>
            <dd pn="section-7.3.3-7.2">
              <t indent="0" pn="section-7.3.3-7.2.1">The hash of the access token. The value <bcp14>MUST</bcp14> be the
result of base64url encoding (with no padding) the SHA-256 digest
of the ASCII encoding of the associated access token's value. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.3-8">If the HTTP request has content (such as an HTTP POST or PUT method),
the payload of the JWS object is the base64url encoding (without padding)
of the SHA-256 digest of the bytes of the content.
If the request being made does not have content (such as
an HTTP GET, OPTIONS, or DELETE method), the JWS signature is
calculated over an empty payload.</t>
          <t indent="0" pn="section-7.3.3-9">The signer presents the signed object in compact form
<xref target="RFC7515" format="default" sectionFormat="of" derivedContent="RFC7515"/> in the Detached-JWS header field.</t>
          <t indent="0" pn="section-7.3.3-10">In the following non-normative example, the JOSE header contains the following parameters:</t>
          <sourcecode type="json" markers="false" pn="section-7.3.3-11">
{
    "alg": "RS256",
    "kid": "gnap-rsa",
    "uri": "https://server.example.com/gnap",
    "htm": "POST",
    "typ": "gnap-binding-jwsd",
    "created": 1618884475
}
</sourcecode>
          <t indent="0" pn="section-7.3.3-12">The request content is the following JSON object:</t>
          <sourcecode type="json" markers="false" pn="section-7.3.3-13">
NOTE: '\' line wrapping per RFC 8792

{
    "access_token": {
        "access": [
            "dolphin-metadata"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.foo/callback",
            "nonce": "VJLO6A4CAYLBXHTR0KRO"
        }
    },
    "client": {
      "key": {
        "proof": "jwsd",
        "jwk": {
            "kid": "gnap-rsa",
            "kty": "RSA",
            "e": "AQAB",
            "alg": "RS256",
            "n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8Bf\
  YdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZG\
  YXjHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZxe0jR\
  ETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0bunS0K3bA_\
  3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kOzywzwPTuq-cVQDyE\
  N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ"
        }
      }
      "display": {
        "name": "My Client Display Name",
        "uri": "https://client.foo/"
      },
    }
}
</sourcecode>
          <t indent="0" pn="section-7.3.3-14">This is hashed to the following base64-encoded value:</t>
          <artwork align="left" pn="section-7.3.3-15">
PGiVuOZUcN1tRtUS6tx2b4cBgw9mPgXG3IPB3wY7ctc
</artwork>
          <t indent="0" pn="section-7.3.3-16">This leads to the following full HTTP request message:</t>
          <sourcecode type="http-message" markers="false" pn="section-7.3.3-17">
NOTE: '\' line wrapping per RFC 8792

POST /gnap HTTP/1.1
Host: server.example.com
Content-Type: application/json
Content-Length: 983
Detached-JWS: eyJhbGciOiJSUzI1NiIsImNyZWF0ZWQiOjE2MTg4ODQ0NzUsImh0b\
  SI6IlBPU1QiLCJraWQiOiJnbmFwLXJzYSIsInR5cCI6ImduYXAtYmluZGluZytqd3\
  NkIiwidXJpIjoiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20vZ25hcCJ9.PGiVuO\
  ZUcN1tRtUS6tx2b4cBgw9mPgXG3IPB3wY7ctc.fUq-SV-A1iFN2MwCRW_yolVtT2_\
  TZA2h5YeXUoi5F2Q2iToC0Tc4drYFOSHIX68knd68RUA7yHqCVP-ZQEd6aL32H69e\
  9zuMiw6O_s4TBKB3vDOvwrhYtDH6fX2hP70cQoO-47OwbqP-ifkrvI3hVgMX9TfjV\
  eKNwnhoNnw3vbu7SNKeqJEbbwZfpESaGepS52xNBlDNMYBQQXxM9OqKJaXffzLFEl\
  -Xe0UnfolVtBraz3aPrPy1C6a4uT7wLda3PaTOVtgysxzii3oJWpuz0WP5kRujzDF\
  wX_EOzW0jsjCSkL-PXaKSpZgEjNjKDMg9irSxUISt1C1T6q3SzRgfuQ


{
    "access_token": {
        "access": [
            "dolphin-metadata"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.foo/callback",
            "nonce": "VJLO6A4CAYLBXHTR0KRO"
        }
    },
    "client": {
      "key": {
        "proof": "jwsd",
        "jwk": {
            "kid": "gnap-rsa",
            "kty": "RSA",
            "e": "AQAB",
            "alg": "RS256",
            "n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8Bf\
  YdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZG\
  YXjHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZxe0jR\
  ETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0bunS0K3bA_\
  3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kOzywzwPTuq-cVQDyE\
  N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ"
        }
      }
      "display": {
        "name": "My Client Display Name",
        "uri": "https://client.foo/"
      },
    }
}
</sourcecode>
          <t indent="0" pn="section-7.3.3-18">When the verifier receives the Detached-JWS header, it <bcp14>MUST</bcp14> parse and
validate the JWS object. The signature <bcp14>MUST</bcp14> be validated against the
expected key of the signer. If the HTTP message request contains
content, the verifier <bcp14>MUST</bcp14> calculate the hash of the content just as
the signer does, with no normalization or transformation of the request.
All required fields <bcp14>MUST</bcp14> be present,
and their values <bcp14>MUST</bcp14> be valid. All fields <bcp14>MUST</bcp14> match the corresponding portions of the HTTP
message. For example, the <tt>htm</tt> field of the JWS header has to be the same as the HTTP verb
	  used in the request.</t>
          <t indent="0" pn="section-7.3.3-19">Note that this proofing method depends on a specific cryptographic
          algorithm, SHA-256, in two ways: 1) the <tt>ath</tt> hash algorithm
          is hardcoded and 2) the payload of the detached/attached signature
          is computed using a hardcoded hash.
	  A future version of this
          document may address crypto-agility for both these uses by replacing
          ath with a new header that upgrades the algorithm and possibly
          defining a new JWS header that indicates the HTTP content's hash
          method.</t>
          <section anchor="key-rotation-using-detached-jws" numbered="true" removeInRFC="false" toc="exclude" pn="section-7.3.3.1">
            <name slugifiedName="name-key-rotation-using-detached">Key Rotation Using Detached JWS</name>
            <t indent="0" pn="section-7.3.3.1-1">When rotating a key using detached JWS, the message, which includes the new public key value or
reference, is first signed with the old key as described above using a JWS object with <tt>typ</tt> header value
"gnap-binding-rotation-jwsd". The value of the JWS object is then taken as the payload of a new JWS
object, to be signed by the new key using the parameters above.</t>
            <t indent="0" pn="section-7.3.3.1-2">The value of the new JWS object is sent in the Detached-JWS header.</t>
          </section>
        </section>
        <section anchor="attached-jws" numbered="true" removeInRFC="false" toc="include" pn="section-7.3.4">
          <name slugifiedName="name-attached-jws">Attached JWS</name>
          <t indent="0" pn="section-7.3.4-1">This method is indicated by the method value <tt>jws</tt> in string form.</t>
          <sourcecode type="json" markers="false" pn="section-7.3.4-2">
{
    "proof": "jws"
}
</sourcecode>
          <t indent="0" pn="section-7.3.4-3">The signer creates a JWS <xref target="RFC7515" format="default" sectionFormat="of" derivedContent="RFC7515"/> object as follows.</t>
          <t indent="0" pn="section-7.3.4-4">To protect the request, the JWS header contains the following claims:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.4-5">
            <dt pn="section-7.3.4-5.1"><tt>kid</tt> (string):</dt>
            <dd pn="section-7.3.4-5.2">
              <t indent="0" pn="section-7.3.4-5.2.1">The key identifier. <bcp14>REQUIRED</bcp14> if the key is presented in JWK format. This
<bcp14>MUST</bcp14> be the value of the <tt>kid</tt> field of the key.</t>
            </dd>
            <dt pn="section-7.3.4-5.3"><tt>alg</tt> (string):</dt>
            <dd pn="section-7.3.4-5.4">
              <t indent="0" pn="section-7.3.4-5.4.1">The algorithm used to sign the request. <bcp14>MUST</bcp14> be appropriate to the key presented.
If the key is presented as a JWK, this <bcp14>MUST</bcp14> be equal to the <tt>alg</tt> parameter of the key. <bcp14>MUST NOT</bcp14> be <tt>none</tt>.
<bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.4-5.5"><tt>typ</tt> (string):</dt>
            <dd pn="section-7.3.4-5.6">
              <t indent="0" pn="section-7.3.4-5.6.1">The type header, value "gnap-binding-jws". <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.4-5.7"><tt>htm</tt> (string):</dt>
            <dd pn="section-7.3.4-5.8">
              <t indent="0" pn="section-7.3.4-5.8.1">The HTTP method used to make this request, as a case-sensitive ASCII string. (Note that most public HTTP methods are in uppercase.) <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.4-5.9"><tt>uri</tt> (string):</dt>
            <dd pn="section-7.3.4-5.10">
              <t indent="0" pn="section-7.3.4-5.10.1">The HTTP URI used for this request, including all path and query components and no fragment components. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
            <dt pn="section-7.3.4-5.11"><tt>created</tt> (integer):</dt>
            <dd pn="section-7.3.4-5.12">
              <t indent="0" pn="section-7.3.4-5.12.1">A timestamp of when the signature was created, in integer seconds since UNIX Epoch. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.4-6">When the request is bound to an access token, the JOSE header <bcp14>MUST</bcp14> also include the following:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-7.3.4-7">
            <dt pn="section-7.3.4-7.1"><tt>ath</tt> (string):</dt>
            <dd pn="section-7.3.4-7.2">
              <t indent="0" pn="section-7.3.4-7.2.1">The hash of the access token. The value <bcp14>MUST</bcp14> be the
result of base64url encoding (with no padding) the SHA-256 digest
of the ASCII encoding of the associated access token's value. <bcp14>REQUIRED</bcp14>.</t>
            </dd>
          </dl>
          <t indent="0" pn="section-7.3.4-8">If the HTTP request has content (such as an HTTP POST or PUT method),
the payload of the JWS object is the JSON serialized content of the request, and
the object is signed according to JWS and serialized into compact form <xref target="RFC7515" format="default" sectionFormat="of" derivedContent="RFC7515"/>.
The signer presents the JWS as the content of the request along with a
content type of <tt>application/jose</tt>. The verifier
<bcp14>MUST</bcp14> extract the payload of the JWS and treat it as the request content
for further processing.</t>
          <t indent="0" pn="section-7.3.4-9">If the request being made does not have content (such as
an HTTP GET, OPTIONS, or DELETE method), the JWS signature is
calculated over an empty payload and passed in the <tt>Detached-JWS</tt>
header as described in <xref target="detached-jws" format="default" sectionFormat="of" derivedContent="Section 7.3.3"/>.</t>
          <t indent="0" pn="section-7.3.4-10">In the following non-normative example, the JOSE header contains the following parameters:</t>
          <sourcecode type="json" markers="false" pn="section-7.3.4-11">
{
    "alg": "RS256",
    "kid": "gnap-rsa",
    "uri": "https://server.example.com/gnap",
    "htm": "POST",
    "typ": "gnap-binding-jws",
    "created": 1618884475
}
</sourcecode>
          <t indent="0" pn="section-7.3.4-12">The request content, used as the JWS Payload, is the following JSON object:</t>
          <sourcecode type="json" markers="false" pn="section-7.3.4-13">
NOTE: '\' line wrapping per RFC 8792

{
    "access_token": {
        "access": [
            "dolphin-metadata"
        ]
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.foo/callback",
            "nonce": "VJLO6A4CAYLBXHTR0KRO"
        }
    },
    "client": {
      "key": {
        "proof": "jws",
        "jwk": {
            "kid": "gnap-rsa",
            "kty": "RSA",
            "e": "AQAB",
            "alg": "RS256",
            "n": "hYOJ-XOKISdMMShn_G4W9m20mT0VWtQBsmBBkI2cmRt4Ai8Bf\
  YdHsFzAtYKOjpBR1RpKpJmVKxIGNy0g6Z3ad2XYsh8KowlyVy8IkZ8NMwSrcUIBZG\
  YXjHpwjzvfGvXH_5KJlnR3_uRUp4Z4Ujk2bCaKegDn11V2vxE41hqaPUnhRZxe0jR\
  ETddzsE3mu1SK8dTCROjwUl14mUNo8iTrTm4n0qDadz8BkPo-uv4BC0bunS0K3bA_\
  3UgVp7zBlQFoFnLTO2uWp_muLEWGl67gBq9MO3brKXfGhi3kOzywzwPTuq-cVQDyE\
  N7aL0SxCb3Hc4IdqDaMg8qHUyObpPitDQ"
        }
      }
      "display": {
        "name": "My Client Display Name",
        "uri": "https://client.foo/"
      },
    },
    "subject": {
        "formats": ["iss_sub", "opaque"]
    }
}

</sourcecode>
          <t indent="0" pn="section-7.3.4-14">This leads to the following full HTTP request message:</t>
          <sourcecode type="http-message" markers="false" pn="section-7.3.4-15">
NOTE: '\' line wrapping per RFC 8792

POST /gnap HTTP/1.1
Host: server.example.com
Content-Type: application/jose
Content-Length: 1047

eyJhbGciOiJSUzI1NiIsImNyZWF0ZWQiOjE2MTg4ODQ0NzUsImh0bSI6IlBPU1QiLCJ\
raWQiOiJnbmFwLXJzYSIsInR5cCI6ImduYXAtYmluZGluZytqd3NkIiwidXJpIjoiaH\
R0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20vZ25hcCJ9.CnsKICAgICJhY2Nlc3NfdG9r\
ZW4iOiB7CiAgICAgICAgImFjY2VzcyI6IFsKICAgICAgICAgICAgImRvbHBoaW4tbWV\
0YWRhdGEiCiAgICAgICAgXQogICAgfSwKICAgICJpbnRlcmFjdCI6IHsKICAgICAgIC\
Aic3RhcnQiOiBbInJlZGlyZWN0Il0sCiAgICAgICAgImZpbmlzaCI6IHsKICAgICAgI\
CAgICAgIm1ldGhvZCI6ICJyZWRpcmVjdCIsCiAgICAgICAgICAgICJ1cmkiOiAiaHR0\
cHM6Ly9jbGllbnQuZm9vL2NhbGxiYWNrIiwKICAgICAgICAgICAgIm5vbmNlIjogIlZ\
KTE82QTRDQVlMQlhIVFIwS1JPIgogICAgICAgIH0KICAgIH0sCiAgICAiY2xpZW50Ij\
ogewogICAgICAicHJvb2YiOiAiandzIiwKICAgICAgImtleSI6IHsKICAgICAgICAia\
ndrIjogewogICAgICAgICAgICAia2lkIjogImduYXAtcnNhIiwKICAgICAgICAgICAg\
Imt0eSI6ICJSU0EiLAogICAgICAgICAgICAiZSI6ICJBUUFCIiwKICAgICAgICAgICA\
gImFsZyI6ICJSUzI1NiIsCiAgICAgICAgICAgICJuIjogImhZT0otWE9LSVNkTU1TaG\
5fRzRXOW0yMG1UMFZXdFFCc21CQmtJMmNtUnQ0QWk4QmZZZEhzRnpBdFlLT2pwQlIxU\
nBLcEptVkt4SUdOeTBnNlozYWQyWFlzaDhLb3dseVZ5OElrWjhOTXdTcmNVSUJaR1lY\
akhwd2p6dmZHdlhIXzVLSmxuUjNfdVJVcDRaNFVqazJiQ2FLZWdEbjExVjJ2eEU0MWh\
xYVBVbmhSWnhlMGpSRVRkZHpzRTNtdTFTSzhkVENST2p3VWwxNG1VTm84aVRyVG00bj\
BxRGFkejhCa1BvLXV2NEJDMGJ1blMwSzNiQV8zVWdWcDd6QmxRRm9GbkxUTzJ1V3Bfb\
XVMRVdHbDY3Z0JxOU1PM2JyS1hmR2hpM2tPenl3endQVHVxLWNWUUR5RU43YUwwU3hD\
YjNIYzRJZHFEYU1nOHFIVXlPYnBQaXREUSIKICAgICAgICB9CiAgICAgIH0KICAgICA\
gImRpc3BsYXkiOiB7CiAgICAgICAgIm5hbWUiOiAiTXkgQ2xpZW50IERpc3BsYXkgTm\
FtZSIsCiAgICAgICAgInVyaSI6ICJodHRwczovL2NsaWVudC5mb28vIgogICAgICB9L\
AogICAgfSwKICAgICJzdWJqZWN0IjogewogICAgICAgICJmb3JtYXRzIjogWyJpc3Nf\
c3ViIiwgIm9wYXF1ZSJdCiAgICB9Cn0K.MwNoVMQp5hVxI0mCs9LlOUdFtkDXaA1_eT\
vOXq7DOGrtDKH7q4vP2xUq3fH2jRAZqnobo0WdPP3eM3NH5QUjW8pa6_QpwdIWkK7r-\
u_52puE0lPBp7J4U2w4l9gIbg8iknsmWmXeY5F6wiGT8ptfuEYGgmloAJd9LIeNvD3U\
LW2h2dz1Pn2eDnbyvgB0Ugae0BoZB4f69fKWj8Z9wvTIjk1LZJN1PcL7_zT8Lrlic9a\
PyzT7Q9ovkd1s-4whE7TrnGUzFc5mgWUn_gsOpsP5mIIljoEEv-FqOW2RyNYulOZl0Q\
8EnnDHV_vPzrHlUarbGg4YffgtwkQhdK72-JOxYQ
</sourcecode>
          <t indent="0" pn="section-7.3.4-16">When the verifier receives an attached JWS request, it <bcp14>MUST</bcp14> parse and
validate the JWS object. The signature <bcp14>MUST</bcp14> be validated against the
expected key of the signer. All required fields <bcp14>MUST</bcp14> be present,
and their values <bcp14>MUST</bcp14> be valid. All fields <bcp14>MUST</bcp14> match the corresponding portions of the HTTP
message. For example, the <tt>htm</tt> field of the JWS header has to be the same as the HTTP verb
used in the request.</t>
          <t indent="0" pn="section-7.3.4-17">Note that this proofing method depends on a specific cryptographic algorithm, SHA-256, in two ways:
the <tt>ath</tt> hash algorithm is hardcoded, and computing the payload of the detached/attached signature
also uses a hardcoded hash. A future version of this document may address crypto-agility for both
these uses by replacing ath with a new header that upgrades the algorithm and possibly defining a
new header that indicates the HTTP content's hash method.</t>
          <section anchor="key-rotation-using-attached-jws" numbered="true" removeInRFC="false" toc="exclude" pn="section-7.3.4.1">
            <name slugifiedName="name-key-rotation-using-attached">Key Rotation Using Attached JWS</name>
            <t indent="0" pn="section-7.3.4.1-1">When rotating a key using attached JWS, the message, which includes the new public key value or reference, is first signed with the old key using a JWS object with <tt>typ</tt> header value "gnap-binding-rotation-jws". The value of the JWS object is then taken as the payload of a new JWS object, to be signed by the new key.</t>
          </section>
        </section>
      </section>
    </section>
    <section anchor="resource-access-rights" numbered="true" removeInRFC="false" toc="include" pn="section-8">
      <name slugifiedName="name-resource-access-rights">Resource Access Rights</name>
      <t indent="0" pn="section-8-1">GNAP provides a rich structure for describing the protected resources
hosted by RSs and accessed by client software. This structure is used when
the client instance requests an access token (<xref target="request-token" format="default" sectionFormat="of" derivedContent="Section 2.1"> </xref>) and when
an access token is returned (<xref target="response-token" format="default" sectionFormat="of" derivedContent="Section 3.2"> </xref>). GNAP's structure is
designed to be analogous to the OAuth 2.0 Rich Authorization Requests
data structure defined in <xref target="RFC9396" format="default" sectionFormat="of" derivedContent="RFC9396"/>.</t>
      <t indent="0" pn="section-8-2">The root of this structure is a JSON array. The elements of the JSON
array represent rights of access that are associated with the
access token. Individual rights of access can be defined by the RS as
either an object or a string. The resulting access is the union of all elements
within the array.</t>
      <t indent="0" pn="section-8-3">The access associated with the access token is described
using objects that each contain multiple
dimensions of access. Each object contains a <bcp14>REQUIRED</bcp14> <tt>type</tt>
property that determines the type of API that the token is used for and
the structure of the rest of the object. There is no expected
interoperability between different <tt>type</tt> definitions.</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-8-4">
        <dt pn="section-8-4.1"><tt>type</tt> (string):</dt>
        <dd pn="section-8-4.2">
          <t indent="0" pn="section-8-4.2.1">The type of resource request as a string. This field <bcp14>MAY</bcp14>
    define which other fields are allowed in the request object.
    <bcp14>REQUIRED</bcp14>.</t>
        </dd>
      </dl>
      <t indent="0" pn="section-8-5">The value of the <tt>type</tt> field is under the control of the AS.
This field <bcp14>MUST</bcp14> be compared using an exact byte match of the string
value against known types by the AS.  The AS <bcp14>MUST</bcp14> ensure that there
is no collision between different authorization data types that it
supports. The AS <bcp14>MUST NOT</bcp14> do any collation or normalization of data
types during comparison. It is <bcp14>RECOMMENDED</bcp14> that designers of general-purpose
APIs use a URI for this field to avoid collisions between multiple
API types protected by a single AS.</t>
      <t indent="0" pn="section-8-6">While it is expected that many APIs will have their own properties,
this specification defines a set of common data fields that are designed to be
usable across different types of APIs. This specification does not require the
use of these common fields by an API definition but, instead, provides them as
reusable generic components for API designers to make use of. The allowable
values of all fields are determined by the API being protected, as defined
by a particular <tt>type</tt> value.</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-8-7">
        <dt pn="section-8-7.1"><tt>actions</tt> (array of strings):</dt>
        <dd pn="section-8-7.2">
          <t indent="0" pn="section-8-7.2.1">The types of actions the client instance will take at the RS as
          an array of strings (for example, a client instance asking for a
          combination of "read" and "write" access).</t>
        </dd>
        <dt pn="section-8-7.3"><tt>locations</tt> (array of strings):</dt>
        <dd pn="section-8-7.4">
          <t indent="0" pn="section-8-7.4.1">The location of the RS as an array of
  strings. These strings are typically URIs identifying the
  location of the RS.</t>
        </dd>
        <dt pn="section-8-7.5"><tt>datatypes</tt> (array of strings):</dt>
        <dd pn="section-8-7.6">
          <t indent="0" pn="section-8-7.6.1">The kinds of data available to the client instance at the RS's API as an
  array of strings (for example, a client instance asking for access to
  raw "image" data and "metadata" at a photograph API).</t>
        </dd>
        <dt pn="section-8-7.7"><tt>identifier</tt> (string):</dt>
        <dd pn="section-8-7.8">
          <t indent="0" pn="section-8-7.8.1">A string identifier indicating a specific resource at the RS
  (for example, a patient identifier for a medical API or
  a bank account number for a financial API).</t>
        </dd>
        <dt pn="section-8-7.9"><tt>privileges</tt> (array of strings):</dt>
        <dd pn="section-8-7.10">
          <t indent="0" pn="section-8-7.10.1">The types or levels of privilege being requested at the resource (for example, a client
  instance asking for administrative-level access or access when the RO
  is no longer online).</t>
        </dd>
      </dl>
      <t indent="0" pn="section-8-8">The following non-normative example describes three kinds of access (read, write, and delete) to each of
two different locations and two different data types (metadata and images) for a single access token
using the fictitious <tt>photo-api</tt> type definition.</t>
      <sourcecode type="json" markers="false" pn="section-8-9">
"access": [
    {
        "type": "photo-api",
        "actions": [
            "read",
            "write",
            "delete"
        ],
        "locations": [
            "https://server.example.net/",
            "https://resource.local/other"
        ],
        "datatypes": [
            "metadata",
            "images"
        ]
    }
]
</sourcecode>
      <t indent="0" pn="section-8-10">While the exact semantics of interpreting the fields of an access
request object are subject to the definition of the <tt>type</tt>,
it is expected that the access requested for each object in the array
is the cross-product of all fields of the object. That is to
say, the object represents a request for all <tt>actions</tt> listed
to be used at all <tt>locations</tt> listed for all possible <tt>datatypes</tt>
listed within the object. Assuming the request above was granted,
the client instance could assume that it
would be able to do a <tt>read</tt> action against the <tt>images</tt> on the first server
as well as a <tt>delete</tt> action on the <tt>metadata</tt> of the second server, or any other
combination of these fields, using the same access token.</t>
      <t indent="0" pn="section-8-11">To request a different combination of access,
such as requesting one of the possible <tt>actions</tt> against one of the possible <tt>locations</tt>
and a different choice of possible <tt>actions</tt> against a different one of the possible <tt>locations</tt>, the
client instance can include multiple separate objects in the <tt>resources</tt> array.
The total access rights for the resulting access
token are the union of all objects. The following non-normative example uses the same fictitious <tt>photo-api</tt>
type definition to request a single access token with more specifically
targeted access rights by using two discrete objects within the request.</t>
      <sourcecode type="json" markers="false" pn="section-8-12">
"access": [
    {
        "type": "photo-api",
        "actions": [
            "read"
        ],
        "locations": [
            "https://server.example.net/"
        ],
        "datatypes": [
            "images"
        ]
    },
    {
        "type": "photo-api",
        "actions": [
            "write",
            "delete"
        ],
        "locations": [
            "https://resource.local/other"
        ],
        "datatypes": [
            "metadata"
        ]
    }
]
</sourcecode>
      <t indent="0" pn="section-8-13">The access requested here is for <tt>read</tt> access to <tt>images</tt> on one server
as well as <tt>write</tt> and <tt>delete</tt> access for <tt>metadata</tt> on a different
server (importantly, without requesting <tt>write</tt> or <tt>delete</tt> access to <tt>images</tt> on the
first server).</t>
      <t indent="0" pn="section-8-14">It is anticipated that API designers will use a combination
of common fields defined in this specification as well as
fields specific to the API itself. The following non-normative
example shows the use of both common and API-specific fields as
part of two different fictitious API <tt>type</tt> values. The first
access request includes the <tt>actions</tt>, <tt>locations</tt>, and <tt>datatypes</tt>
fields specified here as well as the API-specific <tt>geolocation</tt>
field. The second access request includes the <tt>actions</tt> and
<tt>identifier</tt> fields specified here as well as the API-specific
<tt>currency</tt> field.</t>
      <sourcecode type="json" markers="false" pn="section-8-15">
"access": [
    {
        "type": "photo-api",
        "actions": [
            "read",
            "write"
        ],
        "locations": [
            "https://server.example.net/",
            "https://resource.local/other"
        ],
        "datatypes": [
            "metadata",
            "images"
        ],
        "geolocation": [
            { lat: -32.364, lng: 153.207 },
            { lat: -35.364, lng: 158.207 }
        ]
    },
    {
        "type": "financial-transaction",
        "actions": [
            "withdraw"
        ],
        "identifier": "account-14-32-32-3",
        "currency": "USD"
    }
]
</sourcecode>
      <t indent="0" pn="section-8-16">If this request is approved,
the resulting access token's access rights will be
the union of the requested types of access for each of the two APIs, just as above.</t>
      <section anchor="resource-access-reference" numbered="true" removeInRFC="false" toc="include" pn="section-8.1">
        <name slugifiedName="name-requesting-resources-by-ref">Requesting Resources by Reference</name>
        <t indent="0" pn="section-8.1-1">Instead of sending an object describing the requested resource (<xref target="resource-access-rights" format="default" sectionFormat="of" derivedContent="Section 8"> </xref>),
access rights <bcp14>MAY</bcp14> be communicated as a string known to
the AS representing the access being requested. Just like access rights communicated
as an object, access rights communicated as reference strings indicate a specific
access at a protected resource. In the following non-normative example,
three distinct resource access rights are being requested.</t>
        <sourcecode type="json" markers="false" pn="section-8.1-2">
"access": [
    "read", "dolphin-metadata", "some other thing"
]
</sourcecode>
        <t indent="0" pn="section-8.1-3">This value is opaque to the client instance and <bcp14>MAY</bcp14> be any
valid JSON string; therefore, it could include spaces, Unicode
characters, and properly escaped string sequences. However, in some
situations, the value is intended to be
seen and understood by the client software's developer. In such cases, the
API designer choosing any such human-readable strings <bcp14>SHOULD</bcp14> take steps
to ensure the string values are not easily confused by a developer,
such as by limiting the strings to easily disambiguated characters.</t>
        <t indent="0" pn="section-8.1-4">This functionality is similar in practice to OAuth 2.0's <tt>scope</tt> parameter <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>, where a single string
represents the set of access rights requested by the client instance. As such, the reference
string could contain any valid OAuth 2.0 scope value, as in <xref target="example-oauth2" format="default" sectionFormat="of" derivedContent="Appendix B.5"/>. Note that the reference
string here is not bound to the same character restrictions as OAuth 2.0's <tt>scope</tt> definition.</t>
        <t indent="0" pn="section-8.1-5">A single <tt>access</tt> array <bcp14>MAY</bcp14> include both object-type and
string-type resource items. In this non-normative example,
the client instance is requesting access to a <tt>photo-api</tt> and <tt>financial-transaction</tt> API type
as well as the reference values of <tt>read</tt>, <tt>dolphin-metadata</tt>, and <tt>some other thing</tt>.</t>
        <sourcecode type="json" markers="false" pn="section-8.1-6">
"access": [
    {
        "type": "photo-api",
        "actions": [
            "read",
            "write",
            "delete"
        ],
        "locations": [
            "https://server.example.net/",
            "https://resource.local/other"
        ],
        "datatypes": [
            "metadata",
            "images"
        ]
    },
    "read",
    "dolphin-metadata",
    {
        "type": "financial-transaction",
        "actions": [
            "withdraw"
        ],
        "identifier": "account-14-32-32-3",
        "currency": "USD"
    },
    "some other thing"
]
</sourcecode>
        <t indent="0" pn="section-8.1-7">The requested access is the union of all elements of the array, including both objects and
reference strings.</t>
        <t indent="0" pn="section-8.1-8">In order to facilitate the use of both object and reference strings to access the same
kind of APIs, the API designer can define a clear mapping between these forms.
One possible approach for choosing reference string values is to use the same value as the
<tt>type</tt> parameter from the fully specified object, with the API defining a set of default
behaviors in this case. For example, an API definition could declare the following string:</t>
        <sourcecode type="json" markers="false" pn="section-8.1-9">
"access": [
    "photo-api"
]
</sourcecode>
        <t indent="0" pn="section-8.1-10">As being equivalent to the following fully defined object:</t>
        <sourcecode type="json" markers="false" pn="section-8.1-11">
"access": [
    {
        "type": "photo-api",
        "actions": [ "read", "write", "delete" ],
        "datatypes": [ "metadata", "image" ]
    }
]
</sourcecode>
        <t indent="0" pn="section-8.1-12">The exact mechanisms for relating reference strings is up to the API designer. These are enforced
by the AS, and the details are out of scope for this specification.</t>
      </section>
    </section>
    <section anchor="discovery" numbered="true" removeInRFC="false" toc="include" pn="section-9">
      <name slugifiedName="name-discovery">Discovery</name>
      <t indent="0" pn="section-9-1">By design, GNAP minimizes the need for any pre-flight
discovery. To begin a request, the client instance only needs to know the grant endpoint of
the AS (a single URI) and which keys it will use to sign the request. Everything else
can be negotiated dynamically in the course of the protocol.</t>
      <t indent="0" pn="section-9-2">However, the AS can have limits on its allowed functionality. If the
client instance wants to optimize its calls to the AS before making a request, it <bcp14>MAY</bcp14>
send an HTTP OPTIONS request to the grant request endpoint to retrieve the
server's discovery information. The AS <bcp14>MUST</bcp14> respond with a JSON document with Content-Type
<tt>application/json</tt> containing a single object with the following fields:</t>
      <dl indent="3" newline="false" spacing="normal" pn="section-9-3">
        <dt pn="section-9-3.1"><tt>grant_request_endpoint</tt> (string):</dt>
        <dd pn="section-9-3.2">
          <t indent="0" pn="section-9-3.2.1">The location of the
  AS's grant request endpoint. The location <bcp14>MUST</bcp14> be an absolute URL <xref target="RFC3986" format="default" sectionFormat="of" derivedContent="RFC3986"/>
  with a scheme component (which <bcp14>MUST</bcp14> be "https"), a host component, and optionally
  port, path, and query components and no fragment components. This URL <bcp14>MUST</bcp14>
  match the URL the client instance used to make the discovery request.
  <bcp14>REQUIRED</bcp14>.</t>
        </dd>
        <dt pn="section-9-3.3"><tt>interaction_start_modes_supported</tt> (array of strings):</dt>
        <dd pn="section-9-3.4">
          <t indent="0" pn="section-9-3.4.1">A list of the AS's interaction start methods. The values of this list correspond to the
  possible values for the interaction start field of the request (<xref target="request-interact-start" format="default" sectionFormat="of" derivedContent="Section 2.5.1"> </xref>) and
  <bcp14>MUST</bcp14> be values from the "GNAP Interaction Start Modes" registry (<xref target="IANA-interaction-start-modes" format="default" sectionFormat="of" derivedContent="Section 10.9"> </xref>).
  <bcp14>OPTIONAL</bcp14>.</t>
        </dd>
        <dt pn="section-9-3.5"><tt>interaction_finish_methods_supported</tt> (array of strings):</dt>
        <dd pn="section-9-3.6">
          <t indent="0" pn="section-9-3.6.1">A list of the AS's interaction finish methods. The values of this list correspond to the
  possible values for the method element of the interaction finish field of the request  (<xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"> </xref>) and <bcp14>MUST</bcp14> be values from
  the "GNAP Interaction Finish Methods" registry (<xref target="IANA-interaction-finish-methods" format="default" sectionFormat="of" derivedContent="Section 10.10"> </xref>).
  <bcp14>OPTIONAL</bcp14>.</t>
        </dd>
        <dt pn="section-9-3.7"><tt>key_proofs_supported</tt> (array of strings):</dt>
        <dd pn="section-9-3.8">
          <t indent="0" pn="section-9-3.8.1">A list of the AS's supported key
  proofing mechanisms. The values of this list correspond to possible
  values of the <tt>proof</tt> field of the
  key section of the request (<xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"> </xref>) and <bcp14>MUST</bcp14> be values from the
  "GNAP Key Proofing Methods" registry (<xref target="IANA-key-proof-methods" format="default" sectionFormat="of" derivedContent="Section 10.16"> </xref>).
  <bcp14>OPTIONAL</bcp14>.</t>
        </dd>
        <dt pn="section-9-3.9"><tt>sub_id_formats_supported</tt> (array of strings):</dt>
        <dd pn="section-9-3.10">
          <t indent="0" pn="section-9-3.10.1">A list of the AS's supported Subject Identifier formats. The
          values of this list correspond to possible values of the Subject
          Identifier field of the
          request (<xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"> </xref>) and <bcp14>MUST</bcp14> be values from the "Subject
          Identifier Formats" registry <xref target="Subj-ID-Formats" format="default" sectionFormat="of" derivedContent="Subj-ID-Formats"/>.  <bcp14>OPTIONAL</bcp14>.</t>
        </dd>
        <dt pn="section-9-3.11"><tt>assertion_formats_supported</tt> (array of strings):</dt>
        <dd pn="section-9-3.12">
          <t indent="0" pn="section-9-3.12.1">A list of the AS's supported
  assertion formats. The values of this list correspond to possible
  values of the subject assertion field of the request (<xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"> </xref>) and <bcp14>MUST</bcp14>
  be values from the "GNAP Assertion Formats" registry (<xref target="IANA-assertion-formats" format="default" sectionFormat="of" derivedContent="Section 10.6"> </xref>).
  <bcp14>OPTIONAL</bcp14>.</t>
        </dd>
        <dt pn="section-9-3.13"><tt>key_rotation_supported</tt> (boolean):</dt>
        <dd pn="section-9-3.14">
          <t indent="0" pn="section-9-3.14.1">The boolean "true" indicates that rotation of access token bound keys by the client (<xref target="rotate-access-token-key" format="default" sectionFormat="of" derivedContent="Section 6.1.1"> </xref>) is supported by the AS.
  The absence of this field or a boolean "false" value indicates that this feature is not supported.</t>
        </dd>
      </dl>
      <t indent="0" pn="section-9-4">The information returned from this method is for optimization
purposes only. The AS <bcp14>MAY</bcp14> deny any request, or any portion of a request,
even if it lists a capability as supported. For example, if a given client instance
can be registered with the <tt>mtls</tt> key proofing
mechanism but the AS also returns other proofing methods from the discovery document, then the AS
will still deny a request from that client instance using a different proofing
mechanism. Similarly, an AS with <tt>key_rotation_supported</tt> set to "true" can still deny
any request for rotating any access token's key for a variety of reasons.</t>
      <t indent="0" pn="section-9-5">Additional fields can be defined in the "GNAP Authorization Server Discovery Fields" registry (<xref target="IANA-as-discovery" format="default" sectionFormat="of" derivedContent="Section 10.18"> </xref>).</t>
      <section anchor="rs-request-without-token" numbered="true" removeInRFC="false" toc="include" pn="section-9.1">
        <name slugifiedName="name-rs-first-method-of-as-disco">RS-First Method of AS Discovery</name>
        <t indent="0" pn="section-9.1-1">If the client instance calls an RS without an access token or with an invalid access token, the RS <bcp14>SHOULD</bcp14> be explicit about the fact that GNAP needs to be used to access the resource by responding with the WWW-Authenticate header field and a GNAP challenge.</t>
        <t indent="0" pn="section-9.1-2">In some situations, the client instance might want to know with which specific AS it needs to negotiate for access to that RS.
The RS <bcp14>MAY</bcp14> additionally return the following <bcp14>OPTIONAL</bcp14> parameters:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-9.1-3">
          <dt pn="section-9.1-3.1"><tt>as_uri</tt>:</dt>
          <dd pn="section-9.1-3.2">
            <t indent="0" pn="section-9.1-3.2.1">The URI of the grant endpoint of the GNAP AS. Used by the client instance to call the AS to request an access token.</t>
          </dd>
          <dt pn="section-9.1-3.3"><tt>referrer</tt>:</dt>
          <dd pn="section-9.1-3.4">
            <t indent="0" pn="section-9.1-3.4.1">The URI of the GNAP RS. Sent by the client instance in the Referer header as part of the grant request.</t>
          </dd>
          <dt pn="section-9.1-3.5"><tt>access</tt>:</dt>
          <dd pn="section-9.1-3.6">
            <t indent="0" pn="section-9.1-3.6.1">An opaque access reference as defined in <xref target="resource-access-reference" format="default" sectionFormat="of" derivedContent="Section 8.1"/>.
  <bcp14>MUST</bcp14> be sufficient for at least the action the client instance was attempting to take at the RS and <bcp14>MAY</bcp14> allow additional access rights as well.
  Sent by the client as an access right in the grant request.</t>
          </dd>
        </dl>
        <t indent="0" pn="section-9.1-4">The client instance <bcp14>SHOULD</bcp14> then use both the <tt>referrer</tt> and <tt>access</tt> parameters in its access token request. The client instance <bcp14>MUST</bcp14> check that the <tt>referrer</tt> parameter is equal to the URI of the RS using the simple string comparison method in <xref section="6.2.1" sectionFormat="of" target="RFC3986" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3986#section-6.2.1" derivedContent="RFC3986"/>.</t>
        <t indent="0" pn="section-9.1-5">The means for the RS to determine the value for the <tt>access</tt> reference are out of scope of this specification, but some dynamic methods are discussed in
<xref target="I-D.ietf-gnap-resource-servers" format="default" sectionFormat="of" derivedContent="GNAP-RS"/>.</t>
        <t indent="0" pn="section-9.1-6">When receiving the following response from the RS:</t>
        <sourcecode type="http-message" markers="false" pn="section-9.1-7">
NOTE: '\' line wrapping per RFC 8792

WWW-Authenticate: \
  GNAP as_uri=https://as.example/tx\
  ;access=FWWIKYBQ6U56NL1\
  ;referrer=https://rs.example
</sourcecode>
        <t indent="0" pn="section-9.1-8">The client instance then makes a request to the <tt>as_uri</tt> as described in <xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"/>, with the value of <tt>referrer</tt> passed as an HTTP Referer header field and the <tt>access</tt> reference passed unchanged into the <tt>access</tt> array in the <tt>access_token</tt> portion of the request. The client instance <bcp14>MAY</bcp14> request additional resources and other information.</t>
        <t indent="0" pn="section-9.1-9">In the following non-normative example, the client instance is requesting a single access token using the opaque access reference <tt>FWWIKYBQ6U56NL1</tt> received from the RS in addition to the <tt>dolphin-metadata</tt> that the client instance has been configured with out of band.</t>
        <sourcecode type="http-message" markers="false" pn="section-9.1-10">
POST /tx HTTP/1.1
Host: as.example
Referer: https://rs.example/resource
Content-Type: application/json
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            "FWWIKYBQ6U56NL1",
            "dolphin-metadata"
        ]
    },
    "client": "KHRS6X63AJ7C7C4AZ9AO"
}
</sourcecode>
        <t indent="0" pn="section-9.1-11">The client instance includes the Referer header field as a way for the AS to know that the process is initiated through a discovery process at the RS.</t>
        <t indent="0" pn="section-9.1-12">If issued, the resulting access token would contain sufficient access to be used at both referenced resources.</t>
        <t indent="0" pn="section-9.1-13">Security considerations, especially related to the potential of a compromised RS (<xref target="security-compromised-rs" format="default" sectionFormat="of" derivedContent="Section 11.37"> </xref>) redirecting the requests of an otherwise properly authenticated client, need to be carefully considered when allowing such a discovery process. This risk can be mitigated by an alternative pre-registration process so that the client knows which AS protects which RS. There are also privacy considerations related to revealing which AS is protecting a given resource; these are discussed in <xref target="privacy-correlation-client" format="default" sectionFormat="of" derivedContent="Section 12.4.1"/>.</t>
      </section>
      <section anchor="grant-discovery" numbered="true" removeInRFC="false" toc="include" pn="section-9.2">
        <name slugifiedName="name-dynamic-grant-endpoint-disc">Dynamic Grant Endpoint Discovery</name>
        <t indent="0" pn="section-9.2-1">Additional methods of discovering the appropriate grant endpoint for a given application
are outside the scope of this specification. This limitation is intentional, as many applications
rely on static configuration between the client instance and AS, as is common in OAuth 2.0.
However, the dynamic nature of GNAP makes it a prime candidate for other extensions defining methods
for discovery of the appropriate AS grant endpoint at runtime. Advanced use cases could define
contextual methods for securely providing this endpoint to the client instance.
Furthermore, GNAP's design intentionally requires the client instance to only know the grant
endpoint and not additional parameters, since other functions and values can be disclosed
and negotiated during the grant process.</t>
      </section>
    </section>
    <section anchor="IANA" numbered="true" removeInRFC="false" toc="include" pn="section-10">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-10-1">IANA has added values to existing registries as well as created 16 registries for GNAP <xref target="GNAP-REG" format="default" sectionFormat="of" derivedContent="GNAP-REG"/> and populated those registries with initial values as described in this section.</t>
      <t indent="0" pn="section-10-2">All use of value typing is based on data types in <xref target="RFC8259" format="default" sectionFormat="of" derivedContent="RFC8259"/> and <bcp14>MUST</bcp14> be one of the following: number, object, string, boolean, or array. When the type is array, the contents of the array <bcp14>MUST</bcp14> be specified, as in "array of objects" when one subtype is allowed or "array of strings/objects" when multiple simultaneous subtypes are allowed. When the type is object, the structure of the object <bcp14>MUST</bcp14> be specified in the definition. If a parameter is available in different types, each type <bcp14>SHOULD</bcp14> be registered separately.</t>
      <t indent="0" pn="section-10-3">General guidance for extension parameters is found in <xref target="extensions" format="default" sectionFormat="of" derivedContent="Appendix D"/>.</t>
      <section anchor="http-authentication-scheme-registration" numbered="true" removeInRFC="false" toc="include" pn="section-10.1">
        <name slugifiedName="name-http-authentication-scheme-">HTTP Authentication Scheme Registration</name>
        <t indent="0" pn="section-10.1-1">IANA has registered of the following scheme in the
"HTTP Authentication Schemes" registry <xref target="Auth-Schemes" format="default" sectionFormat="of" derivedContent="Auth-Schemes"/> defined in <xref section="18.5" sectionFormat="of" target="RFC9110" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9110#section-18.5" derivedContent="HTTP"/>:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-10.1-2">
          <dt pn="section-10.1-2.1">Authentication Scheme Name:</dt>
          <dd pn="section-10.1-2.2">GNAP</dd>
          <dt pn="section-10.1-2.3">Reference:</dt>
          <dd pn="section-10.1-2.4">
            <xref target="use-access-token" format="default" sectionFormat="of" derivedContent="Section 7.2"/> of RFC 9635</dd>
        </dl>
      </section>
      <section anchor="media-type-registration" numbered="true" removeInRFC="false" toc="include" pn="section-10.2">
        <name slugifiedName="name-media-type-registration">Media Type Registration</name>
        <t indent="0" pn="section-10.2-1">Per this section, IANA has registered the following media types <xref target="RFC2046" format="default" sectionFormat="of" derivedContent="RFC2046"/> in
the "Media Types" registry <xref target="MediaTypes" format="default" sectionFormat="of" derivedContent="MediaTypes"/> as described
in <xref target="RFC6838" format="default" sectionFormat="of" derivedContent="RFC6838"/>.</t>
        <section anchor="media-type-reg1" numbered="true" removeInRFC="false" toc="include" pn="section-10.2.1">
          <name slugifiedName="name-application-gnap-binding-jw">application/gnap-binding-jwsd</name>
          <t indent="0" pn="section-10.2.1-1">This media type indicates that the content is a GNAP message to be bound with a detached JWS mechanism.</t>
          <dl spacing="normal" indent="3" newline="false" pn="section-10.2.1-2">
            <dt pn="section-10.2.1-2.1">Type name:</dt>
            <dd pn="section-10.2.1-2.2">application</dd>
            <dt pn="section-10.2.1-2.3">Subtype name:</dt>
            <dd pn="section-10.2.1-2.4">gnap-binding-jwsd</dd>
            <dt pn="section-10.2.1-2.5">Required parameters:</dt>
            <dd pn="section-10.2.1-2.6">N/A</dd>
            <dt pn="section-10.2.1-2.7">Optional parameters:</dt>
            <dd pn="section-10.2.1-2.8">N/A</dd>
            <dt pn="section-10.2.1-2.9">Encoding considerations:</dt>
            <dd pn="section-10.2.1-2.10">binary</dd>
            <dt pn="section-10.2.1-2.11">Security considerations:</dt>
            <dd pn="section-10.2.1-2.12">See <xref target="security" format="default" sectionFormat="of" derivedContent="Section 11"/> of RFC 9635.</dd>
            <dt pn="section-10.2.1-2.13">Interoperability considerations:</dt>
            <dd pn="section-10.2.1-2.14">N/A</dd>
            <dt pn="section-10.2.1-2.15">Published specification:</dt>
            <dd pn="section-10.2.1-2.16">RFC 9635</dd>
            <dt pn="section-10.2.1-2.17">Applications that use this media type:</dt>
            <dd pn="section-10.2.1-2.18">GNAP</dd>
            <dt pn="section-10.2.1-2.19">Fragment identifier considerations:</dt>
            <dd pn="section-10.2.1-2.20">N/A</dd>
            <dt pn="section-10.2.1-2.21">Additional information:</dt>
            <dd pn="section-10.2.1-2.22">
              <t indent="0" pn="section-10.2.1-2.22.1"><br/></t>
              <dl spacing="compact" indent="3" newline="false" pn="section-10.2.1-2.22.2">
                <dt pn="section-10.2.1-2.22.2.1">Deprecated alias names for this type:</dt>
                <dd pn="section-10.2.1-2.22.2.2">N/A</dd>
                <dt pn="section-10.2.1-2.22.2.3">Magic number(s):</dt>
                <dd pn="section-10.2.1-2.22.2.4">N/A</dd>
                <dt pn="section-10.2.1-2.22.2.5">File extension(s):</dt>
                <dd pn="section-10.2.1-2.22.2.6">N/A</dd>
                <dt pn="section-10.2.1-2.22.2.7">Macintosh file type code(s):</dt>
                <dd pn="section-10.2.1-2.22.2.8">N/A</dd>
              </dl>
            </dd>
            <dt pn="section-10.2.1-2.23">Person &amp; email address to contact for further information:</dt>
            <dd pn="section-10.2.1-2.24">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.1-2.25">Intended usage:</dt>
            <dd pn="section-10.2.1-2.26">COMMON</dd>
            <dt pn="section-10.2.1-2.27">Restrictions on usage:</dt>
            <dd pn="section-10.2.1-2.28">none</dd>
            <dt pn="section-10.2.1-2.29">Author:</dt>
            <dd pn="section-10.2.1-2.30">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.1-2.31">Change Controller:</dt>
            <dd pn="section-10.2.1-2.32">IETF</dd>
          </dl>
        </section>
        <section anchor="media-type-reg2" numbered="true" removeInRFC="false" toc="include" pn="section-10.2.2">
          <name slugifiedName="name-application-gnap-binding-jws">application/gnap-binding-jws</name>
          <t indent="0" pn="section-10.2.2-1">This media type indicates that the content is a GNAP message to be bound with an attached JWS mechanism.</t>
          <dl spacing="normal" indent="3" newline="false" pn="section-10.2.2-2">
            <dt pn="section-10.2.2-2.1">Type name:</dt>
            <dd pn="section-10.2.2-2.2">application</dd>
            <dt pn="section-10.2.2-2.3">Subtype name:</dt>
            <dd pn="section-10.2.2-2.4">gnap-binding-jws</dd>
            <dt pn="section-10.2.2-2.5">Required parameters:</dt>
            <dd pn="section-10.2.2-2.6">N/A</dd>
            <dt pn="section-10.2.2-2.7">Optional parameters:</dt>
            <dd pn="section-10.2.2-2.8">N/A</dd>
            <dt pn="section-10.2.2-2.9">Encoding considerations:</dt>
            <dd pn="section-10.2.2-2.10">binary</dd>
            <dt pn="section-10.2.2-2.11">Security considerations:</dt>
            <dd pn="section-10.2.2-2.12">See <xref target="security" format="default" sectionFormat="of" derivedContent="Section 11"/> of RFC 9635.</dd>
            <dt pn="section-10.2.2-2.13">Interoperability considerations:</dt>
            <dd pn="section-10.2.2-2.14">N/A</dd>
            <dt pn="section-10.2.2-2.15">Published specification:</dt>
            <dd pn="section-10.2.2-2.16">RFC 9635</dd>
            <dt pn="section-10.2.2-2.17">Applications that use this media type:</dt>
            <dd pn="section-10.2.2-2.18">GNAP</dd>
            <dt pn="section-10.2.2-2.19">Fragment identifier considerations:</dt>
            <dd pn="section-10.2.2-2.20">N/A</dd>
            <dt pn="section-10.2.2-2.21">Additional information:</dt>
            <dd pn="section-10.2.2-2.22">
              <t indent="0" pn="section-10.2.2-2.22.1"><br/></t>
              <dl spacing="compact" indent="3" newline="false" pn="section-10.2.2-2.22.2">
                <dt pn="section-10.2.2-2.22.2.1">Deprecated alias names for this type:</dt>
                <dd pn="section-10.2.2-2.22.2.2">N/A</dd>
                <dt pn="section-10.2.2-2.22.2.3">Magic number(s):</dt>
                <dd pn="section-10.2.2-2.22.2.4">N/A</dd>
                <dt pn="section-10.2.2-2.22.2.5">File extension(s):</dt>
                <dd pn="section-10.2.2-2.22.2.6">N/A</dd>
                <dt pn="section-10.2.2-2.22.2.7">Macintosh file type code(s):</dt>
                <dd pn="section-10.2.2-2.22.2.8">N/A</dd>
              </dl>
            </dd>
            <dt pn="section-10.2.2-2.23">Person &amp; email address to contact for further information:</dt>
            <dd pn="section-10.2.2-2.24">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.2-2.25">Intended usage:</dt>
            <dd pn="section-10.2.2-2.26">COMMON</dd>
            <dt pn="section-10.2.2-2.27">Restrictions on usage:</dt>
            <dd pn="section-10.2.2-2.28">none</dd>
            <dt pn="section-10.2.2-2.29">Author:</dt>
            <dd pn="section-10.2.2-2.30">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.2-2.31">Change Controller:</dt>
            <dd pn="section-10.2.2-2.32">IETF</dd>
          </dl>
        </section>
        <section anchor="media-type-reg3" numbered="true" removeInRFC="false" toc="include" pn="section-10.2.3">
          <name slugifiedName="name-application-gnap-binding-ro">application/gnap-binding-rotation-jwsd</name>
          <t indent="0" pn="section-10.2.3-1">This media type indicates that the content is a GNAP token rotation message to be bound with a detached JWS mechanism.</t>
          <dl spacing="normal" indent="3" newline="false" pn="section-10.2.3-2">
            <dt pn="section-10.2.3-2.1">Type name:</dt>
            <dd pn="section-10.2.3-2.2">application</dd>
            <dt pn="section-10.2.3-2.3">Subtype name:</dt>
            <dd pn="section-10.2.3-2.4">gnap-binding-rotation-jwsd</dd>
            <dt pn="section-10.2.3-2.5">Required parameters:</dt>
            <dd pn="section-10.2.3-2.6">N/A</dd>
            <dt pn="section-10.2.3-2.7">Optional parameters:</dt>
            <dd pn="section-10.2.3-2.8">N/A</dd>
            <dt pn="section-10.2.3-2.9">Encoding considerations:</dt>
            <dd pn="section-10.2.3-2.10">binary</dd>
            <dt pn="section-10.2.3-2.11">Security considerations:</dt>
            <dd pn="section-10.2.3-2.12">See <xref target="security" format="default" sectionFormat="of" derivedContent="Section 11"/> of RFC 9635.</dd>
            <dt pn="section-10.2.3-2.13">Interoperability considerations:</dt>
            <dd pn="section-10.2.3-2.14">N/A</dd>
            <dt pn="section-10.2.3-2.15">Published specification:</dt>
            <dd pn="section-10.2.3-2.16">RFC 9635</dd>
            <dt pn="section-10.2.3-2.17">Applications that use this media type:</dt>
            <dd pn="section-10.2.3-2.18">GNAP</dd>
            <dt pn="section-10.2.3-2.19">Fragment identifier considerations:</dt>
            <dd pn="section-10.2.3-2.20">N/A</dd>
            <dt pn="section-10.2.3-2.21">Additional information:</dt>
            <dd pn="section-10.2.3-2.22">
              <t indent="0" pn="section-10.2.3-2.22.1"><br/></t>
              <dl spacing="compact" indent="3" newline="false" pn="section-10.2.3-2.22.2">
                <dt pn="section-10.2.3-2.22.2.1">Deprecated alias names for this type:</dt>
                <dd pn="section-10.2.3-2.22.2.2">N/A</dd>
                <dt pn="section-10.2.3-2.22.2.3">Magic number(s):</dt>
                <dd pn="section-10.2.3-2.22.2.4">N/A</dd>
                <dt pn="section-10.2.3-2.22.2.5">File extension(s):</dt>
                <dd pn="section-10.2.3-2.22.2.6">N/A</dd>
                <dt pn="section-10.2.3-2.22.2.7">Macintosh file type code(s):</dt>
                <dd pn="section-10.2.3-2.22.2.8">N/A</dd>
              </dl>
            </dd>
            <dt pn="section-10.2.3-2.23">Person &amp; email address to contact for further information:</dt>
            <dd pn="section-10.2.3-2.24">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.3-2.25">Intended usage:</dt>
            <dd pn="section-10.2.3-2.26">COMMON</dd>
            <dt pn="section-10.2.3-2.27">Restrictions on usage:</dt>
            <dd pn="section-10.2.3-2.28">none</dd>
            <dt pn="section-10.2.3-2.29">Author:</dt>
            <dd pn="section-10.2.3-2.30">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.3-2.31">Change Controller:</dt>
            <dd pn="section-10.2.3-2.32">IETF</dd>
          </dl>
        </section>
        <section anchor="media-type-reg4" numbered="true" removeInRFC="false" toc="include" pn="section-10.2.4">
          <name slugifiedName="name-application-gnap-binding-rot">application/gnap-binding-rotation-jws</name>
          <t indent="0" pn="section-10.2.4-1">This media type indicates that the content is a GNAP token rotation message to be bound with an attached JWS mechanism.</t>
          <dl spacing="normal" indent="3" newline="false" pn="section-10.2.4-2">
            <dt pn="section-10.2.4-2.1">Type name:</dt>
            <dd pn="section-10.2.4-2.2">application</dd>
            <dt pn="section-10.2.4-2.3">Subtype name:</dt>
            <dd pn="section-10.2.4-2.4">gnap-binding-rotation-jws</dd>
            <dt pn="section-10.2.4-2.5">Required parameters:</dt>
            <dd pn="section-10.2.4-2.6">N/A</dd>
            <dt pn="section-10.2.4-2.7">Optional parameters:</dt>
            <dd pn="section-10.2.4-2.8">N/A</dd>
            <dt pn="section-10.2.4-2.9">Encoding considerations:</dt>
            <dd pn="section-10.2.4-2.10">binary</dd>
            <dt pn="section-10.2.4-2.11">Security considerations:</dt>
            <dd pn="section-10.2.4-2.12">See <xref target="security" format="default" sectionFormat="of" derivedContent="Section 11"/> of RFC 9635.</dd>
            <dt pn="section-10.2.4-2.13">Interoperability considerations:</dt>
            <dd pn="section-10.2.4-2.14">N/A</dd>
            <dt pn="section-10.2.4-2.15">Published specification:</dt>
            <dd pn="section-10.2.4-2.16">RFC 9635</dd>
            <dt pn="section-10.2.4-2.17">Applications that use this media type:</dt>
            <dd pn="section-10.2.4-2.18">GNAP</dd>
            <dt pn="section-10.2.4-2.19">Fragment identifier considerations:</dt>
            <dd pn="section-10.2.4-2.20">N/A</dd>
            <dt pn="section-10.2.4-2.21">Additional information:</dt>
            <dd pn="section-10.2.4-2.22">
              <t indent="0" pn="section-10.2.4-2.22.1"><br/></t>
              <dl spacing="compact" indent="3" newline="false" pn="section-10.2.4-2.22.2">
                <dt pn="section-10.2.4-2.22.2.1">Deprecated alias names for this type:</dt>
                <dd pn="section-10.2.4-2.22.2.2">N/A</dd>
                <dt pn="section-10.2.4-2.22.2.3">Magic number(s):</dt>
                <dd pn="section-10.2.4-2.22.2.4">N/A</dd>
                <dt pn="section-10.2.4-2.22.2.5">File extension(s):</dt>
                <dd pn="section-10.2.4-2.22.2.6">N/A</dd>
                <dt pn="section-10.2.4-2.22.2.7">Macintosh file type code(s):</dt>
                <dd pn="section-10.2.4-2.22.2.8">N/A</dd>
              </dl>
            </dd>
            <dt pn="section-10.2.4-2.23">Person &amp; email address to contact for further information:</dt>
            <dd pn="section-10.2.4-2.24">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.4-2.25">Intended usage:</dt>
            <dd pn="section-10.2.4-2.26">COMMON</dd>
            <dt pn="section-10.2.4-2.27">Restrictions on usage:</dt>
            <dd pn="section-10.2.4-2.28">none</dd>
            <dt pn="section-10.2.4-2.29">Author:</dt>
            <dd pn="section-10.2.4-2.30">IETF GNAP Working Group (txauth@ietf.org)</dd>
            <dt pn="section-10.2.4-2.31">Change Controller:</dt>
            <dd pn="section-10.2.4-2.32">IETF</dd>
          </dl>
        </section>
      </section>
      <section anchor="IANA-grant-request" numbered="true" removeInRFC="false" toc="include" pn="section-10.3">
        <name slugifiedName="name-gnap-grant-request-paramete">GNAP Grant Request Parameters</name>
        <t indent="0" pn="section-10.3-1">This document defines a GNAP grant request, for which IANA has created and maintains a new registry titled "GNAP Grant Request Parameters". Initial values for this registry are given in <xref target="IANA-grant-request-contents" format="default" sectionFormat="of" derivedContent="Section 10.3.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.3-2">The designated expert (DE) is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.3-3">
          <li pn="section-10.3-3.1">All registrations follow the template presented in <xref target="IANA-grant-request-template" format="default" sectionFormat="of" derivedContent="Section 10.3.1"/>.</li>
          <li pn="section-10.3-3.2">The request parameter's definition is sufficiently orthogonal to existing functionality provided by existing parameters.</li>
          <li pn="section-10.3-3.3">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
          <li pn="section-10.3-3.4">The request parameter's definition specifies the expected behavior of the AS in response to the request parameter for each potential state of the grant request.</li>
        </ul>
        <section anchor="IANA-grant-request-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.3.1">
          <name slugifiedName="name-registration-template">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.3.1-1">
            <dt pn="section-10.3.1-1.1">Name:</dt>
            <dd pn="section-10.3.1-1.2">
              <t indent="0" pn="section-10.3.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.3.1-1.3">Type:</dt>
            <dd pn="section-10.3.1-1.4">
              <t indent="0" pn="section-10.3.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.3.1-1.5">Reference:</dt>
            <dd pn="section-10.3.1-1.6">
              <t indent="0" pn="section-10.3.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-grant-request-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.3.2">
          <name slugifiedName="name-initial-contents">Initial Contents</name>
          <table align="center" pn="table-1">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">access_token</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-token-single" format="default" sectionFormat="of" derivedContent="Section 2.1.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">access_token</td>
                <td align="left" colspan="1" rowspan="1">array of objects</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-token-multiple" format="default" sectionFormat="of" derivedContent="Section 2.1.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">subject</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">client</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">client</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-instance" format="default" sectionFormat="of" derivedContent="Section 2.3.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">user</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-user" format="default" sectionFormat="of" derivedContent="Section 2.4"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">user</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-user-reference" format="default" sectionFormat="of" derivedContent="Section 2.4.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">interact</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact" format="default" sectionFormat="of" derivedContent="Section 2.5"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">interact_ref</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="continue-after-interaction" format="default" sectionFormat="of" derivedContent="Section 5.1"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-token-flags" numbered="true" removeInRFC="false" toc="include" pn="section-10.4">
        <name slugifiedName="name-gnap-access-token-flags">GNAP Access Token Flags</name>
        <t indent="0" pn="section-10.4-1">This document defines GNAP access token flags, for which IANA has created and maintains a new registry titled "GNAP Access Token Flags". Initial values for this registry are given in <xref target="IANA-token-flags-contents" format="default" sectionFormat="of" derivedContent="Section 10.4.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.4-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.4-3">
          <li pn="section-10.4-3.1">All registrations follow the template presented in <xref target="IANA-token-flags-template" format="default" sectionFormat="of" derivedContent="Section 10.4.1"/>.</li>
          <li pn="section-10.4-3.2">The flag specifies whether it applies to requests for tokens to the AS, responses with tokens from the AS, or both.</li>
        </ul>
        <section anchor="IANA-token-flags-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.4.1">
          <name slugifiedName="name-registration-template-2">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.4.1-1">
            <dt pn="section-10.4.1-1.1">Name:</dt>
            <dd pn="section-10.4.1-1.2">
              <t indent="0" pn="section-10.4.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.4.1-1.3">Allowed Use:</dt>
            <dd pn="section-10.4.1-1.4">
              <t indent="0" pn="section-10.4.1-1.4.1">Where the flag is allowed to occur. Possible values are
  "Request", "Response", and "Request, Response".</t>
            </dd>
            <dt pn="section-10.4.1-1.5">Reference:</dt>
            <dd pn="section-10.4.1-1.6">
              <t indent="0" pn="section-10.4.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-token-flags-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.4.2">
          <name slugifiedName="name-initial-contents-2">Initial Contents</name>
          <table align="center" pn="table-2">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Allowed Use</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">bearer</td>
                <td align="left" colspan="1" rowspan="1">Request, Response</td>
                <td align="left" colspan="1" rowspan="1">
                  Sections <xref target="request-token-single" format="counter" sectionFormat="of" derivedContent="2.1.1"/> and <xref target="response-token-single" format="counter" sectionFormat="of" derivedContent="3.2.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">durable</td>
                <td align="left" colspan="1" rowspan="1">Response</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-subject-request" numbered="true" removeInRFC="false" toc="include" pn="section-10.5">
        <name slugifiedName="name-gnap-subject-information-re">GNAP Subject Information Request Fields</name>
        <t indent="0" pn="section-10.5-1">This document defines a means to request subject information from the AS to the client instance, for which IANA has created and maintains a new registry titled "GNAP Subject Information Request Fields". Initial values for this registry are given in <xref target="IANA-subject-request-contents" format="default" sectionFormat="of" derivedContent="Section 10.5.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.5-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.5-3">
          <li pn="section-10.5-3.1">All registrations follow the template presented in <xref target="IANA-subject-request-template" format="default" sectionFormat="of" derivedContent="Section 10.5.1"/>.</li>
          <li pn="section-10.5-3.2">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
        </ul>
        <section anchor="IANA-subject-request-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.5.1">
          <name slugifiedName="name-registration-template-3">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.5.1-1">
            <dt pn="section-10.5.1-1.1">Name:</dt>
            <dd pn="section-10.5.1-1.2">
              <t indent="0" pn="section-10.5.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.5.1-1.3">Type:</dt>
            <dd pn="section-10.5.1-1.4">
              <t indent="0" pn="section-10.5.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.5.1-1.5">Reference:</dt>
            <dd pn="section-10.5.1-1.6">
              <t indent="0" pn="section-10.5.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-subject-request-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.5.2">
          <name slugifiedName="name-initial-contents-3">Initial Contents</name>
          <table align="center" pn="table-3">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">sub_id_formats</td>
                <td align="left" colspan="1" rowspan="1">array of strings</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">assertion_formats</td>
                <td align="left" colspan="1" rowspan="1">array of strings</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">sub_ids</td>
                <td align="left" colspan="1" rowspan="1">array of objects</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-assertion-formats" numbered="true" removeInRFC="false" toc="include" pn="section-10.6">
        <name slugifiedName="name-gnap-assertion-formats">GNAP Assertion Formats</name>
        <t indent="0" pn="section-10.6-1">This document defines a means to pass identity assertions between the AS and client instance, for which IANA has created and maintains a new registry titled "GNAP Assertion Formats". Initial values for this registry are given in <xref target="IANA-assertion-formats-contents" format="default" sectionFormat="of" derivedContent="Section 10.6.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.6-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.6-3">
          <li pn="section-10.6-3.1">All registrations follow the template presented in <xref target="IANA-assertion-formats-template" format="default" sectionFormat="of" derivedContent="Section 10.6.1"/>.</li>
          <li pn="section-10.6-3.2">The definition specifies the serialization format of the assertion value as used within GNAP.</li>
        </ul>
        <section anchor="IANA-assertion-formats-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.6.1">
          <name slugifiedName="name-registration-template-4">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.6.1-1">
            <dt pn="section-10.6.1-1.1">Name:</dt>
            <dd pn="section-10.6.1-1.2">
              <t indent="0" pn="section-10.6.1-1.2.1">An identifier for the assertion format.</t>
            </dd>
            <dt pn="section-10.6.1-1.3">Reference:</dt>
            <dd pn="section-10.6.1-1.4">
              <t indent="0" pn="section-10.6.1-1.4.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-assertion-formats-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.6.2">
          <name slugifiedName="name-initial-contents-4">Initial Contents</name>
          <table align="center" pn="table-4">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">id_token</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="assertion-formats" format="default" sectionFormat="of" derivedContent="Section 3.4.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">saml2</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="assertion-formats" format="default" sectionFormat="of" derivedContent="Section 3.4.1"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-client-instance" numbered="true" removeInRFC="false" toc="include" pn="section-10.7">
        <name slugifiedName="name-gnap-client-instance-fields">GNAP Client Instance Fields</name>
        <t indent="0" pn="section-10.7-1">This document defines a means to send information about the client instance, for which IANA has created and maintains a new registry titled "GNAP Client Instance Fields". Initial values for this registry are given in <xref target="IANA-client-instance-contents" format="default" sectionFormat="of" derivedContent="Section 10.7.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.7-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.7-3">
          <li pn="section-10.7-3.1">All registrations follow the template presented in <xref target="IANA-client-instance-template" format="default" sectionFormat="of" derivedContent="Section 10.7.1"/>.</li>
          <li pn="section-10.7-3.2">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
        </ul>
        <section anchor="IANA-client-instance-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.7.1">
          <name slugifiedName="name-registration-template-5">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.7.1-1">
            <dt pn="section-10.7.1-1.1">Name:</dt>
            <dd pn="section-10.7.1-1.2">
              <t indent="0" pn="section-10.7.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.7.1-1.3">Type:</dt>
            <dd pn="section-10.7.1-1.4">
              <t indent="0" pn="section-10.7.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.7.1-1.5">Reference:</dt>
            <dd pn="section-10.7.1-1.6">
              <t indent="0" pn="section-10.7.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-client-instance-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.7.2">
          <name slugifiedName="name-initial-contents-5">Initial Contents</name>
          <table align="center" pn="table-5">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">key</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">key</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="key-reference" format="default" sectionFormat="of" derivedContent="Section 7.1.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">class_id</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-client" format="default" sectionFormat="of" derivedContent="Section 2.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">display</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-display" format="default" sectionFormat="of" derivedContent="Section 2.3.2"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-client-instance-display" numbered="true" removeInRFC="false" toc="include" pn="section-10.8">
        <name slugifiedName="name-gnap-client-instance-displa">GNAP Client Instance Display Fields</name>
        <t indent="0" pn="section-10.8-1">This document defines a means to send end-user-facing displayable information about the client instance, for which IANA has created and maintains a new registry titled "GNAP Client Instance Display Fields". Initial values for this registry are given in <xref target="IANA-client-instance-display-contents" format="default" sectionFormat="of" derivedContent="Section 10.8.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.8-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.8-3">
          <li pn="section-10.8-3.1">All registrations follow the template presented in <xref target="IANA-client-instance-display-template" format="default" sectionFormat="of" derivedContent="Section 10.8.1"/>.</li>
          <li pn="section-10.8-3.2">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
        </ul>
        <section anchor="IANA-client-instance-display-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.8.1">
          <name slugifiedName="name-registration-template-6">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.8.1-1">
            <dt pn="section-10.8.1-1.1">Name:</dt>
            <dd pn="section-10.8.1-1.2">
              <t indent="0" pn="section-10.8.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.8.1-1.3">Type:</dt>
            <dd pn="section-10.8.1-1.4">
              <t indent="0" pn="section-10.8.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.8.1-1.5">Reference:</dt>
            <dd pn="section-10.8.1-1.6">
              <t indent="0" pn="section-10.8.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-client-instance-display-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.8.2">
          <name slugifiedName="name-initial-contents-6">Initial Contents</name>
          <table align="center" pn="table-6">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">name</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-display" format="default" sectionFormat="of" derivedContent="Section 2.3.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">uri</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-display" format="default" sectionFormat="of" derivedContent="Section 2.3.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">logo_uri</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-display" format="default" sectionFormat="of" derivedContent="Section 2.3.2"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-interaction-start-modes" numbered="true" removeInRFC="false" toc="include" pn="section-10.9">
        <name slugifiedName="name-gnap-interaction-start-mode">GNAP Interaction Start Modes</name>
        <t indent="0" pn="section-10.9-1">This document defines a means for the client instance to begin interaction between the end user and the AS, for which IANA has created and maintains a new registry titled "GNAP Interaction Start Modes". Initial values for this registry are given in <xref target="IANA-interaction-start-modes-contents" format="default" sectionFormat="of" derivedContent="Section 10.9.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.9-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.9-3">
          <li pn="section-10.9-3.1">All registrations follow the template presented in <xref target="IANA-interaction-start-modes-template" format="default" sectionFormat="of" derivedContent="Section 10.9.1"/>.</li>
          <li pn="section-10.9-3.2">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
          <li pn="section-10.9-3.3">Any registration using an "object" type declares all additional parameters, their optionality, and their purpose.</li>
          <li pn="section-10.9-3.4">The start mode clearly defines what actions the client is expected to take to begin interaction, what the expected user experience is, and any security considerations for this communication from either party.</li>
          <li pn="section-10.9-3.5">The start mode documents incompatibilities with other start modes or finish methods, if applicable.</li>
          <li pn="section-10.9-3.6">The start mode provides enough information to uniquely identify the grant request during the interaction. For example, in the <tt>redirect</tt> and <tt>app</tt> modes, this is done using a unique URI (including its parameters). In the <tt>user_code</tt> and <tt>user_code_uri</tt> modes, this is done using the value of the user code.</li>
        </ul>
        <section anchor="IANA-interaction-start-modes-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.9.1">
          <name slugifiedName="name-registration-template-7">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.9.1-1">
            <dt pn="section-10.9.1-1.1">Mode:</dt>
            <dd pn="section-10.9.1-1.2">
              <t indent="0" pn="section-10.9.1-1.2.1">An identifier for the interaction start mode.</t>
            </dd>
            <dt pn="section-10.9.1-1.3">Type:</dt>
            <dd pn="section-10.9.1-1.4">
              <t indent="0" pn="section-10.9.1-1.4.1">The JSON type for the value, either "string" or "object", as described in <xref target="request-interact-start" format="default" sectionFormat="of" derivedContent="Section 2.5.1"/>.</t>
            </dd>
            <dt pn="section-10.9.1-1.5">Reference:</dt>
            <dd pn="section-10.9.1-1.6">
              <t indent="0" pn="section-10.9.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-interaction-start-modes-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.9.2">
          <name slugifiedName="name-initial-contents-7">Initial Contents</name>
          <table align="center" pn="table-7">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Mode</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">redirect</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.1.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">app</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact-app" format="default" sectionFormat="of" derivedContent="Section 2.5.1.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">user_code</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact-usercode" format="default" sectionFormat="of" derivedContent="Section 2.5.1.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">user_code_uri</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact-usercodeuri" format="default" sectionFormat="of" derivedContent="Section 2.5.1.4"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-interaction-finish-methods" numbered="true" removeInRFC="false" toc="include" pn="section-10.10">
        <name slugifiedName="name-gnap-interaction-finish-met">GNAP Interaction Finish Methods</name>
        <t indent="0" pn="section-10.10-1">This document defines a means for the client instance to be notified of the end of interaction between the end user and the AS, for which IANA has created and maintains a new registry titled "GNAP Interaction Finish Methods". Initial values for this registry are given in <xref target="IANA-interaction-finish-methods-contents" format="default" sectionFormat="of" derivedContent="Section 10.10.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.10-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.10-3">
          <li pn="section-10.10-3.1">All registrations follow the template presented in <xref target="IANA-interaction-finish-methods-template" format="default" sectionFormat="of" derivedContent="Section 10.10.1"/>.</li>
          <li pn="section-10.10-3.2">All finish methods clearly define what actions the AS is expected to take, what listening methods the client instance needs to enable, and any security considerations for this communication from either party.</li>
          <li pn="section-10.10-3.3">All finish methods document incompatibilities with any start modes, if applicable.</li>
        </ul>
        <section anchor="IANA-interaction-finish-methods-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.10.1">
          <name slugifiedName="name-registration-template-8">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.10.1-1">
            <dt pn="section-10.10.1-1.1">Method:</dt>
            <dd pn="section-10.10.1-1.2">
              <t indent="0" pn="section-10.10.1-1.2.1">An identifier for the interaction finish method.</t>
            </dd>
            <dt pn="section-10.10.1-1.3">Reference:</dt>
            <dd pn="section-10.10.1-1.4">
              <t indent="0" pn="section-10.10.1-1.4.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-interaction-finish-methods-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.10.2">
          <name slugifiedName="name-initial-contents-8">Initial Contents</name>
          <table align="center" pn="table-8">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Method</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">redirect</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact-callback-redirect" format="default" sectionFormat="of" derivedContent="Section 2.5.2.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">push</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact-callback-push" format="default" sectionFormat="of" derivedContent="Section 2.5.2.2"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-interaction-hints" numbered="true" removeInRFC="false" toc="include" pn="section-10.11">
        <name slugifiedName="name-gnap-interaction-hints">GNAP Interaction Hints</name>
        <t indent="0" pn="section-10.11-1">This document defines a set of hints that a client instance can provide to the AS to facilitate interaction with the end user, for which IANA has created and maintains a new registry titled "GNAP Interaction Hints". Initial values for this registry are given in <xref target="IANA-interaction-hints-contents" format="default" sectionFormat="of" derivedContent="Section 10.11.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.11-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.11-3">
          <li pn="section-10.11-3.1">All registrations follow the template presented in <xref target="IANA-interaction-hints-template" format="default" sectionFormat="of" derivedContent="Section 10.11.1"/>.</li>
          <li pn="section-10.11-3.2">All interaction hints clearly document the expected behaviors of the AS in response to the hint, and an AS not processing the hint does not impede the operation of the AS or client instance.</li>
        </ul>
        <section anchor="IANA-interaction-hints-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.11.1">
          <name slugifiedName="name-registration-template-9">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.11.1-1">
            <dt pn="section-10.11.1-1.1">Name:</dt>
            <dd pn="section-10.11.1-1.2">
              <t indent="0" pn="section-10.11.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.11.1-1.3">Reference:</dt>
            <dd pn="section-10.11.1-1.4">
              <t indent="0" pn="section-10.11.1-1.4.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-interaction-hints-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.11.2">
          <name slugifiedName="name-initial-contents-9">Initial Contents</name>
          <table align="center" pn="table-9">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">ui_locales</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="request-interact-hint" format="default" sectionFormat="of" derivedContent="Section 2.5.3"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-grant-response" numbered="true" removeInRFC="false" toc="include" pn="section-10.12">
        <name slugifiedName="name-gnap-grant-response-paramet">GNAP Grant Response Parameters</name>
        <t indent="0" pn="section-10.12-1">This document defines a GNAP grant response, for which IANA has created and maintains a new registry titled "GNAP Grant Response Parameters". Initial values for this registry are given in <xref target="IANA-grant-response-contents" format="default" sectionFormat="of" derivedContent="Section 10.12.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.12-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.12-3">
          <li pn="section-10.12-3.1">All registrations follow the template presented in <xref target="IANA-grant-response-template" format="default" sectionFormat="of" derivedContent="Section 10.12.1"/>.</li>
          <li pn="section-10.12-3.2">The response parameter's definition is sufficiently orthogonal to existing functionality provided by existing parameters.</li>
          <li pn="section-10.12-3.3">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
          <li pn="section-10.12-3.4">The response parameter's definition specifies grant states for which the client instance can expect this parameter to appear in a response message.</li>
        </ul>
        <section anchor="IANA-grant-response-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.12.1">
          <name slugifiedName="name-registration-template-10">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.12.1-1">
            <dt pn="section-10.12.1-1.1">Name:</dt>
            <dd pn="section-10.12.1-1.2">
              <t indent="0" pn="section-10.12.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.12.1-1.3">Type:</dt>
            <dd pn="section-10.12.1-1.4">
              <t indent="0" pn="section-10.12.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.12.1-1.5">Reference:</dt>
            <dd pn="section-10.12.1-1.6">
              <t indent="0" pn="section-10.12.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-grant-response-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.12.2">
          <name slugifiedName="name-initial-contents-10">Initial Contents</name>
          <table align="center" pn="table-10">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">continue</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-continue" format="default" sectionFormat="of" derivedContent="Section 3.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">access_token</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">access_token</td>
                <td align="left" colspan="1" rowspan="1">array of objects</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-token-multiple" format="default" sectionFormat="of" derivedContent="Section 3.2.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">interact</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">subject</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">instance_id</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-dynamic-handles" format="default" sectionFormat="of" derivedContent="Section 3.5"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">error</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-interaction-response" numbered="true" removeInRFC="false" toc="include" pn="section-10.13">
        <name slugifiedName="name-gnap-interaction-mode-respo">GNAP Interaction Mode Responses</name>
        <t indent="0" pn="section-10.13-1">This document defines a means for the AS to provide the client instance with information that is required to complete a particular interaction mode, for which IANA has created and maintains a new registry titled "GNAP Interaction Mode Responses". Initial values for this registry are given in <xref target="IANA-interaction-response-contents" format="default" sectionFormat="of" derivedContent="Section 10.13.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.13-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.13-3">
          <li pn="section-10.13-3.1">All registrations follow the template presented in <xref target="IANA-interaction-response-template" format="default" sectionFormat="of" derivedContent="Section 10.13.1"/>.</li>
          <li pn="section-10.13-3.2">If the name of the registration matches the name of an interaction start mode, the response parameter is unambiguously associated with the interaction start mode of the same name.</li>
        </ul>
        <section anchor="IANA-interaction-response-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.13.1">
          <name slugifiedName="name-registration-template-11">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.13.1-1">
            <dt pn="section-10.13.1-1.1">Name:</dt>
            <dd pn="section-10.13.1-1.2">
              <t indent="0" pn="section-10.13.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.13.1-1.3">Reference:</dt>
            <dd pn="section-10.13.1-1.4">
              <t indent="0" pn="section-10.13.1-1.4.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-interaction-response-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.13.2">
          <name slugifiedName="name-initial-contents-11">Initial Contents</name>
          <table align="center" pn="table-11">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">redirect</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">app</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">user_code</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">user_code_uri</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">finish</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">expires_in</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-interact" format="default" sectionFormat="of" derivedContent="Section 3.3"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-subject-response" numbered="true" removeInRFC="false" toc="include" pn="section-10.14">
        <name slugifiedName="name-gnap-subject-information-res">GNAP Subject Information Response Fields</name>
        <t indent="0" pn="section-10.14-1">This document defines a means to return subject information from the AS to the client instance, for which IANA has created and maintains a new registry titled "GNAP Subject Information Response Fields". Initial values for this registry are given in <xref target="IANA-subject-response-contents" format="default" sectionFormat="of" derivedContent="Section 10.14.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.14-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.14-3">
          <li pn="section-10.14-3.1">All registrations follow the template presented in <xref target="IANA-subject-response-template" format="default" sectionFormat="of" derivedContent="Section 10.14.1"/>.</li>
          <li pn="section-10.14-3.2">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
        </ul>
        <section anchor="IANA-subject-response-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.14.1">
          <name slugifiedName="name-registration-template-12">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.14.1-1">
            <dt pn="section-10.14.1-1.1">Name:</dt>
            <dd pn="section-10.14.1-1.2">
              <t indent="0" pn="section-10.14.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.14.1-1.3">Type:</dt>
            <dd pn="section-10.14.1-1.4">
              <t indent="0" pn="section-10.14.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.14.1-1.5">Reference:</dt>
            <dd pn="section-10.14.1-1.6">
              <t indent="0" pn="section-10.14.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-subject-response-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.14.2">
          <name slugifiedName="name-initial-contents-12">Initial Contents</name>
          <table align="center" pn="table-12">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">sub_ids</td>
                <td align="left" colspan="1" rowspan="1">array of objects</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">assertions</td>
                <td align="left" colspan="1" rowspan="1">array of objects</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">updated_at</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-error-code" numbered="true" removeInRFC="false" toc="include" pn="section-10.15">
        <name slugifiedName="name-gnap-error-codes">GNAP Error Codes</name>
        <t indent="0" pn="section-10.15-1">This document defines a set of errors that the AS can return to the client instance, for which IANA has created and maintains a new registry titled "GNAP Error Codes". Initial values for this registry are given in <xref target="IANA-error-code-contents" format="default" sectionFormat="of" derivedContent="Section 10.15.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.15-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.15-3">
          <li pn="section-10.15-3.1">All registrations follow the template presented in <xref target="IANA-error-code-template" format="default" sectionFormat="of" derivedContent="Section 10.15.1"/>.</li>
          <li pn="section-10.15-3.2">The error response is sufficiently unique from other errors to provide actionable information to the client instance.</li>
          <li pn="section-10.15-3.3">The definition of the error response specifies all conditions in which the error response is returned and the client instance's expected action.</li>
        </ul>
        <section anchor="IANA-error-code-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.15.1">
          <name slugifiedName="name-registration-template-13">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.15.1-1">
            <dt pn="section-10.15.1-1.1">Error:</dt>
            <dd pn="section-10.15.1-1.2">
              <t indent="0" pn="section-10.15.1-1.2.1">A unique string code for the error.</t>
            </dd>
            <dt pn="section-10.15.1-1.3">Reference:</dt>
            <dd pn="section-10.15.1-1.4">
              <t indent="0" pn="section-10.15.1-1.4.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-error-code-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.15.2">
          <name slugifiedName="name-initial-contents-13">Initial Contents</name>
          <table align="center" pn="table-13">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Error</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">invalid_request</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">invalid_client</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">invalid_interaction</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">invalid_flag</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">invalid_rotation</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">key_rotation_not_supported</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">invalid_continuation</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">user_denied</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">request_denied</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">unknown_user</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">unknown_interaction</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">too_fast</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">too_many_attempts</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="response-error" format="default" sectionFormat="of" derivedContent="Section 3.6"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-key-proof-methods" numbered="true" removeInRFC="false" toc="include" pn="section-10.16">
        <name slugifiedName="name-gnap-key-proofing-methods">GNAP Key Proofing Methods</name>
        <t indent="0" pn="section-10.16-1">This document defines methods that the client instance can use to prove possession of a key, for which IANA has created and maintains a new registry titled "GNAP Key Proofing Methods". Initial values for this registry are given in <xref target="IANA-key-proof-methods-contents" format="default" sectionFormat="of" derivedContent="Section 10.16.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.16-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.16-3">
          <li pn="section-10.16-3.1">All registrations follow the template presented in <xref target="IANA-key-proof-methods-template" format="default" sectionFormat="of" derivedContent="Section 10.16.1"/>.</li>
          <li pn="section-10.16-3.2">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
          <li pn="section-10.16-3.3">The proofing method provides sufficient coverage of and binding to the protocol messages to which it is applied.</li>
          <li pn="section-10.16-3.4">The proofing method definition clearly enumerates how all requirements in <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/> are fulfilled by the definition.</li>
        </ul>
        <section anchor="IANA-key-proof-methods-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.16.1">
          <name slugifiedName="name-registration-template-14">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.16.1-1">
            <dt pn="section-10.16.1-1.1">Method:</dt>
            <dd pn="section-10.16.1-1.2">
              <t indent="0" pn="section-10.16.1-1.2.1">A unique string code for the key proofing method.</t>
            </dd>
            <dt pn="section-10.16.1-1.3">Type:</dt>
            <dd pn="section-10.16.1-1.4">
              <t indent="0" pn="section-10.16.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.16.1-1.5">Reference:</dt>
            <dd pn="section-10.16.1-1.6">
              <t indent="0" pn="section-10.16.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-key-proof-methods-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.16.2">
          <name slugifiedName="name-initial-contents-14">Initial Contents</name>
          <table align="center" pn="table-14">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Method</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">httpsig</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="httpsig-binding" format="default" sectionFormat="of" derivedContent="Section 7.3.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">httpsig</td>
                <td align="left" colspan="1" rowspan="1">object</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="httpsig-binding" format="default" sectionFormat="of" derivedContent="Section 7.3.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">mtls</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="mtls" format="default" sectionFormat="of" derivedContent="Section 7.3.2"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">jwsd</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="detached-jws" format="default" sectionFormat="of" derivedContent="Section 7.3.3"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">jws</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="attached-jws" format="default" sectionFormat="of" derivedContent="Section 7.3.4"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-key-formats" numbered="true" removeInRFC="false" toc="include" pn="section-10.17">
        <name slugifiedName="name-gnap-key-formats">GNAP Key Formats</name>
        <t indent="0" pn="section-10.17-1">This document defines formats for a public key value, for which IANA has created and maintains a new registry titled "GNAP Key Formats". Initial values for this registry are given in <xref target="IANA-key-formats-contents" format="default" sectionFormat="of" derivedContent="Section 10.17.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.17-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.17-3">
          <li pn="section-10.17-3.1">All registrations follow the template presented in <xref target="IANA-key-formats-template" format="default" sectionFormat="of" derivedContent="Section 10.17.1"/>.</li>
          <li pn="section-10.17-3.2">The key format specifies the structure and serialization of the key material.</li>
        </ul>
        <section anchor="IANA-key-formats-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.17.1">
          <name slugifiedName="name-registration-template-15">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.17.1-1">
            <dt pn="section-10.17.1-1.1">Format:</dt>
            <dd pn="section-10.17.1-1.2">
              <t indent="0" pn="section-10.17.1-1.2.1">A unique string code for the key format.</t>
            </dd>
            <dt pn="section-10.17.1-1.3">Reference:</dt>
            <dd pn="section-10.17.1-1.4">
              <t indent="0" pn="section-10.17.1-1.4.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-key-formats-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.17.2">
          <name slugifiedName="name-initial-contents-15">Initial Contents</name>
          <table align="center" pn="table-15">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Format</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">jwk</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">cert</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">cert#S256</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="IANA-as-discovery" numbered="true" removeInRFC="false" toc="include" pn="section-10.18">
        <name slugifiedName="name-gnap-authorization-server-d">GNAP Authorization Server Discovery Fields</name>
        <t indent="0" pn="section-10.18-1">This document defines a discovery document for an AS, for which IANA has created and maintains a new registry titled "GNAP Authorization Server Discovery Fields". Initial values for this registry are given in <xref target="IANA-as-discovery-contents" format="default" sectionFormat="of" derivedContent="Section 10.18.2"/>. Future assignments and modifications to existing assignments are to be made through the Specification Required registration policy <xref target="RFC8126" format="default" sectionFormat="of" derivedContent="RFC8126"/>.</t>
        <t indent="0" pn="section-10.18-2">The DE is expected to ensure the following:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-10.18-3">
          <li pn="section-10.18-3.1">All registrations follow the template presented in <xref target="IANA-as-discovery-template" format="default" sectionFormat="of" derivedContent="Section 10.18.1"/>.</li>
          <li pn="section-10.18-3.2">Registrations for the same name with different types are sufficiently close in functionality so as not to cause confusion for developers.</li>
          <li pn="section-10.18-3.3">The values in the discovery document are sufficient to provide optimization and hints to the client instance, but knowledge of the discovered value is not required for starting a transaction with the AS.</li>
        </ul>
        <section anchor="IANA-as-discovery-template" numbered="true" removeInRFC="false" toc="include" pn="section-10.18.1">
          <name slugifiedName="name-registration-template-16">Registration Template</name>
          <dl newline="true" indent="3" spacing="normal" pn="section-10.18.1-1">
            <dt pn="section-10.18.1-1.1">Name:</dt>
            <dd pn="section-10.18.1-1.2">
              <t indent="0" pn="section-10.18.1-1.2.1">An identifier for the parameter.</t>
            </dd>
            <dt pn="section-10.18.1-1.3">Type:</dt>
            <dd pn="section-10.18.1-1.4">
              <t indent="0" pn="section-10.18.1-1.4.1">The JSON type allowed for the value.</t>
            </dd>
            <dt pn="section-10.18.1-1.5">Reference:</dt>
            <dd pn="section-10.18.1-1.6">
              <t indent="0" pn="section-10.18.1-1.6.1">Reference to one or more documents that specify the
  value, preferably including a URI that can be used
  to retrieve a copy of the document(s). An indication of the
  relevant sections may also be included but is not required.</t>
            </dd>
          </dl>
        </section>
        <section anchor="IANA-as-discovery-contents" numbered="true" removeInRFC="false" toc="include" pn="section-10.18.2">
          <name slugifiedName="name-initial-contents-16">Initial Contents</name>
          <table align="center" pn="table-16">
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Type</th>
                <th align="left" colspan="1" rowspan="1">Reference</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">grant_request_endpoint</td>
                <td align="left" colspan="1" rowspan="1">string</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">interaction_start_modes_supported</td>
                <td align="left" colspan="1" rowspan="1">array of strings</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">interaction_finish_methods_supported</td>
                <td align="left" colspan="1" rowspan="1">array of strings</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">key_proofs_supported</td>
                <td align="left" colspan="1" rowspan="1">array of strings</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">sub_id_formats_supported</td>
                <td align="left" colspan="1" rowspan="1">array of strings</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">assertion_formats_supported</td>
                <td align="left" colspan="1" rowspan="1">array of strings</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"/> of RFC 9635</td>
              </tr>
              <tr>
                <td align="left" colspan="1" rowspan="1">key_rotation_supported</td>
                <td align="left" colspan="1" rowspan="1">boolean</td>
                <td align="left" colspan="1" rowspan="1">
                  <xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"/> of RFC 9635</td>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
    </section>
    <section anchor="security" numbered="true" removeInRFC="false" toc="include" pn="section-11">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-11-1">In addition to the normative requirements in this document, implementors are strongly encouraged to consider these additional security considerations in implementations and deployments of GNAP.</t>
      <section anchor="security-tls" numbered="true" removeInRFC="false" toc="include" pn="section-11.1">
        <name slugifiedName="name-tls-protection-in-transit">TLS Protection in Transit</name>
        <t indent="0" pn="section-11.1-1">All requests in GNAP made over untrusted network connections have to be made over TLS as outlined in <xref target="BCP195" format="default" sectionFormat="of" derivedContent="BCP195"/>
to protect the contents of the request and response from manipulation and interception by an attacker.
This includes all requests from a client instance to the AS, all requests from the client instance to
an RS, and any requests back to a client instance such as the push-based interaction finish method.
Additionally, all requests between a browser and other components, such as during redirect-based
interaction, need to be made over TLS or use equivalent protection such as a network connection local to the browser ("localhost").</t>
        <t indent="0" pn="section-11.1-2">Even though requests from the client instance to the AS are signed, the signature method alone does not protect
the request from interception by an attacker. TLS protects the response as well as the request,
preventing an attacker from intercepting requested information as it is returned. This is particularly
important in this specification for security artifacts such as nonces and for
personal information such as subject information.</t>
        <t indent="0" pn="section-11.1-3">The use of key-bound access tokens does not negate the requirement for protecting calls to the RS with TLS.
The keys and signatures associated with a bound access token will prevent an attacker from using a stolen
token; however, without TLS, an attacker would be able to watch the data being sent to the RS and returned from the RS
during legitimate use of the client instance under attack. Additionally, without TLS, an attacker would be
able to profile the calls made between the client instance and RS, possibly gaining information about the functioning
of the API between the client software and RS software that would otherwise be unknown to the attacker.</t>
        <t indent="0" pn="section-11.1-4">Note that connections from the end user and RO's browser also need to be protected with TLS. This applies during initial
redirects to an AS's components during interaction, during any interaction with the RO, and during
any redirect back to the client instance. Without TLS protection on these portions of the process, an
attacker could wait for a valid request to start and then take over the RO's interaction session.</t>
      </section>
      <section anchor="security-signing" numbered="true" removeInRFC="false" toc="include" pn="section-11.2">
        <name slugifiedName="name-signing-requests-from-the-c">Signing Requests from the Client Software</name>
        <t indent="0" pn="section-11.2-1">Even though all requests in GNAP need to be transmitted over TLS or its equivalent, the use of TLS
alone is not sufficient to protect all parts of a multi-party and multi-stage protocol like GNAP,
and TLS is not targeted at tying multiple requests to each other over time.
To account for this, GNAP makes use of message-level protection and key presentation mechanisms
that strongly associate a request with a key held by the client instance (see <xref target="secure-requests" format="default" sectionFormat="of" derivedContent="Section 7"/>).</t>
        <t indent="0" pn="section-11.2-2">During the initial request from a client instance to the AS, the client instance has to identify and
prove possession of a cryptographic key. If the key is known to the AS, e.g., previously
registered or dereferenceable to a trusted source, the AS can associate a set of policies to the
client instance identified by the key. Without the requirement that the client instance prove that it holds
that key, the AS could not trust that the connection came from any particular client and could
not apply any associated policies.</t>
        <t indent="0" pn="section-11.2-3">Even more importantly, the client instance proving possession of a
        key on the first request allows the AS to associate future requests
        with each other by binding all future requests in that transaction to
        the same key. The access token used for grant continuation is bound to
        the same key and proofing mechanism used by the client instance in its
        initial request; this means that the client instance needs to prove
        possession of that same key in future requests, which allows the AS to
        be sure that the same client instance is executing the follow-ups for
        a given ongoing grant request. Therefore, the AS has to ensure that
        all subsequent requests for a grant are associated with the same key
        that started the grant or with the most recent rotation of that key.  This
        need holds true even if the initial key is previously unknown to the
        AS, such as would be the case when a client instance creates an
        ephemeral key for its request.  Without this ongoing association, an
        attacker would be able to impersonate a client instance in the midst
        of a grant request, potentially stealing access tokens and subject
        information with impunity.</t>
        <t indent="0" pn="section-11.2-4">Additionally, all access tokens in GNAP default to be associated with the key that was presented
during the grant request that created the access token. This association allows an RS to know that
the presenter of the access token is the same party that the token was issued to, as identified
by their keys. While non-bound bearer tokens are an option in GNAP, these types of tokens
have their own trade-offs, which are discussed in <xref target="security-bearer-tokens" format="default" sectionFormat="of" derivedContent="Section 11.9"/>.</t>
        <t indent="0" pn="section-11.2-5">TLS functions at the transport layer, ensuring that only the parties on either end of that
connection can read the information passed along that connection. Each time a new connection
is made, such as for a new HTTP request, a new trust that is mostly unrelated to previous
connections is re-established. While modern TLS does make use of session resumption, this still needs to be augmented
with authentication methods to determine the identity of parties on the
connections. In other words, it is not possible with TLS alone to know that the same party is making
a set of calls over time, since each time a new TLS connection is established, both the client and the server (or the server only when using MTLS (<xref target="mtls" format="default" sectionFormat="of" derivedContent="Section 7.3.2"/>)) have to validate
the other party's identity. Such a verification can be achieved via methods described in <xref target="RFC9525" format="default" sectionFormat="of" derivedContent="RFC9525"/>, but these are not enough to establish the identity of the client instance in many cases.</t>
        <t indent="0" pn="section-11.2-6">To counter this, GNAP defines a set of key binding methods in <xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"/> that allows authentication and
proof of possession by the caller, which is usually the client instance. These methods are intended to be used in
addition to TLS on all connections.</t>
      </section>
      <section anchor="security-mtls" numbered="true" removeInRFC="false" toc="include" pn="section-11.3">
        <name slugifiedName="name-mtls-message-integrity">MTLS Message Integrity</name>
        <t indent="0" pn="section-11.3-1">The MTLS key proofing mechanism (<xref target="mtls" format="default" sectionFormat="of" derivedContent="Section 7.3.2"> </xref>) provides a means for a client instance to present a key
using a certificate at the TLS layer. Since TLS protects the entire HTTP message in transit,
verification of the TLS client certificate presented with the message provides a sufficient binding
between the two. However, since TLS is functioning at a separate layer from HTTP, there is no
direct connection between the TLS key presentation and the message itself, other than the fact that
the message was presented over the TLS channel. That is to say, any HTTP message can be presented
over the TLS channel in question with the same level of trust. The verifier is responsible for
ensuring the key in the TLS client certificate is the one expected for a particular request. For
example, if the request is a grant request (<xref target="request" format="default" sectionFormat="of" derivedContent="Section 2"> </xref>), the AS needs to compare the TLS client
certificate presented at the TLS layer to the key identified in the request content itself (either
by value or through a referenced identifier).</t>
        <t indent="0" pn="section-11.3-2">Furthermore, the prevalence of the TLS terminating reverse proxy (TTRP) pattern in deployments adds
a wrinkle to the situation. In this common pattern, the TTRP validates the TLS connection and then forwards the HTTP message contents onward to an internal system for processing. The system
processing the HTTP message no longer has access to the original TLS connection's information and
context.

To compensate for this, the TTRP could inject the TLS client certificate into
the forwarded request using the HTTP Client-Cert header field <xref target="RFC9111" format="default" sectionFormat="of" derivedContent="RFC9111"/>, giving the downstream system access to the certificate
information. The TTRP has to be trusted to provide accurate certificate
information, and the connection between the TTRP and the downstream system
also has to be protected. The TTRP could provide some additional assurance,
for example, by adding its own signature to the Client-Cert header field using
HTTP message signatures <xref target="RFC9421" format="default" sectionFormat="of" derivedContent="RFC9421"/>. This signature would be
effectively ignored by GNAP (since it would not use GNAP's <tt>tag</tt>
parameter value) but would be understood by the downstream service as part of
its deployment.</t>
        <t indent="0" pn="section-11.3-3">Additional considerations for different types of deployment patterns and key distribution
mechanisms for MTLS are found in <xref target="security-mtls-patterns" format="default" sectionFormat="of" derivedContent="Section 11.4"/>.</t>
      </section>
      <section anchor="security-mtls-patterns" numbered="true" removeInRFC="false" toc="include" pn="section-11.4">
        <name slugifiedName="name-mtls-deployment-patterns">MTLS Deployment Patterns</name>
        <t indent="0" pn="section-11.4-1">GNAP does not specify how a client instance's keys could be made known to the AS ahead of time.
The Public Key Infrastructure (PKI) can be used to manage the keys used by client instances when calling
the AS, allowing the AS to trust a root key from a trusted authority. This method is particularly
relevant to the MTLS key proofing method, where the client instance
presents its certificate to the AS as part of the TLS connection. An AS using PKI to validate the
MTLS connection would need to ensure that the presented certificate was issued by a trusted certificate
authority before allowing the connection to continue. PKI-based certificates would allow a key to be revoked
and rotated through management at the certificate authority without requiring additional registration
or management at the AS. The PKI required to manage mutually authenticated TLS has historically been
difficult to deploy, especially at scale, but it remains an appropriate solution for systems where
the required management overhead is not an impediment.</t>
        <t indent="0" pn="section-11.4-2">MTLS in GNAP need not use a PKI backing, as self-signed certificates and certificates from untrusted
authorities can still be presented as part of a TLS connection. In this case, the verifier would
validate the connection but accept whatever certificate was presented by the client software. This
specific certificate can then be bound to all future connections from that client software by
being bound to the resulting access tokens, in a trust-on-first-use pattern. See <xref target="security-mtls" format="default" sectionFormat="of" derivedContent="Section 11.3"/>
for more considerations on MTLS as a key proofing mechanism.</t>
      </section>
      <section anchor="security-keys" numbered="true" removeInRFC="false" toc="include" pn="section-11.5">
        <name slugifiedName="name-protection-of-client-instan">Protection of Client Instance Key Material</name>
        <t indent="0" pn="section-11.5-1">Client instances are identified by their unique keys, and anyone with access to a client instance's key material
will be able to impersonate that client instance to all parties. This is true for both calls to the AS
as well as calls to an RS using an access token bound to the client instance's unique key. As a consequence, it is of utmost importance for a client instance to protect its private key material.</t>
        <t indent="0" pn="section-11.5-2">Different types of client software have different methods for creating, managing, and registering
keys. GNAP explicitly allows for ephemeral clients such as single-page applications (SPAs) and single-user clients (such as
mobile applications) to create and present their own keys during the initial grant request without any explicit pre-registration step. The client
software can securely generate a key pair on the device and present the public key, along with proof of holding the associated
private key, to the AS as part of the initial request. To facilitate trust in these ephemeral keys,
GNAP further allows for an extensible set of client information to be passed with the request. This
information can include device posture and third-party attestations of the client software's provenance
and authenticity, depending on the needs and capabilities of the client software and its deployment.</t>
        <t indent="0" pn="section-11.5-3">From GNAP's perspective, each distinct key is a different client instance. However, multiple client
instances can be grouped together by an AS policy and treated similarly to each other. For instance,
if an AS knows of several different keys for different servers within a cluster, the AS can
decide that authorization of one of these servers applies to all other servers within the cluster. An AS
that chooses to do this needs to be careful with how it groups different client keys together in its policy,
since the breach of one instance would have direct effects on the others in the cluster.</t>
        <t indent="0" pn="section-11.5-4">Additionally, if an end user controls multiple instances of a single type of client software, such as
having an application installed on multiple devices, each of these instances is expected to have a
separate key and be issued separate access tokens. However, if the AS is able to group these separate
instances together as described above, it can streamline the authorization process for new instances
of the same client software. For example, if two client instances can present proof of a valid installation
of a piece of client software, the AS would be able to associate the approval of the first instance of this
software to all related instances. The AS could then choose to bypass an explicit prompt of the RO for approval during authorization, since such approval has already been given. An AS doing such
a process would need to take assurance measures that the different instances are in fact correlated
and authentic, as well as ensure that the expected RO is in control of the client instance.</t>
        <t indent="0" pn="section-11.5-5">Finally, if multiple instances of client software each have the same key, then from GNAP's perspective,
these are functionally the same client instance as GNAP has no reasonable way to differentiate between
them. This situation could happen if multiple instances within a cluster can securely share secret
information among themselves. Even though there are multiple copies of the software, the shared key
makes these copies all present as a single instance. It is considered bad practice to share keys between
copies of software unless they are very tightly integrated with each other and can be closely managed.
It is particularly bad practice to allow an end user to copy keys between client instances and to
willingly use the same key in multiple instances.</t>
      </section>
      <section anchor="security-as" numbered="true" removeInRFC="false" toc="include" pn="section-11.6">
        <name slugifiedName="name-protection-of-authorization">Protection of Authorization Server</name>
        <t indent="0" pn="section-11.6-1">The AS performs critical functions in GNAP, including authenticating client software, managing interactions
with end users to gather consent and provide notice, and issuing access tokens for client instances
to present to RSs. As such, protecting the AS is central to any GNAP deployment.</t>
        <t indent="0" pn="section-11.6-2">If an attacker is able to gain control over an AS, they would be able to create fraudulent tokens and
manipulate registration information to allow for malicious clients. These tokens and clients would
be trusted by other components in the ecosystem under the protection of the AS.</t>
        <t indent="0" pn="section-11.6-3">If the AS uses signed access tokens, an attacker in control of the AS's signing keys would
be able to manufacture fraudulent tokens for use at RSs under the protection of the AS.</t>
        <t indent="0" pn="section-11.6-4">If an attacker is able to impersonate an AS, they would be able to trick legitimate client instances
into making signed requests for information that could potentially be proxied to a real AS. To combat
this, all communications to the AS need to be made over TLS or its equivalent, and the software
making the connection has to validate the certificate chain of the host it is connecting to.</t>
        <t indent="0" pn="section-11.6-5">Consequently, protecting, monitoring, and auditing the AS is paramount to preserving the security
of a GNAP-protected ecosystem. The AS presents attackers with a valuable target for attack.
Fortunately, the core focus and function of the AS is to provide security for the ecosystem, unlike
the RS whose focus is to provide an API or the client software whose focus is to access the API.</t>
      </section>
      <section anchor="security-symmetric" numbered="true" removeInRFC="false" toc="include" pn="section-11.7">
        <name slugifiedName="name-symmetric-and-asymmetric-cl">Symmetric and Asymmetric Client Instance Keys</name>
        <t indent="0" pn="section-11.7-1">Many of the cryptographic methods used by GNAP for key proofing can support both asymmetric and symmetric
cryptography, and they can be extended to use a wide variety of mechanisms.
Implementors will find the available guidelines on cryptographic key management provided in <xref target="RFC4107" format="default" sectionFormat="of" derivedContent="RFC4107"/> useful. While symmetric
cryptographic systems have some benefits in speed and simplicity, they have a distinct drawback --
both parties need access to the same key in order to do both signing and verification of
the message.
When more than two parties share the same symmetric key,
data origin authentication is not provided.  Any party that knows the
symmetric key can compute a valid MAC; therefore, the
contents could originate from any one of the parties.</t>
        <t indent="0" pn="section-11.7-2">Use of symmetric cryptography means that when the client instance calls the AS to request a token, the
AS needs to know the exact value of the client instance's key (or be able to derive it) in
order to validate the key proof signature. With asymmetric keys, the client needs to only
send its public key to the AS to allow for verification that the client holds the associated
private key, regardless of whether or not that key was pre-registered with the AS.</t>
        <t indent="0" pn="section-11.7-3">Symmetric keys also have the expected advantage of providing better protection against quantum
threats in the future. Also, these types of keys (and their secure derivations) are widely
supported among many cloud-based key management systems.</t>
        <t indent="0" pn="section-11.7-4">When used to bind to an access token, a key value must be known by the RS in order
to validate the proof signature on the request. Common methods for communicating these proofing
keys include putting information in a structured access token and allowing the RS to look
up the associated key material against the value of the access token. With symmetric cryptography,
both of these methods would expose the signing key to the RS and, in the case of a structured
access token, potentially to any party that can see the access token itself unless the token's
payload has been encrypted. Any of these parties would then be able to make calls using the
access token by creating a valid signature using the shared key. With asymmetric cryptography, the RS needs
to only know the public key associated with the token in order to validate the request; therefore, the RS cannot
create any new signed calls.</t>
        <t indent="0" pn="section-11.7-5">While both signing approaches are allowed, GNAP treats these two classes of keys somewhat
differently. Only the public portion of asymmetric keys are allowed to be sent by value
in requests to the AS when establishing a connection. Since sending a symmetric key (or
the private portion of an asymmetric key) would expose the signing material to any parties
on the request path, including any attackers, sending these kinds of keys by value is prohibited.
Symmetric keys can still be used by client instances, but only if the client instance can send a reference to the key and
not its value. This approach allows the AS to use pre-registered symmetric keys as well
as key derivation schemes to take advantage of symmetric cryptography without requiring
key distribution at runtime, which would expose the keys in transit.</t>
        <t indent="0" pn="section-11.7-6">Both the AS and client software can use systems such as hardware security modules to strengthen
their key security storage and generation for both asymmetric and symmetric keys (see also <xref target="key-protection" format="default" sectionFormat="of" derivedContent="Section 7.1.2"/>).</t>
      </section>
      <section anchor="security-access-tokens" numbered="true" removeInRFC="false" toc="include" pn="section-11.8">
        <name slugifiedName="name-generation-of-access-tokens">Generation of Access Tokens</name>
        <t indent="0" pn="section-11.8-1">The contents of access tokens need to be such that only the generating AS would be able to
create them, and the contents cannot be manipulated by an attacker to gain different or additional
access rights.</t>
        <t indent="0" pn="section-11.8-2">One method for accomplishing this is to use a cryptographically random value for the access token,
generated by the AS using a secure randomization function with sufficiently high entropy. The odds of
an attacker guessing the output of the randomization function to collide with a valid access token
are exceedingly small, and even then, the attacker would not have any control over what the
access token would represent since that information would be held close by the AS.</t>
        <t indent="0" pn="section-11.8-3">Another method for accomplishing this is to use a structured token that is cryptographically signed.
In this case, the payload of the access token declares to the RS what the token is good for, but
the signature applied by the AS during token generation covers this payload. Only the AS can create
such a signature; therefore, only the AS can create such a signed token. The odds of an attacker
being able to guess a signature value with a useful payload are exceedingly small. This technique
only works if all targeted RSs check the signature of the access token. Any RS that does not
validate the signature of all presented tokens would be susceptible to injection of a modified
or falsified token. Furthermore, an AS has to carefully protect the keys used to sign access
tokens, since anyone with access to these signing keys would be able to create seemingly valid
access tokens using them.</t>
      </section>
      <section anchor="security-bearer-tokens" numbered="true" removeInRFC="false" toc="include" pn="section-11.9">
        <name slugifiedName="name-bearer-access-tokens">Bearer Access Tokens</name>
        <t indent="0" pn="section-11.9-1">Bearer access tokens can be used by any party that has access to the token itself, without any additional
information. As a natural consequence, any RS that a bearer token is presented to has the technical
capability of presenting that bearer token to another RS, as long as the token is valid. It also
means that any party that is able to capture the token value in storage or in transit is able to
use the access token. While bearer tokens are inherently simpler, this simplicity has been misapplied
and abused in making needlessly insecure systems. The downsides of bearer tokens have become more
pertinent lately as stronger authentication systems have caused some attacks to shift to target
tokens and APIs.</t>
        <t indent="0" pn="section-11.9-2">In GNAP, key-bound access tokens are the default due to their higher security properties. While
bearer tokens can be used in GNAP, their use should be limited to cases where the simplicity
benefits outweigh the significant security downsides. One common deployment pattern is to use a
gateway that takes in key-bound tokens on the outside and verifies the signatures on the incoming
requests but translates the requests to a bearer token for use by trusted internal systems. The
bearer tokens are never issued or available outside of the internal systems, greatly limiting the
exposure of the less-secure tokens but allowing the internal deployment to benefit from the
advantages of bearer tokens.</t>
      </section>
      <section anchor="security-bound-tokens" numbered="true" removeInRFC="false" toc="include" pn="section-11.10">
        <name slugifiedName="name-key-bound-access-tokens">Key-Bound Access Tokens</name>
        <t indent="0" pn="section-11.10-1">Key-bound access tokens, as the name suggests, are bound to a specific key and must be
presented along with proof of that key during use. The key itself is not presented at the same
time as the token, so even if a token value is captured, it cannot be used to make a new request. This
is particularly true for an RS, which will see the token value but will not see the keys used
to make the request (assuming asymmetric cryptography is in use, see <xref target="security-symmetric" format="default" sectionFormat="of" derivedContent="Section 11.7"/>).</t>
        <t indent="0" pn="section-11.10-2">Key-bound access tokens provide this additional layer of protection only when the RS checks the
signature of the message presented with the token. Acceptance of an invalid presentation signature,
or failure to check the signature entirely, would allow an attacker to make calls with a captured
access token without having access to the related signing key material.</t>
        <t indent="0" pn="section-11.10-3">In addition to validating the signature of the presentation message itself,
the RS also needs to ensure that the signing key used is appropriate for the presented token.
If an RS does not ensure that the right keys were used to sign a message with a specific
token, an attacker would be able to capture an access token and sign the request with their own
keys, thereby negating the benefits of using key-bound access tokens.</t>
        <t indent="0" pn="section-11.10-4">The RS also needs to ensure that sufficient portions of the message are covered by the
signature. Any items outside the signature could still affect the API's processing decisions,
but these items would not be strongly bound to the token presentation. As such, an attacker
could capture a valid request and then manipulate portions of the request outside of the
signature envelope in order to cause unwanted actions at the protected API.</t>
        <t indent="0" pn="section-11.10-5">Some key-bound tokens are susceptible to replay attacks, depending on the details of the signing method
used. Therefore, key proofing mechanisms used with access tokens need
to use replay-protection mechanisms covered under the signature such as a per-message nonce, a
reasonably short time validity window, or other uniqueness constraints. The details of using these
will vary depending on the key proofing mechanism in use. For example, HTTP message signatures
have both a <tt>created</tt> and <tt>nonce</tt> signature parameter as well as the ability to cover significant
portions of the HTTP message. All of these can be used to limit the attack surface.</t>
      </section>
      <section anchor="security-credentials" numbered="true" removeInRFC="false" toc="include" pn="section-11.11">
        <name slugifiedName="name-exposure-of-end-user-creden">Exposure of End-User Credentials to Client Instance</name>
        <t indent="0" pn="section-11.11-1">As a delegation protocol, one of the main goals of GNAP is to prevent the client software from being
exposed to any credentials or information about the end user or RO as a requirement
of the delegation process. By using the variety of interaction mechanisms, the RO can
interact with the AS without ever authenticating to the client software and without the client
software having to impersonate the RO through replay of their credentials.</t>
        <t indent="0" pn="section-11.11-2">Consequently, no interaction methods defined in this specification require the end user to enter their
credentials, but it is technologically possible for an extension to be defined to carry such values.
Such an extension would be dangerous as it would allow rogue client software to directly collect, store,
and replay the end user's credentials outside of any legitimate use within a GNAP request.</t>
        <t indent="0" pn="section-11.11-3">The concerns of such an extension could be mitigated through use of a challenge and response
unlocked by the end user's credentials. For example, the AS presents a challenge as part of
an interaction start method, and the client instance signs that challenge using a key derived
from a password presented by the end user. It would be possible for the client software to
collect this password in a secure software enclave without exposing the password to the rest
of the client software or putting it across the wire to the AS. The AS can validate this challenge
response against a known password for the identified end user. While an approach such as this does
not remove all of the concerns surrounding such a password-based scheme, it is at least
possible to implement in a more secure fashion than simply collecting and replaying
the password. Even so, such schemes should only ever be used by trusted clients due to
the ease of abusing them.</t>
      </section>
      <section anchor="security-mixup" numbered="true" removeInRFC="false" toc="include" pn="section-11.12">
        <name slugifiedName="name-mixing-up-authorization-ser">Mixing Up Authorization Servers</name>
        <t indent="0" pn="section-11.12-1">If a client instance is able to work with multiple ASes simultaneously, it is possible
for an attacker to add a compromised AS to the client instance's configuration and cause the
client software to start a request at the compromised AS. This AS could then proxy the client's
request to a valid AS in order to attempt to get the RO to approve access for
the legitimate client instance.</t>
        <t indent="0" pn="section-11.12-2">A client instance needs to always be aware of which AS it is talking to throughout a grant process and ensure
that any callback for one AS does not get conflated with the callback to different AS. The interaction finish
hash calculation in <xref target="interaction-hash" format="default" sectionFormat="of" derivedContent="Section 4.2.3"/> allows a client instance to protect against this kind of substitution, but only if
the client instance validates the hash. If the client instance does not use an interaction finish method
or does not check the interaction finish hash value, the compromised AS can be granted a valid
access token on behalf of the RO. See Sections 4.5.5 and 5.5 of <xref target="AXELAND2021" format="default" sectionFormat="of" derivedContent="AXELAND2021"/> for details
of one such attack, which has been addressed in this document by including the grant endpoint
in the interaction hash calculation. Note that the client instance still needs to validate the hash for
the attack to be prevented.</t>
      </section>
      <section anchor="security-client-userinfo" numbered="true" removeInRFC="false" toc="include" pn="section-11.13">
        <name slugifiedName="name-processing-of-client-presen">Processing of Client-Presented User Information</name>
        <t indent="0" pn="section-11.13-1">GNAP allows the client instance to present assertions and identifiers of the current user to the AS as
part of the initial request. This information should only ever be taken by the AS as a hint, since the
AS has no way to tell if the represented person is present at the client software without using
an interaction mechanism. This information does not guarantee the given user is there, but it does
constitute a statement by the client software that the AS can take into account.</t>
        <t indent="0" pn="section-11.13-2">For example, if a specific user is claimed to be present prior to interaction, but a different user
is shown to be present during interaction, the AS can either determine this to be an error or signal
to the client instance through returned subject information that the current user has changed from
what the client instance thought. This user information can also be used by the AS to streamline the
interaction process when the user is present. For example, instead of having the user type in their
account identifier during interaction at a redirected URI, the AS can immediately challenge the user
for their account credentials. Alternatively, if an existing session is detected, the AS can
determine that it matches the identifier provided by the client and subsequently skip an explicit
authentication event by the RO.</t>
        <t indent="0" pn="section-11.13-3">In cases where the AS trusts the client software more completely, due to policy
or previous approval of a given client instance, the AS can take this user information as a
statement that the user is present and could issue access tokens and release subject information
without interaction. The AS should only take such action in very limited circumstances, as a
client instance could assert whatever it likes for the user's identifiers in its request. The AS
can limit the possibility of this by issuing randomized opaque identifiers to client instances to
represent different end-user accounts after an initial login.</t>
        <t indent="0" pn="section-11.13-4">When a client instance presents an assertion to the AS, the AS needs to evaluate that assertion. Since
the AS is unlikely to be the intended audience of an assertion held by the client software, the AS will
need to evaluate the assertion in a different context. Even in this case, the AS can still evaluate
that the assertion was generated by a trusted party, was appropriately signed, and is within
any time validity windows stated by the assertion. If the client instance's audience identifier
is known to the AS and can be associated with the client instance's presented key, the AS can also
evaluate that the appropriate client instance is presenting the claimed assertion. All of this
will prevent an attacker from presenting a manufactured assertion or one captured from an
untrusted system. However, without validating the audience of the assertion, a captured assertion
could be presented by the client instance to impersonate a given end user. In such cases, the assertion
offers little more protection than a simple identifier would.</t>
        <t indent="0" pn="section-11.13-5">A special case exists where the AS is the generator of the assertion being presented by the
client instance. In these cases, the AS can validate that it did issue the assertion and
it is associated with the client instance presenting the assertion.</t>
      </section>
      <section anchor="security-registration" numbered="true" removeInRFC="false" toc="include" pn="section-11.14">
        <name slugifiedName="name-client-instance-pre-registr">Client Instance Pre-registration</name>
        <t indent="0" pn="section-11.14-1">Each client instance is identified by its own unique key, and for some kinds of client software such as a
web server or backend system, this identification can be facilitated by registering a single key for a piece
of client software ahead of time. This registration can be associated with a set of display attributes to
be used during the authorization process to identify the client software to the user. In these cases,
it can be assumed that only one instance of client software will exist, likely to serve many different
users.</t>
        <t indent="0" pn="section-11.14-2">A client's registration record needs to include its identifying key. Furthermore, it is the case that
any clients using symmetric cryptography for key proofing mechanisms need to have their keys pre-registered.
The registration should also include any information that would aid in the authorization process, such as
a display name and logo.
The registration record can also limit a given client to
ask for certain kinds of information or use
specific interaction mechanisms at runtime.
</t>
        <t indent="0" pn="section-11.14-3">It also is sensible to pre-register client instances when the software is acting autonomously, without
the need for a runtime approval by an RO or any interaction with an end user. In these cases,
an AS needs to rely on the trust decisions that have been determined prior to runtime to determine
what rights and tokens to grant to a given client instance.</t>
        <t indent="0" pn="section-11.14-4">However, it does not make sense to pre-register many types of clients. Single-page applications (SPAs) and
mobile/desktop applications in particular present problems with pre-registration. For SPAs, the instances
are ephemeral in nature, and long-term registration of a single instance leads to significant storage and
management overhead at the AS. For mobile applications, each installation of the client software is
a separate instance, and sharing a key among all instances would be detrimental to security as the
compromise of any single installation would compromise all copies for all users.</t>
        <t indent="0" pn="section-11.14-5">An AS can treat these classes of client software differently from each other, perhaps by allowing access
to certain high-value APIs only to pre-registered known clients or by requiring an active end-user
delegation of authority to any client software not pre-registered.</t>
        <t indent="0" pn="section-11.14-6">An AS can also provide warnings and caveats to ROs during the authorization process, allowing
the user to make an informed decision regarding the software they are authorizing. For example, if the AS
has vetted the client software and this specific instance, it can present a different authorization
screen compared to a client instance that is presenting all of its information at runtime.</t>
        <t indent="0" pn="section-11.14-7">Finally, an AS can use platform attestations and other signals from the client instance at runtime
to determine whether or not the software making the request is legitimate. The details of such
attestations are outside the scope of this specification, but the <tt>client</tt> portion of a grant request
provides a natural extension point to such information through the "GNAP Client Instance Fields" registry (<xref target="IANA-client-instance" format="default" sectionFormat="of" derivedContent="Section 10.7"> </xref>).</t>
      </section>
      <section anchor="security-impersonation" numbered="true" removeInRFC="false" toc="include" pn="section-11.15">
        <name slugifiedName="name-client-instance-impersonati">Client Instance Impersonation</name>
        <t indent="0" pn="section-11.15-1">If client instances are allowed to set their own user-facing display information, such as a display name and website
URL, a malicious client instance could impersonate legitimate client software for the purposes of tricking
users into authorizing the malicious client.</t>
        <t indent="0" pn="section-11.15-2">Requiring clients to pre-register does not fully mitigate this problem since many pre-registration
systems have self-service portals for management of client registration, allowing authenticated developers
to enter self-asserted information into the management portal.</t>
        <t indent="0" pn="section-11.15-3">An AS can mitigate this by actively filtering all self-asserted values presented by client software,
both dynamically as part of GNAP and through a registration portal, to limit the kinds of impersonation that
	could be done.</t>
        <t indent="0" pn="section-11.15-4">An AS can also warn the RO about the provenance of the information it is displaying, allowing
the RO to make a more informed delegation decision. For example, an AS can visually differentiate
between a client instance that can be traced back to a specific developer's registration and an
instance that has self-asserted its own display information.</t>
      </section>
      <section anchor="security-client-hosted-logo" numbered="true" removeInRFC="false" toc="include" pn="section-11.16">
        <name slugifiedName="name-client-hosted-logo-uri">Client-Hosted Logo URI</name>
        <t indent="0" pn="section-11.16-1">The <tt>logo_uri</tt> client display field defined in <xref target="request-display" format="default" sectionFormat="of" derivedContent="Section 2.3.2"/> allows the client instance to specify
a URI from which an image can be fetched for display during authorization decisions. When the URI points to
an externally hosted resource (as opposed to a data: URI), the <tt>logo_uri</tt> field presents challenges in addition to the
considerations in <xref target="security-impersonation" format="default" sectionFormat="of" derivedContent="Section 11.15"/>.</t>
        <t indent="0" pn="section-11.16-2">When a <tt>logo_uri</tt> is externally hosted, the client software (or the host of the asset) can change the contents of
the logo without informing the AS. Since the logo is considered an aspect of the client software's identity,
this flexibility allows for a more dynamically managed client instance that makes use of the distributed systems.</t>
        <t indent="0" pn="section-11.16-3">However, this same flexibility allows the host of the asset to change the hosted file in a malicious way,
such as replacing the image content with malicious software for download or imitating a different piece
of client software. Additionally, the act of fetching the URI could accidentally leak information to the image host
in the HTTP Referer header field, if one is sent. Even though GNAP intentionally does not include security
parameters in front-channel URIs wherever possible, the AS still should take steps to ensure that
this information does not leak accidentally, such as setting a referrer policy on image links or
displaying images only from pages served from a URI with no sensitive security or identity information.</t>
        <t indent="0" pn="section-11.16-4">To avoid these issues, the AS can insist on the use of data: URIs, though that might not be practical for all
types of client software. Alternatively, the AS could pre-fetch the content of the URI and present its own copy
to the RO instead. This practice opens the AS to potential SSRF attacks, as discussed in <xref target="security-ssrf" format="default" sectionFormat="of" derivedContent="Section 11.34"/>.</t>
      </section>
      <section anchor="security-browser-interception" numbered="true" removeInRFC="false" toc="include" pn="section-11.17">
        <name slugifiedName="name-interception-of-information">Interception of Information in the Browser</name>
        <t indent="0" pn="section-11.17-1">Most information passed through the web browser is susceptible to interception and possible manipulation by
elements within the browser such as scripts loaded within pages. Information in the URI is exposed
through browser and server logs, and it can also leak to other parties through HTTP <tt>Referer</tt> headers.</t>
        <t indent="0" pn="section-11.17-2">GNAP's design limits the information passed directly through the browser, allowing for opaque URIs in most circumstances.
For the redirect-based interaction finish mechanism, named query parameters are used to carry
unguessable opaque values. For these, GNAP requires creation and validation of a cryptographic
hash to protect the query parameters added to the URI and associate them with an ongoing grant
process and values not passed in the URI. The client instance has to properly validate this hash to prevent an attacker from
injecting an interaction reference intended for a different AS or client instance.</t>
        <t indent="0" pn="section-11.17-3">Several interaction start mechanisms use URIs created by the AS and passed to the client instance.
While these URIs are opaque to the client instance, it's possible for the AS to include parameters,
paths, and other pieces of information that could leak security data or be manipulated by a party
in the middle of the transaction. An AS implementation can avoid this problem by creating URIs
using unguessable values that are randomized for each new grant request.</t>
      </section>
      <section anchor="security-callback-uri" numbered="true" removeInRFC="false" toc="include" pn="section-11.18">
        <name slugifiedName="name-callback-uri-manipulation">Callback URI Manipulation</name>
        <t indent="0" pn="section-11.18-1">The callback URI used in interaction finish mechanisms is defined by the client instance. This URI is
opaque to the AS but can contain information relevant to the client instance's operations. In
particular, the client instance can include state information to allow the callback request to
be associated with an ongoing grant request.</t>
        <t indent="0" pn="section-11.18-2">Since this URI is exposed to the end user's browser, it is susceptible to both logging and manipulation
in transit before the request is made to the client software. As such, a client instance should
never put security-critical or private information into the callback URI in a cleartext form. For example,
if the client software includes a post-redirect target URI in its callback URI to the AS, this target URI
could be manipulated by an attacker, creating an open redirector at the client. Instead,
a client instance can use an unguessable identifier in the URI that can then be used by the client
software to look up the details of the pending request. Since this approach requires some form of statefulness
by the client software during the redirection process, clients that are not capable of holding state
through a redirect should not use redirect-based interaction mechanisms.</t>
      </section>
      <section anchor="security-redirect-status-codes" numbered="true" removeInRFC="false" toc="include" pn="section-11.19">
        <name slugifiedName="name-redirection-status-codes">Redirection Status Codes</name>
        <t indent="0" pn="section-11.19-1">As described in <xref target="I-D.ietf-oauth-security-topics" format="default" sectionFormat="of" derivedContent="OAUTH-SEC-TOPICS"/>, a server should never use
        HTTP status code 307 (Temporary Redirect) to redirect a request that potentially
        contains user credentials. If an HTTP redirect is used for such a
        request, HTTP status code 303 (See Other) should be used
        instead.</t>
        <t indent="0" pn="section-11.19-2">Status code 307 (Temporary Redirect), as defined in the HTTP
	standard <xref target="RFC9110" format="default" sectionFormat="of" derivedContent="HTTP"/>, requires the user agent to preserve
	the method and content of a request, thus submitting the content of
	the POST request to the redirect target.  In the HTTP standard <xref target="RFC9110" format="default" sectionFormat="of" derivedContent="HTTP"/>, only status code 303 (See Other) unambiguously
	enforces rewriting the HTTP POST request to an HTTP GET request, which
	eliminates the POST content from the redirected request.  For all
	other status codes, including status code 302 (Found), user agents are
	allowed to keep a redirected POST request as a POST and thus can
	resubmit the content.
        </t>
        <t indent="0" pn="section-11.19-3">The use of status code 307 (Temporary Redirect) results in a vulnerability when using the
<tt>redirect</tt> interaction finish method (<xref target="response-interact-finish" format="default" sectionFormat="of" derivedContent="Section 3.3.5"> </xref>). With this method, the AS
potentially prompts the RO to enter their credentials in a form that is then submitted back to the
AS (using an HTTP POST request). The AS checks the credentials and, if successful, may immediately
redirect the RO to the client instance's redirect URI. Due to the use of status code 307 (Temporary Redirect), the RO's
user agent now transmits the RO's credentials to the client instance. A malicious client instance
can then use the obtained credentials to impersonate the RO at the AS.</t>
        <t indent="0" pn="section-11.19-4">Redirection away from the initial URI in an interaction session could also leak information found in that
initial URI through the HTTP Referer header field, which would be sent by the user agent to the redirect
target. To avoid such leakage, a server can first redirect to an internal interstitial page without any identifying
or sensitive information on the URI before processing the request. When the user agent is ultimately
redirected from this page, no part of the original interaction URI will be found in the Referer header.</t>
      </section>
      <section anchor="security-as-response" numbered="true" removeInRFC="false" toc="include" pn="section-11.20">
        <name slugifiedName="name-interception-of-responses-f">Interception of Responses from the AS</name>
        <t indent="0" pn="section-11.20-1">Responses from the AS contain information vital to both the security and privacy operations of
GNAP. This information includes nonces used in cryptographic calculations, Subject Identifiers,
assertions, public keys, and information about what client software is requesting and was granted.</t>
        <t indent="0" pn="section-11.20-2">In addition, if bearer tokens are used or keys are issued alongside a bound access token, the
response from the AS contains all information necessary for use of the contained access token. Any
party that is capable of viewing such a response, such as an intermediary proxy, would be able
to exfiltrate and use this token. If the access token is instead bound to the client instance's
presented key, intermediaries no longer have sufficient information to use the token. They can
still, however, gain information about the end user as well as the actions of the client software.</t>
      </section>
      <section anchor="security-key-distribution" numbered="true" removeInRFC="false" toc="include" pn="section-11.21">
        <name slugifiedName="name-key-distribution">Key Distribution</name>
        <t indent="0" pn="section-11.21-1">GNAP does not define ways for the client instances keys to be provided to the client instances,
particularly in light of how those keys are made known to the AS. These keys could be
generated dynamically on the client software or pre-registered at the AS in a static developer portal.
The keys for client instances could also be distributed as part of the deployment process of instances
of the client software. For example, an application installation framework could generate
a key pair for each copy of client software and then both install it into the client software
upon installation and register that instance with the AS.</t>
        <t indent="0" pn="section-11.21-2">Alternatively, it's possible for the AS to generate keys to be used with access tokens that
are separate from the keys used by the client instance to request tokens. In this method,
the AS would generate the asymmetric key pair or symmetric key and return the public key or key
reference to the client instance alongside the access
token itself. The means for the AS to return generated key values to the client instance
are out of scope, since GNAP does not allow the transmission of private or shared key
information within the protocol itself.</t>
        <t indent="0" pn="section-11.21-3">Additionally, if the token is bound to a key other than the client instance's presented key, this
opens a possible attack surface for an attacker's AS to request an access token and then substitute
their own key material in the response to the client instance. The attacker's AS would need to
be able to use the same key as the client instance, but this setup would allow an attacker's AS
to make use of a compromised key within a system. This attack can be prevented by only binding
access tokens to the client instance's presented keys and by having client instances have a strong
association between which keys they expect to use and the AS they expect to use them on.
This attack is also only able to be propagated on client instances that talk to more than
one AS at runtime, which can be limited by the client software.</t>
      </section>
      <section anchor="security-key-rotation" numbered="true" removeInRFC="false" toc="include" pn="section-11.22">
        <name slugifiedName="name-key-rotation-policy">Key Rotation Policy</name>
        <t indent="0" pn="section-11.22-1">When keys are rotated, there could be a delay in the propagation of that rotation to various components in the AS's ecosystem. The AS can define its own policy regarding the timeout of the previously bound key, either making it immediately obsolete or allowing for a limited grace period during which both the previously bound key and the current key can be used for signing requests. Such a grace period can be useful when there are multiple running copies of the client that are coordinated with each other. For example, the client software could be deployed as a cloud service with multiple orchestrated nodes. Each of these copies is deployed using the same key; therefore, all the nodes represent the same client instance to the AS. In such cases, it can be difficult, or even impossible, to update the keys on all these copies in the same instant.</t>
        <t indent="0" pn="section-11.22-2">The need to accommodate such known delays in the system needs to be balanced with the risk of allowing an old key to still be used. Narrowly restricting the exposure opportunities for exploit at the AS in terms of time, place, and method makes exploit significantly more difficult, especially if the exception happens only once. For example, the AS can reject requests from the previously bound key (or any previous one before it) to cause rotation to a new key or at least ensure that the rotation happens in an idempotent way to the same new key.</t>
        <t indent="0" pn="section-11.22-3">See also the related considerations for token values in <xref target="security-network-management" format="default" sectionFormat="of" derivedContent="Section 11.33"/>.</t>
      </section>
      <section anchor="security-polling" numbered="true" removeInRFC="false" toc="include" pn="section-11.23">
        <name slugifiedName="name-interaction-finish-modes-an">Interaction Finish Modes and Polling</name>
        <t indent="0" pn="section-11.23-1">During the interaction process, the client instance usually hands control of the user experience
over to another component, be it the system browser, another application, or some action
the RO is instructed to take on another device. By using an interaction finish
method, the client instance can be securely notified by the AS when the interaction is completed
and the next phase of the protocol should occur. This process includes information that the
client instance can use to validate the finish call from the AS and prevent some injection,
session hijacking, and phishing attacks.</t>
        <t indent="0" pn="section-11.23-2">Some types of client deployment are unable to receive an interaction finish message.
Without an interaction finish method to notify it, the client instance will need to poll the
grant continuation API while waiting for the RO to approve or deny the request.
An attacker could take advantage of this situation by capturing the interaction start
parameters and phishing a legitimate user into authorizing the attacker's waiting
client instance, which would in turn have no way of associating the completed interaction
from the targeted user with the start of the request from the attacker.</t>
        <t indent="0" pn="section-11.23-3">However, it is important to note that this pattern is practically indistinguishable
from some legitimate use cases. For example, a smart device emits a code for
the RO to enter on a separate device. The smart device has to poll
because the expected behavior is that the interaction will take place on the separate
device, without a way to return information to the original device's context.</t>
        <t indent="0" pn="section-11.23-4">As such, developers need to weigh the risks of forgoing an interaction finish
method against the deployment capabilities of the client software and its
environment. Due to the increased security, an interaction finish method should
be employed whenever possible.</t>
      </section>
      <section anchor="security-sessions" numbered="true" removeInRFC="false" toc="include" pn="section-11.24">
        <name slugifiedName="name-session-management-for-inte">Session Management for Interaction Finish Methods</name>
        <t indent="0" pn="section-11.24-1">When using an interaction finish method such as <tt>redirect</tt> or <tt>push</tt>, the client instance receives
an unsolicited inbound request from an unknown party over HTTPS. The client
instance needs to be able to successfully associate this incoming request with a specific pending
grant request being managed by the client instance. If the client instance is not careful and precise about
this, an attacker could associate their own session at the client instance with a stolen interaction
response. The means of preventing this vary by the type of client software and interaction methods in use.
Some common patterns are enumerated here.</t>
        <t indent="0" pn="section-11.24-2">If the end user interacts with the client instance through a web browser and the <tt>redirect</tt>
interaction finish method is used, the client instance can ensure that the incoming HTTP request
from the finish method is presented in the same browser session that the grant request was
started in. This technique is particularly useful when the <tt>redirect</tt> interaction start mode
is used as well, since in many cases, the end user will follow the redirection with the
same browser that they are using to interact with the client instance.
The client instance can then store the relevant pending grant information in the
session, either in the browser storage directly (such as with a single-page application) or
in an associated session store on a backend server. In both cases, when the incoming request
reaches the client instance, the session information can be used to ensure that the same party
that started the request is present as the request finishes.</t>
        <t indent="0" pn="section-11.24-3">Ensuring that the same party that started a request is present when that request finishes can
prevent phishing attacks, where an attacker starts a request at an honest client instance and
tricks an honest RO into authorizing it. For example, if an honest end user (that also acts as the
RO) wants to start a request through a client instance controlled by the attacker, the attacker can
start a request at an honest client instance and then redirect the honest end user to the
interaction URI from the attackers session with the honest client instance. If the honest end user
then fails to realize that they are not authorizing the attacker-controlled client instance (with which
it started its request) but instead the honest client instance when interacting with the AS, the attacker's
session with the honest client instance would be authorized. This would give the attacker access to
the honest end user's resources that the honest client instance is authorized to access. However,
if after the interaction, the AS redirects the honest end user back to the client instance whose
grant request the end user just authorized, the honest end user is redirected to the honest client
instance. The honest client instance can then detect that the end user is not the party that started the
request, since the request at the honest client instance was started by the
attacker. This detection can prevent the attack. This is related to the discussion in <xref target="security-impersonation" format="default" sectionFormat="of" derivedContent="Section 11.15"/>, because again
the attack can be prevented by the AS informing the user as much as possible about the client
instance that is to be authorized.</t>
        <t indent="0" pn="section-11.24-4">If the end user does not interact with the client instance through a web browser or the interaction
start method does not use the same browser or device that the end user is interacting through
(such as the launch of a second device through a scannable code or presentation of a user code), the
client instance will not be able to strongly associate an incoming HTTP request with an established
session with the end user. This is also true when the <tt>push</tt> interaction finish method is used,
since the HTTP request comes directly from the interaction component of the AS. In these
circumstances, the client instance can at least ensure that the incoming HTTP
request can be uniquely associated with an ongoing grant request by making the interaction finish
callback URI unique for the grant when making the interaction request (<xref target="request-interact-finish" format="default" sectionFormat="of" derivedContent="Section 2.5.2"> </xref>).
Mobile applications and other client instances that generally serve only a single end user at a time
can use this unique incoming URL to differentiate between a legitimate incoming request and
an attacker's stolen request.</t>
      </section>
      <section anchor="security-interact-hash" numbered="true" removeInRFC="false" toc="include" pn="section-11.25">
        <name slugifiedName="name-calculating-interaction-has">Calculating Interaction Hash</name>
        <t indent="0" pn="section-11.25-1">While the use of GNAP's signing mechanisms and token-protected grant API provides
significant security protections to the protocol, the interaction reference mechanism
is susceptible to monitoring, capture, and injection by an attacker. To combat this, GNAP
requires the calculation and verification of an interaction hash. A client instance
might be tempted to skip this step, but doing so leaves the client instance open to
injection and manipulation by an attacker that could lead to additional issues.</t>
        <t indent="0" pn="section-11.25-2">The calculation of the interaction hash value provides defense in depth, allowing a client
instance to protect itself from spurious injection of interaction references when using an
interaction finish method. The AS is protected during this attack through the
continuation access token being bound to the expected interaction reference,
but without hash calculation, the attacker could cause the client to make an
HTTP request on command, which could itself be manipulated -- for example, by including
a malicious value in the interaction reference designed to attack the AS.
With both of these in place, an attacker attempting to substitute the interaction reference
is stopped in several places.</t>
        <figure align="left" suppress-title="false" pn="figure-11">
          <name slugifiedName="name-interaction-hash-attack">Interaction Hash Attack</name>
          <artset pn="section-11.25-3.1">
            <artwork type="svg" align="left" pn="section-11.25-3.1.1"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="448" width="456" viewBox="0 0 456 448" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px" stroke-linecap="round">
                <path d="M 8,48 L 8,416" fill="none" stroke="black"/>
                <path d="M 64,48 L 64,416" fill="none" stroke="black"/>
                <path d="M 120,48 L 120,224" fill="none" stroke="black"/>
                <path d="M 120,256 L 120,272" fill="none" stroke="black"/>
                <path d="M 120,336 L 120,368" fill="none" stroke="black"/>
                <path d="M 120,400 L 120,416" fill="none" stroke="black"/>
                <path d="M 192,48 L 192,224" fill="none" stroke="black"/>
                <path d="M 192,256 L 192,272" fill="none" stroke="black"/>
                <path d="M 192,336 L 192,368" fill="none" stroke="black"/>
                <path d="M 192,400 L 192,416" fill="none" stroke="black"/>
                <path d="M 248,32 L 248,160" fill="none" stroke="black"/>
                <path d="M 248,224 L 248,304" fill="none" stroke="black"/>
                <path d="M 248,336 L 248,432" fill="none" stroke="black"/>
                <path d="M 320,32 L 320,160" fill="none" stroke="black"/>
                <path d="M 320,224 L 320,304" fill="none" stroke="black"/>
                <path d="M 320,336 L 320,432" fill="none" stroke="black"/>
                <path d="M 376,32 L 376,432" fill="none" stroke="black"/>
                <path d="M 448,32 L 448,432" fill="none" stroke="black"/>
                <path d="M 24,32 L 48,32" fill="none" stroke="black"/>
                <path d="M 136,32 L 176,32" fill="none" stroke="black"/>
                <path d="M 248,32 L 320,32" fill="none" stroke="black"/>
                <path d="M 376,32 L 448,32" fill="none" stroke="black"/>
                <path d="M 192,94 L 208,94" fill="none" stroke="black"/>
                <path d="M 192,98 L 208,98" fill="none" stroke="black"/>
                <path d="M 224,94 L 240,94" fill="none" stroke="black"/>
                <path d="M 224,98 L 240,98" fill="none" stroke="black"/>
                <path d="M 320,112 L 336,112" fill="none" stroke="black"/>
                <path d="M 352,112 L 368,112" fill="none" stroke="black"/>
                <path d="M 328,128 L 344,128" fill="none" stroke="black"/>
                <path d="M 360,128 L 376,128" fill="none" stroke="black"/>
                <path d="M 200,142 L 216,142" fill="none" stroke="black"/>
                <path d="M 200,146 L 216,146" fill="none" stroke="black"/>
                <path d="M 232,142 L 248,142" fill="none" stroke="black"/>
                <path d="M 232,146 L 248,146" fill="none" stroke="black"/>
                <path d="M 192,174 L 216,174" fill="none" stroke="black"/>
                <path d="M 192,178 L 216,178" fill="none" stroke="black"/>
                <path d="M 232,174 L 368,174" fill="none" stroke="black"/>
                <path d="M 232,178 L 368,178" fill="none" stroke="black"/>
                <path d="M 200,206 L 336,206" fill="none" stroke="black"/>
                <path d="M 200,210 L 336,210" fill="none" stroke="black"/>
                <path d="M 352,206 L 376,206" fill="none" stroke="black"/>
                <path d="M 352,210 L 376,210" fill="none" stroke="black"/>
                <path d="M 64,238 L 88,238" fill="none" stroke="black"/>
                <path d="M 64,242 L 88,242" fill="none" stroke="black"/>
                <path d="M 104,238 L 240,238" fill="none" stroke="black"/>
                <path d="M 104,242 L 240,242" fill="none" stroke="black"/>
                <path d="M 320,256 L 336,256" fill="none" stroke="black"/>
                <path d="M 352,256 L 368,256" fill="none" stroke="black"/>
                <path d="M 328,272 L 344,272" fill="none" stroke="black"/>
                <path d="M 360,272 L 376,272" fill="none" stroke="black"/>
                <path d="M 72,286 L 216,286" fill="none" stroke="black"/>
                <path d="M 72,290 L 216,290" fill="none" stroke="black"/>
                <path d="M 232,286 L 248,286" fill="none" stroke="black"/>
                <path d="M 232,290 L 248,290" fill="none" stroke="black"/>
                <path d="M 64,318 L 88,318" fill="none" stroke="black"/>
                <path d="M 64,322 L 88,322" fill="none" stroke="black"/>
                <path d="M 104,318 L 368,318" fill="none" stroke="black"/>
                <path d="M 104,322 L 368,322" fill="none" stroke="black"/>
                <path d="M 72,350 L 88,350" fill="none" stroke="black"/>
                <path d="M 72,354 L 88,354" fill="none" stroke="black"/>
                <path d="M 104,350 L 120,350" fill="none" stroke="black"/>
                <path d="M 104,354 L 120,354" fill="none" stroke="black"/>
                <path d="M 64,382 L 88,382" fill="none" stroke="black"/>
                <path d="M 64,386 L 88,386" fill="none" stroke="black"/>
                <path d="M 104,382 L 240,382" fill="none" stroke="black"/>
                <path d="M 104,386 L 240,386" fill="none" stroke="black"/>
                <path d="M 320,400 L 336,400" fill="none" stroke="black"/>
                <path d="M 352,400 L 368,400" fill="none" stroke="black"/>
                <path d="M 24,432 L 48,432" fill="none" stroke="black"/>
                <path d="M 136,432 L 176,432" fill="none" stroke="black"/>
                <path d="M 248,432 L 320,432" fill="none" stroke="black"/>
                <path d="M 376,432 L 448,432" fill="none" stroke="black"/>
                <path d="M 24,32 C 15.16936,32 8,39.16936 8,48" fill="none" stroke="black"/>
                <path d="M 48,32 C 56.83064,32 64,39.16936 64,48" fill="none" stroke="black"/>
                <path d="M 136,32 C 127.16936,32 120,39.16936 120,48" fill="none" stroke="black"/>
                <path d="M 176,32 C 184.83064,32 192,39.16936 192,48" fill="none" stroke="black"/>
                <path d="M 24,432 C 15.16936,432 8,424.83064 8,416" fill="none" stroke="black"/>
                <path d="M 48,432 C 56.83064,432 64,424.83064 64,416" fill="none" stroke="black"/>
                <path d="M 136,432 C 127.16936,432 120,424.83064 120,416" fill="none" stroke="black"/>
                <path d="M 176,432 C 184.83064,432 192,424.83064 192,416" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="376,400 364,394.4 364,405.6" fill="black" transform="rotate(0,368,400)"/>
                <polygon class="arrowhead" points="376,320 364,314.4 364,325.6" fill="black" transform="rotate(0,368,320)"/>
                <polygon class="arrowhead" points="376,256 364,250.4 364,261.6" fill="black" transform="rotate(0,368,256)"/>
                <polygon class="arrowhead" points="376,176 364,170.4 364,181.6" fill="black" transform="rotate(0,368,176)"/>
                <polygon class="arrowhead" points="376,112 364,106.4 364,117.6" fill="black" transform="rotate(0,368,112)"/>
                <polygon class="arrowhead" points="336,272 324,266.4 324,277.6" fill="black" transform="rotate(180,328,272)"/>
                <polygon class="arrowhead" points="336,128 324,122.4 324,133.6" fill="black" transform="rotate(180,328,128)"/>
                <polygon class="arrowhead" points="248,384 236,378.4 236,389.6" fill="black" transform="rotate(0,240,384)"/>
                <polygon class="arrowhead" points="248,240 236,234.4 236,245.6" fill="black" transform="rotate(0,240,240)"/>
                <polygon class="arrowhead" points="248,96 236,90.4 236,101.6" fill="black" transform="rotate(0,240,96)"/>
                <polygon class="arrowhead" points="208,208 196,202.4 196,213.6" fill="black" transform="rotate(180,200,208)"/>
                <polygon class="arrowhead" points="208,144 196,138.4 196,149.6" fill="black" transform="rotate(180,200,144)"/>
                <polygon class="arrowhead" points="80,352 68,346.4 68,357.6" fill="black" transform="rotate(180,72,352)"/>
                <polygon class="arrowhead" points="80,288 68,282.4 68,293.6" fill="black" transform="rotate(180,72,288)"/>
                <g class="text">
                  <text x="36" y="52">User</text>
                  <text x="156" y="52">Attacker</text>
                  <text x="284" y="52">Client</text>
                  <text x="412" y="52">AS</text>
                  <text x="284" y="68">Instance</text>
                  <text x="216" y="100">1</text>
                  <text x="344" y="116">2</text>
                  <text x="352" y="132">3</text>
                  <text x="224" y="148">4</text>
                  <text x="224" y="180">5</text>
                  <text x="248" y="196">|</text>
                  <text x="320" y="196">|</text>
                  <text x="344" y="212">6</text>
                  <text x="96" y="244">A</text>
                  <text x="344" y="260">B</text>
                  <text x="352" y="276">C</text>
                  <text x="224" y="292">D</text>
                  <text x="120" y="308">|</text>
                  <text x="192" y="308">|</text>
                  <text x="96" y="324">E</text>
                  <text x="96" y="356">7</text>
                  <text x="96" y="388">F</text>
                  <text x="344" y="404">G</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="left" pn="section-11.25-3.1.2">
 .----.        .------.       +--------+      +--------+
| User |      |Attacker|      | Client |      |   AS   |
|      |      |        |      |Instance|      |        |
|      |      |        |      |        |      |        |
|      |      |        +=(1)=&gt;|        |      |        |
|      |      |        |      |        +-(2)-&gt;|        |
|      |      |        |      |        |&lt;-(3)-+        |
|      |      |        |&lt;=(4)=+        |      |        |
|      |      |        |      |        |      |        |
|      |      |        +==(5)================&gt;|        |
|      |      |        |      |        |      |        |
|      |      |        |&lt;================(6)==+        |
|      |      |        |      |        |      |        |
|      +==(A)================&gt;|        |      |        |
|      |      |        |      |        +-(B)-&gt;|        |
|      |      |        |      |        |&lt;-(C)-+        |
|      |&lt;=================(D)=+        |      |        |
|      |      |        |      |        |      |        |
|      +==(E)================================&gt;|        |
|      |      |        |      |        |      |        |
|      |&lt;=(7)=+        |      |        |      |        |
|      |      |        |      |        |      |        |
|      +==(F)================&gt;|        |      |        |
|      |      |        |      |        +-(G)-&gt;|        |
|      |      |        |      |        |      |        |
 `----`        `------`       +--------+      +--------+
</artwork>
          </artset>
        </figure>
        <t indent="0" pn="section-11.25-4">Prerequisites: The client instance can allow multiple end users to
  access the same AS. The attacker is attempting to associate their rights
  with the target user's session.</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-11.25-5">
          <li pn="section-11.25-5.1">
            <t indent="0" pn="section-11.25-5.1.1">(1) The attacker starts a session at the client instance.</t>
          </li>
          <li pn="section-11.25-5.2">
            <t indent="0" pn="section-11.25-5.2.1">(2) The client instance creates a grant request with nonce CN1.</t>
          </li>
          <li pn="section-11.25-5.3">
            <t indent="0" pn="section-11.25-5.3.1">(3) The AS responds to the grant request with a
  need to interact, nonce SN1, and a continuation token, CT1.</t>
          </li>
          <li pn="section-11.25-5.4">
            <t indent="0" pn="section-11.25-5.4.1">(4) The client instructs the attacker to interact at the AS.</t>
          </li>
          <li pn="section-11.25-5.5">
            <t indent="0" pn="section-11.25-5.5.1">(5) The attacker interacts at the AS.</t>
          </li>
          <li pn="section-11.25-5.6">
            <t indent="0" pn="section-11.25-5.6.1">(6) The AS completes the interact finish with interact reference IR1 and
  interact hash IH1 calculated from (CN1 + SN1 + IR1 + AS).
  The attacker prevents IR1 from returning to the client instance.</t>
          </li>
          <li pn="section-11.25-5.7">
            <t indent="0" pn="section-11.25-5.7.1">(A) The target user starts a session at the client instance.</t>
          </li>
          <li pn="section-11.25-5.8">
            <t indent="0" pn="section-11.25-5.8.1">(B) The client instance creates a grant request with nonce CN2.</t>
          </li>
          <li pn="section-11.25-5.9">
            <t indent="0" pn="section-11.25-5.9.1">(C) The AS responds to the grant request with a
  need to interact, nonce SN2, and a continuation token, CT2.</t>
          </li>
          <li pn="section-11.25-5.10">
            <t indent="0" pn="section-11.25-5.10.1">(D) The client instance instructs the user to interact at the AS.</t>
          </li>
          <li pn="section-11.25-5.11">
            <t indent="0" pn="section-11.25-5.11.1">(E) The target user interacts at the AS.</t>
          </li>
          <li pn="section-11.25-5.12">
            <t indent="0" pn="section-11.25-5.12.1">(7) Before the target user can complete their interaction, the attacker
  delivers their own interact reference IR1 into the user's session. The attacker
  cannot calculate the appropriate hash because the attacker does not have
  access to CN2 and SN2.</t>
          </li>
          <li pn="section-11.25-5.13">
            <t indent="0" pn="section-11.25-5.13.1">(F) The target user triggers the interaction finish in their own session
  with the attacker's IR1.</t>
          </li>
          <li pn="section-11.25-5.14">
            <t indent="0" pn="section-11.25-5.14.1">(G) If the client instance is checking the interaction hash, the attack
  stops here because the hash calculation of (CN2 + SN2 + IR1 + AS) will fail.
  If the client instance does not check the interaction hash, the client instance
  will be tricked into submitting the interaction reference to the AS. Here, the AS will
  reject the interaction request because it is presented against CT2 and not
  CT1 as expected. However, an attacker who has potentially injected CT1 as
  the value of CT2 would be able to continue the attack.</t>
          </li>
        </ul>
        <t indent="0" pn="section-11.25-6">Even with additional checks in place, client instances using interaction finish mechanisms are responsible
for checking the interaction hash to provide security to the overall system.</t>
      </section>
      <section anchor="security-client-storage" numbered="true" removeInRFC="false" toc="include" pn="section-11.26">
        <name slugifiedName="name-storage-of-information-duri">Storage of Information during Interaction and Continuation</name>
        <t indent="0" pn="section-11.26-1">When starting an interactive grant request, a client application has a number of protocol elements
that it needs to manage, including nonces, references, keys, access tokens, and other elements.
During the interaction process, the client instance usually hands control of the user experience
over to another component, be it the system browser, another application, or some action
the RO is instructed to take on another device. In order for the client instance
to make its continuation call, it will need to recall all of these protocol elements at a future time. Usually,
this means the client instance will need to store these protocol elements in some retrievable
fashion.</t>
        <t indent="0" pn="section-11.26-2">If the security protocol elements are stored on the end user's device, such as in browser
storage or in local application data stores, capture and exfiltration of this information could
allow an attacker to continue a pending transaction instead of the client instance. Client
software can make use of secure storage mechanisms, including hardware-based key and data
storage, to prevent such exfiltration.</t>
        <t indent="0" pn="section-11.26-3">Note that in GNAP, the client instance has to choose its interaction finish URI prior to making
the first call to the AS. As such, the interaction finish URI will often have a unique identifier
for the ongoing request, allowing the client instance to access the correct portion of its
storage. Since this URI is passed to other parties and often used through a browser,
this URI should not contain any security-sensitive information that would be
valuable to an attacker, such as any token identifier, nonce, or user information. Instead, a
cryptographically random value is suggested, and that value should be used to index into
a secure session or storage mechanism.</t>
      </section>
      <section anchor="security-continuation" numbered="true" removeInRFC="false" toc="include" pn="section-11.27">
        <name slugifiedName="name-denial-of-service-dos-throu">Denial of Service (DoS) through Grant Continuation</name>
        <t indent="0" pn="section-11.27-1">When a client instance starts off an interactive process, it will eventually need to continue the grant
request in a subsequent message to the AS. It's possible for a naive client implementation to continuously
send continuation requests to the AS while waiting for approval, especially if no interaction
finish method is used. Such constant requests could overwhelm the AS's ability to respond to both
these and other requests.</t>
        <t indent="0" pn="section-11.27-2">To mitigate this for well-behaved client software, the continuation response contains a <tt>wait</tt> parameter
that is intended to tell the client instance how long it should wait until making its next request.
This value can be used to back off client software that is checking too quickly by returning increasing
wait times for a single client instance.</t>
        <t indent="0" pn="section-11.27-3">If client software ignores the <tt>wait</tt> value and makes its continuation calls too quickly or if the
client software assumes the absence of the <tt>wait</tt> values means it should poll immediately, the AS
can choose to return errors to the offending client instance, including possibly canceling the
ongoing grant request. With well-meaning client software, these errors can indicate a need to change
the client software's programmed behavior.</t>
      </section>
      <section anchor="security-random-exhaustion" numbered="true" removeInRFC="false" toc="include" pn="section-11.28">
        <name slugifiedName="name-exhaustion-of-random-value-">Exhaustion of Random Value Space</name>
        <t indent="0" pn="section-11.28-1">Several parts of the GNAP process make use of unguessable randomized values, such as nonces,
tokens, user codes, and randomized URIs. Since these values are intended to be unique, a sufficiently
powerful attacker could make a large number of requests to trigger generation of randomized
values in an attempt to exhaust the random number generation space. While this attack is
particularly applicable to the AS, client software could likewise be targeted by an attacker
triggering new grant requests against an AS.</t>
        <t indent="0" pn="section-11.28-2">To mitigate this, software can ensure that its random values are chosen from a significantly
large pool so that exhaustion of that pool is prohibitive for an attacker. Additionally, the
random values can be time-boxed in such a way that their validity windows are reasonably short.
Since many of the random values used within GNAP are used within limited portions of the protocol,
it is reasonable for a particular random value to be valid for only a small amount of time.
For example, the nonces used for interaction finish hash calculation need only to be valid while
the client instance is waiting for the finish callback and can be functionally expired
when the interaction has completed. Similarly, artifacts like access tokens and the interaction
reference can be limited to have lifetimes tied to their functional utility. Finally, each
different category of artifact (nonce, token, reference, identifier, etc.) can be
generated from a separate random pool of values instead of a single global value space.</t>
      </section>
      <section anchor="security-front-channel" numbered="true" removeInRFC="false" toc="include" pn="section-11.29">
        <name slugifiedName="name-front-channel-uris">Front-Channel URIs</name>
        <t indent="0" pn="section-11.29-1">Some interaction methods in GNAP make use of URIs accessed through the end user's browser,
known collectively as front-channel communication. These URIs are most notably present in
the <tt>redirect</tt> interaction <tt>start</tt> method and the <tt>redirect</tt> interaction <tt>finish</tt> mode. Since
these URIs are intended to be given to the end user, the end user and their browser will be
subjected to anything hosted at that URI including viruses, malware, and phishing scams. This
kind of risk is inherent to all redirection-based protocols, including GNAP, when used in this way.</t>
        <t indent="0" pn="section-11.29-2">When talking to a new or unknown AS, a client instance might want to check the URI from the
interaction <tt>start</tt> against a blocklist and warn the end user before redirecting them. Many
client instances will provide an interstitial message prior to redirection in order to prepare
the user for control of the user experience being handed to the domain of the AS, and such a
method could be used to warn the user of potential threats (for instance, a rogue AS impersonating
a well-known service provider). Client software can also prevent this by managing an allowlist
of known and trusted ASes.</t>
        <t indent="0" pn="section-11.29-3">Alternatively, an attacker could start a GNAP request with a known and trusted AS but include
their own attack site URI as the callback for the redirect <tt>finish</tt> method. The attacker would then send
the interaction <tt>start</tt> URI to the victim and get them to click on it. Since the URI is at
the known AS, the victim is inclined to do so. The victim will then be prompted to approve the
attacker's application, and in most circumstances, the victim will then be redirected to the
attacker's site whether or not the user approved the request. The AS could mitigate this partially
by using a blocklist and allowlist of interaction <tt>finish</tt> URIs during the client instance's
initial request, but this approach can be  especially difficult if the URI has any dynamic portion
chosen by the client software. The AS can couple these checks with policies associated with the
client instance that has been authenticated in the request. If the AS has any doubt about the
interaction finish URI, the AS can provide an interstitial warning to the end user before
processing the redirect.</t>
        <t indent="0" pn="section-11.29-4">Ultimately, all protocols that use redirect-based communication through the user's browser are
susceptible to having an attacker try to co-opt one or more of those URIs in order to harm the
user. It is the responsibility of the AS and the client software to provide appropriate warnings,
education, and mitigation to protect end users.</t>
      </section>
      <section anchor="security-assertions" numbered="true" removeInRFC="false" toc="include" pn="section-11.30">
        <name slugifiedName="name-processing-assertions">Processing Assertions</name>
        <t indent="0" pn="section-11.30-1">Identity assertions can be used in GNAP to convey subject information, both from the AS to the
client instance in a response (<xref target="response-subject" format="default" sectionFormat="of" derivedContent="Section 3.4"> </xref>) and from the client instance to the AS in
a request (<xref target="request-subject" format="default" sectionFormat="of" derivedContent="Section 2.2"> </xref>). In both of these circumstances, when an assertion is passed in
GNAP, the receiver of the assertion needs to parse and process the assertion. As assertions are
complex artifacts with their own syntax and security, special care needs to be taken to prevent the
assertion values from being used as an attack vector.</t>
        <t indent="0" pn="section-11.30-2">All assertion processing needs to account for the security aspects of the assertion format in
use. In particular, the processor needs to parse the assertion from a JSON string object
and apply the appropriate cryptographic processes to ensure the integrity of the assertion.</t>
        <t indent="0" pn="section-11.30-3">For example, when SAML 2.0 assertions are used, the receiver has to parse an XML document. There are
many well-known security vulnerabilities in XML parsers, and the XML standard itself can be
attacked through the use of processing instructions and entity expansions to cause problems
with the processor. Therefore, any system capable of processing SAML 2.0 assertions also needs to
have a secure and correct XML parser. In addition to this, the SAML 2.0 specification uses XML
Signatures, which have their own implementation problems that need to be accounted for. Similar
requirements exist for OpenID Connect ID Token, which is based on the JWT format
and the related JOSE cryptography suite.</t>
      </section>
      <section anchor="security-cuckoo" numbered="true" removeInRFC="false" toc="include" pn="section-11.31">
        <name slugifiedName="name-stolen-token-replay">Stolen Token Replay</name>
        <t indent="0" pn="section-11.31-1">If a client instance can request tokens at multiple ASes and the client instance uses the same keys
to make its requests across those different ASes, then it is possible for an attacker to replay a
stolen token issued by an honest AS from a compromised AS, thereby binding the stolen token to
the client instance's key in a different context. The attacker can manipulate the client instance
into using the stolen token at an RS, particularly at an RS that is expecting a token from the
honest AS. Since the honest AS issued the token and the client instance presents the token with
its expected bound key, the attack succeeds.</t>
        <t indent="0" pn="section-11.31-2">This attack has several preconditions. In this attack, the attacker does not need access to the
client instance's key and cannot use the stolen token directly at the RS, but the attacker is able
to get the access token value in some fashion. The client instance also needs to be configured to
talk to multiple ASes, including the attacker's controlled AS. Finally, the client instance needs
to be able to be manipulated by the attacker to call the RS while using a token issued from the
stolen AS. The RS does not need to be compromised or made to trust the attacker's AS.</t>
        <t indent="0" pn="section-11.31-3">To protect against this attack, the client instance can use a different key for each AS that it
talks to. Since the replayed token will be bound to the key used at the honest AS, the
uncompromised RS will reject the call since the client instance will be using the key used at
the attacker's AS instead with the same token.
When the MTLS key proofing method is used, a client instance can use self-signed
certificates to use a different key for each AS that it talks to, as discussed in
<xref target="security-mtls-patterns" format="default" sectionFormat="of" derivedContent="Section 11.4"/>.</t>
        <t indent="0" pn="section-11.31-4">Additionally, the client instance can keep a strong association between the RS and a specific AS
that it trusts to issue tokens for that RS. This strong binding also helps against some forms of
AS mix-up attacks (<xref target="security-mixup" format="default" sectionFormat="of" derivedContent="Section 11.12"> </xref>). Managing this binding is outside the scope of this specification,
but it can be managed either as a configuration element for the client instance or dynamically
through discovering the AS from the RS (<xref target="rs-request-without-token" format="default" sectionFormat="of" derivedContent="Section 9.1"> </xref>).</t>
        <t indent="0" pn="section-11.31-5">The details of this attack, with additional discussion and considerations, are available in Section 3.2 of <xref target="HELMSCHMIDT2022" format="default" sectionFormat="of" derivedContent="HELMSCHMIDT2022"/>.</t>
      </section>
      <section anchor="security-stateless-tokens" numbered="true" removeInRFC="false" toc="include" pn="section-11.32">
        <name slugifiedName="name-self-contained-stateless-ac">Self-Contained Stateless Access Tokens</name>
        <t indent="0" pn="section-11.32-1">The contents and format of the access token are at the discretion of the AS and are opaque
to the client instance within GNAP. As discussed in
<xref target="I-D.ietf-gnap-resource-servers" format="default" sectionFormat="of" derivedContent="GNAP-RS"/>, the AS and RS can make use of stateless access tokens
with an internal structure and format. These access tokens allow an RS to validate the token without
having to make any external calls at runtime, allowing for benefits in some deployments, the
discussion of which is outside the scope of this specification.</t>
        <t indent="0" pn="section-11.32-2">However, the use of such self-contained access tokens has an effect on the ability of the AS to
provide certain functionality defined within this specification. Specifically, since the access
token is self-contained, it is difficult or impossible for an AS to signal to all RSs within an
ecosystem when a specific access token has been revoked. Therefore, an AS in such an ecosystem
should probably not offer token revocation functionality to client instances, since the client
instance's calls to such an endpoint are effectively meaningless. However, a client instance calling
the token revocation function will also throw out its copy of the token, so such a placebo endpoint
might not be completely meaningless. Token rotation is similarly difficult because the AS has to
revoke the old access token after a rotation call has been made. If the access tokens are
completely self-contained and non-revocable, this means that there will be a period of time during
which both the old and new access tokens are valid and usable, which is an increased security risk
for the environment.</t>
        <t indent="0" pn="section-11.32-3">These problems can be mitigated by keeping the validity time windows of self-contained access tokens
reasonably short, limiting the time after a revocation event that a revoked token could be used.
Additionally, the AS could proactively signal to RSs under its control identifiers for revoked
tokens that have yet to expire. This type of information push would be expected to be relatively
small and infrequent, and its implementation is outside the scope of this specification.</t>
      </section>
      <section anchor="security-network-management" numbered="true" removeInRFC="false" toc="include" pn="section-11.33">
        <name slugifiedName="name-network-problems-and-token-">Network Problems and Token and Grant Management</name>
        <t indent="0" pn="section-11.33-1">If a client instance makes a call to rotate an access token but the network connection is dropped
before the client instance receives the response with the new access token, the system as a whole
can end up in an inconsistent state, where the AS has already rotated the old access token and
invalidated it, but the client instance only has access to the invalidated access token and not the
newly rotated token value. If the client instance retries the rotation request, it would fail
because the client is no longer presenting a valid and current access token. A similar situation
can occur during grant continuation, where the same client instance calls to continue or update
a grant request without successfully receiving the results of the update.</t>
        <t indent="0" pn="section-11.33-2">To combat this, both
grant management (<xref target="continue-request" format="default" sectionFormat="of" derivedContent="Section 5"> </xref>) and token management (<xref target="token-management" format="default" sectionFormat="of" derivedContent="Section 6"> </xref>) can be designed to be
idempotent, where subsequent calls to the same function with the same credentials are meant to
produce the same results. For example, multiple calls to rotate the same access token need to
result in the same rotated token value, within a reasonable time window.</t>
        <t indent="0" pn="section-11.33-3">In practice, an AS can hold onto an old token value for such limited purposes. For example, to
support rotating access tokens over unreliable networks, the AS receives the initial request to
rotate an access token and creates a new token value and returns it. The AS also marks the old
token value as having been used to create the newly rotated token value. If the AS sees the old
token value within a small enough time window, such as a few seconds since the first rotation
attempt, the AS can return the same rotated access token value. Furthermore, once the system has seen the
newly rotated token in use, the original token can be discarded because the client instance has
proved that it did receive the token. The result of this is a system that is
eventually self-consistent without placing an undue complexity burden on the client instance
to manage problematic networks.</t>
      </section>
      <section anchor="security-ssrf" numbered="true" removeInRFC="false" toc="include" pn="section-11.34">
        <name slugifiedName="name-server-side-request-forgery">Server-Side Request Forgery (SSRF)</name>
        <t indent="0" pn="section-11.34-1">There are several places within GNAP where a URI can be given to a party, causing it to fetch that
URI during normal operation of the protocol. If an attacker is able to control the value of one of
these URIs within the protocol, the attacker could cause the target system to execute a request on
a URI that is within reach of the target system but normally unavailable to the attacker. 
Examples include an attacker sending a URL of <tt>http://localhost/admin</tt> to cause the server to access an
internal function on itself or <tt>https://192.168.0.14/</tt> to call a service behind a firewall.
Even if the attacker does not gain access to the results of the call, the side effects of such
requests coming from a trusted host can be problematic to the security and sanctity of such
otherwise unexposed endpoints. This can be particularly problematic if such a URI is used to
call non-HTTP endpoints, such as remote code execution services local to the AS.</t>
        <t indent="0" pn="section-11.34-2">The most vulnerable place in this specification is the
push-based post-interaction finish method (<xref target="interaction-pushback" format="default" sectionFormat="of" derivedContent="Section 4.2.2"> </xref>), as the client instance is
less trusted than the AS and can use this method to make the AS call an arbitrary URI. While it is
not required by the protocol, the AS can fetch other URIs provided by the client instance, such as the logo
image or home page, for verification or privacy-preserving purposes before displaying them to the
RO as part of a consent screen. Even if the AS does not fetch these URIs, their use in
GNAP's normal operation could cause an attack against the end user's browser as it fetches these
same attack URIs. Furthermore, extensions to GNAP that allow or require
URI fetch could also be similarly susceptible, such as a system for having the AS fetch a client
instance's keys from a presented URI instead of the client instance presenting the key by value.
Such extensions are outside the scope of this specification, but any system deploying such an
extension would need to be aware of this issue.</t>
        <t indent="0" pn="section-11.34-3">To help mitigate this problem, similar approaches that protect parties against
malicious redirects (<xref target="security-front-channel" format="default" sectionFormat="of" derivedContent="Section 11.29"> </xref>) can be used. For example, all URIs that can result
in a direct request being made by a party in the protocol can be filtered through an allowlist or
blocklist. For example, an AS that supports the <tt>push</tt>-based interaction <tt>finish</tt> method can compare the
callback URI in the interaction request to a known URI for a pre-registered client instance, or it
can ensure that the URI is not on a blocklist of sensitive URLs such as internal network addresses.
However, note that because these types of calls happen outside of the view of human interaction,
it is not usually feasible to provide notification and warning to someone before the request
needs to be executed, as is the case with redirection URLs. As such, SSRF is somewhat more difficult
to manage at runtime, and systems should generally refuse to fetch a URI if unsure.</t>
      </section>
      <section anchor="security-multiple-key-formats" numbered="true" removeInRFC="false" toc="include" pn="section-11.35">
        <name slugifiedName="name-multiple-key-formats">Multiple Key Formats</name>
        <t indent="0" pn="section-11.35-1">All keys presented by value are only allowed to be in a single format. While it would seem
beneficial to allow keys to be sent in multiple formats in case the receiver doesn't understand
one or more of the formats used, there are security issues with such a feature.
If multiple keys formats are allowed,
receivers of these key definitions would need to be able to make sure that it's the same
key represented in each field and not simply use one of the key formats without checking for
equivalence. If equivalence is not carefully checked, it is possible for an attacker to insert
their own key into one of the formats without needing to have control over the other formats. This
could potentially lead to a situation where one key is used by part of the system (such as
identifying the client instance) and a different key in a different format in the same message is
used for other things (such as calculating signature validity). However, in such cases, it is
impossible for the receiver to ensure that all formats contain the same key information since it is
assumed that the receiver cannot understand all of the formats.</t>
        <t indent="0" pn="section-11.35-2">To combat this, all keys presented by value have to be in exactly one supported format known
by the receiver as discussed in <xref target="key-format" format="default" sectionFormat="of" derivedContent="Section 7.1"/>. In most cases, a client instance is going to be configured with its keys in a
single format, and it will simply present that format as is to the AS in its request. A client
instance capable of multiple formats can use AS discovery (<xref target="discovery" format="default" sectionFormat="of" derivedContent="Section 9"> </xref>) to determine which formats
are supported, if desired. An AS should be generous in supporting many different key formats to
allow different types of client software and client instance deployments. An AS implementation
should try to support multiple formats to allow a variety of client software to connect.</t>
      </section>
      <section anchor="security-async" numbered="true" removeInRFC="false" toc="include" pn="section-11.36">
        <name slugifiedName="name-asynchronous-interactions">Asynchronous Interactions</name>
        <t indent="0" pn="section-11.36-1">GNAP allows the RO to be contacted by the AS asynchronously, outside the regular flow of the
protocol. This allows for some advanced use cases, such as cross-user authentication or information
release, but such advanced use cases have some distinct issues that implementors need to be fully
aware of before using these features.</t>
        <t indent="0" pn="section-11.36-2">First, in many applications, the return of subject information to the client instance could
indicate to the client instance that the end user is the party represented by that information,
functionally allowing the end user to authenticate to the client application. While the details of
a fully functional authentication protocol are outside the scope of GNAP, it is a common
exercise for a client instance to request information about the end user. This is facilitated
by several interaction methods (<xref target="interaction-start" format="default" sectionFormat="of" derivedContent="Section 4.1"> </xref>) defined in GNAP that allow the end user
to begin interaction directly with the AS. However, when the subject of the information is
intentionally not the end user, the client application will need some way to differentiate between
requests for authentication of the end user and requests for information about a different user.
Confusing these states could lead to an attacker having their account associated with a privileged
user. Client instances can mitigate this by having distinct code paths for primary end-user
authentication and for requesting subject information about secondary users, such as in a call center.
In such use cases, the client software used by the RO (the caller) and the end user
(the agent) are generally distinct, allowing the AS to differentiate between the agent's corporate device
making the request and the caller's personal device approving the request.</t>
        <t indent="0" pn="section-11.36-3">Second, ROs that interact asynchronously do not usually have the same context as an end user in an
application attempting to perform the task needing authorization. As such, the asynchronous requests
for authorization coming to the RO from the AS might have very little to do with what the RO is
doing at the time. This situation can consequently lead to authorization fatigue on the part of the
RO, where any incoming authorization request is quickly approved and dispatched without the RO
making a proper verification of the request. An attacker can exploit this fatigue and get the RO
to authorize the attacker's system for access. To mitigate this, AS systems deploying asynchronous
authorization should only prompt the RO when the RO is expecting such a request, and significant
user experience engineering efforts need to be employed to ensure that the RO can clearly make the
appropriate security decision. Furthermore, audit capability and the ability to undo access
decisions that may be ongoing are particularly important in the asynchronous case.</t>
      </section>
      <section anchor="security-compromised-rs" numbered="true" removeInRFC="false" toc="include" pn="section-11.37">
        <name slugifiedName="name-compromised-rs">Compromised RS</name>
        <t indent="0" pn="section-11.37-1">An attacker may aim to gain access to confidential or sensitive resources. The measures for hardening and monitoring RS systems (beyond protection with access tokens) are out of the scope of this document, but the use of GNAP to protect a system does not absolve the RS of following best practices.
GNAP generally considers that a breach can occur and therefore advises to prefer key-bound tokens whenever possible, which at least limits the impact of access token leakage by a compromised or malicious RS.</t>
      </section>
      <section anchor="security-as-keys" numbered="true" removeInRFC="false" toc="include" pn="section-11.38">
        <name slugifiedName="name-as-provided-token-keys">AS-Provided Token Keys</name>
        <t indent="0" pn="section-11.38-1">While the most common token-issuance pattern is to bind the access token to the client instance's
presented key, it is possible for the AS to provide a binding key along with an access token, as
shown by the <tt>key</tt> field of the token response in <xref target="response-token-single" format="default" sectionFormat="of" derivedContent="Section 3.2.1"/>. This practice allows
for an AS to generate and manage the keys associated with tokens independently of the keys known
to client instances.</t>
        <t indent="0" pn="section-11.38-2">If the key material is returned by value from the AS, then the client instance will simply use this
key value when presenting the token. This can be exploited by an attacker to issue a compromised token
to an unsuspecting client, assuming that the client instance trusts the attacker's AS to issue tokens
for the target RS. In this attack, the attacker first gets a token bound to a key under the attacker's
control. This token is likely bound to an authorization or account controlled by the attacker.
The attacker then reissues that same token to the client instance, this time acting as an AS. The attacker
can return their own key to the client instance, tricking the client instance into using the attacker's
token. Such an attack is also possible when the key is returned by reference, if the attacker
is able to provide a reference meaningful to the client instance that references a key under the attacker's
control. This substitution attack is similar to some of the main issues found with bearer tokens
as discussed in <xref target="security-bearer-tokens" format="default" sectionFormat="of" derivedContent="Section 11.9"/>.</t>
        <t indent="0" pn="section-11.38-3">Returning a key with an access token should be limited to circumstances where both the client and AS
can be verified to be honest and when the trade-off of not using a client instance's own keys
is worth the additional risk.</t>
      </section>
    </section>
    <section anchor="privacy" numbered="true" removeInRFC="false" toc="include" pn="section-12">
      <name slugifiedName="name-privacy-considerations">Privacy Considerations</name>
      <t indent="0" pn="section-12-1">The privacy considerations in this section are modeled after the list of privacy threats in "Privacy Considerations for Internet Protocols" <xref target="RFC6973" format="default" sectionFormat="of" derivedContent="RFC6973"/> and either explain how these threats are mitigated or advise how the threats relate to GNAP.</t>
      <section anchor="surveillance" numbered="true" removeInRFC="false" toc="include" pn="section-12.1">
        <name slugifiedName="name-surveillance">Surveillance</name>
        <t indent="0" pn="section-12.1-1">Surveillance is the observation or monitoring of an individual's communications or activities. Surveillance can be conducted by observers or eavesdroppers at any point along the communications path.</t>
        <t indent="0" pn="section-12.1-2">GNAP assumes the TLS protection used throughout the spec is intact. Without the protection of TLS, there are many points throughout the use of GNAP that could lead to possible surveillance. Even with the proper use of TLS, surveillance could occur by several parties outside of the TLS-protected channels, as discussed in the subsections below.</t>
        <section anchor="surveillance-by-the-client" numbered="true" removeInRFC="false" toc="include" pn="section-12.1.1">
          <name slugifiedName="name-surveillance-by-the-client">Surveillance by the Client</name>
          <t indent="0" pn="section-12.1.1-1">The purpose of GNAP is to authorize clients to be able to access information on behalf of a user. So while it is expected that the client may be aware of the user's identity as well as data being fetched for that user, in some cases, the extent of the client may be beyond what the user is aware of. For example, a client may be implemented as multiple distinct pieces of software, such as a logging service or a mobile application that reports usage data to an external backend service. Each of these pieces could gain information about the user without the user being aware of this action.</t>
          <t indent="0" pn="section-12.1.1-2">When the client software uses a hosted asset for its components, such as its logo image, the fetch of these assets can reveal user actions to the host. If the AS presents the logo URI to the RO in a browser page, the browser will fetch the logo URL from the authorization screen. This fetch will tell the host of the logo image that someone is accessing an instance of the client software and requesting access for it. This is particularly problematic when the host of the asset is not the client software itself, such as when a content delivery network is used.</t>
        </section>
        <section anchor="surveillance-by-the-authorization-server" numbered="true" removeInRFC="false" toc="include" pn="section-12.1.2">
          <name slugifiedName="name-surveillance-by-the-authori">Surveillance by the Authorization Server</name>
          <t indent="0" pn="section-12.1.2-1">The role of the AS is to manage the authorization of client instances to protect access to the user's data. In this role, the AS is by definition aware of each authorization of a client instance by a user. When the AS shares user information with the client instance, it needs to make sure that it has the permission from that user to do so.</t>
          <t indent="0" pn="section-12.1.2-2">Additionally, as part of the authorization grant process, the AS may be aware of which RSs the client intends to use an access token at. However, it is possible to design a system using GNAP in which this knowledge is not made available to the AS, such as by avoiding the use of the <tt>locations</tt> object in the authorization request.</t>
          <t indent="0" pn="section-12.1.2-3">If the AS's implementation of access tokens is such that it requires an RS callback to the AS to validate them, then the AS will be aware of which RSs are actively in use and by which users and clients. To avoid this possibility, the AS would need to structure access tokens in such a way that they can be validated by the RS without notifying the AS that the token is being validated.</t>
        </section>
      </section>
      <section anchor="stored-data" numbered="true" removeInRFC="false" toc="include" pn="section-12.2">
        <name slugifiedName="name-stored-data">Stored Data</name>
        <t indent="0" pn="section-12.2-1">Several parties in the GNAP process are expected to persist data at least
temporarily, if not semi-permanently, for the normal functioning of the
system. If compromised, this could lead to exposure of sensitive
information. This section documents the potentially sensitive information each
party in GNAP is expected to store for normal operation. Naturally, it is
possible for any party to store information related to protocol mechanics
(such as audit logs, etc.) for longer than is technically necessary.
</t>
        <t indent="0" pn="section-12.2-2">The AS is expected to store Subject Identifiers for users indefinitely, in order to be able to include them in the responses to clients. The AS is also expected to store client key identifiers associated with display information about the client, such as its name and logo.</t>
        <t indent="0" pn="section-12.2-3">The client is expected to store its client instance key indefinitely, in order to authenticate to the AS for the normal functioning of the GNAP flows. Additionally, the client will be temporarily storing artifacts issued by the AS during a flow, and these artifacts ought to be discarded by the client when the transaction is complete.</t>
        <t indent="0" pn="section-12.2-4">The RS is not required to store any state for its normal operation, as far as its part in implementing GNAP. Depending on the implementation of access tokens, the RS may need to cache public keys from the AS in order to validate access tokens.</t>
      </section>
      <section anchor="intrusion" numbered="true" removeInRFC="false" toc="include" pn="section-12.3">
        <name slugifiedName="name-intrusion">Intrusion</name>
        <t indent="0" pn="section-12.3-1">Intrusion refers to the ability of various parties to send unsolicited messages or cause denial of service for unrelated parties.</t>
        <t indent="0" pn="section-12.3-2">If the RO is different from the end user, there is an opportunity for the end user to cause unsolicited messages to be sent to the RO if the system prompts the RO for consent when an end user attempts to access their data.</t>
        <t indent="0" pn="section-12.3-3">The format and contents of Subject Identifiers are intentionally not defined by GNAP. If the AS uses values for Subject Identifiers that are also identifiers for communication channels (e.g., an email address or phone number), this opens up the possibility for a client to learn this information when it was not otherwise authorized to access this kind of data about the user.</t>
      </section>
      <section anchor="correlation" numbered="true" removeInRFC="false" toc="include" pn="section-12.4">
        <name slugifiedName="name-correlation">Correlation</name>
        <t indent="0" pn="section-12.4-1">The threat of correlation is the combination of various pieces of information related to an individual in a way that defies their expectations of what others know about them.</t>
        <section anchor="privacy-correlation-client" numbered="true" removeInRFC="false" toc="include" pn="section-12.4.1">
          <name slugifiedName="name-correlation-by-clients">Correlation by Clients</name>
          <t indent="0" pn="section-12.4.1-1">The biggest risk of correlation in GNAP is when an AS returns stable, consistent user identifiers to multiple different applications. In this case, applications created by different parties would be able to correlate these user identifiers out of band in order to know which users they have in common.</t>
          <t indent="0" pn="section-12.4.1-2">The most common example of this in practice is tracking for advertising purposes, such that a client shares their list of user IDs with an ad platform that is then able to retarget ads to applications created by other parties. In contrast, a positive example of correlation is a corporate acquisition where two previously unrelated clients now do need to be able to identify the same user between the two clients, such as when software systems are intentionally connected by the end user.</t>
          <t indent="0" pn="section-12.4.1-3">Another means of correlation comes from the use of RS-first discovery (<xref target="rs-request-without-token" format="default" sectionFormat="of" derivedContent="Section 9.1"> </xref>). A client instance that knows nothing other than an RS's URL could make an unauthenticated call to the RS and learn which AS protects the resources there. If the client instance knows something about the AS, such as it being a single-user AS or belonging to a specific organization, the client instance could, through association, learn things about the resource without ever gaining access to the resource itself.</t>
        </section>
        <section anchor="correlation-by-resource-servers" numbered="true" removeInRFC="false" toc="include" pn="section-12.4.2">
          <name slugifiedName="name-correlation-by-resource-ser">Correlation by Resource Servers</name>
          <t indent="0" pn="section-12.4.2-1">Unrelated RSs also have an opportunity to correlate users if the AS includes stable user identifiers in access tokens or in access token introspection responses.</t>
          <t indent="0" pn="section-12.4.2-2">In some cases, an RS may not actually need to be able to identify users (such as an RS providing access to a company cafeteria menu, which only needs to validate whether the user is a current employee), so ASes should be thoughtful of when user identifiers are actually necessary to communicate to RSs for the functioning of the system.</t>
          <t indent="0" pn="section-12.4.2-3">However, note that the lack of inclusion of a user identifier in an access token may be a risk if there is a concern that two users may voluntarily share access tokens between them in order to access protected resources. For example, if a website wants to limit access to only people over 18, and such does not need to know any user identifiers, an access token may be issued by an AS contains only the claim "over 18". If the user is aware that this access token doesn't reference them individually, they may be willing to share the access token with a user who is under 18 in order to let them get access to the website. (Note that the binding of an access token to a non-extractable client instance key also prevents the access token from being voluntarily shared.)</t>
        </section>
        <section anchor="correlation-by-authorization-servers" numbered="true" removeInRFC="false" toc="include" pn="section-12.4.3">
          <name slugifiedName="name-correlation-by-authorizatio">Correlation by Authorization Servers</name>
          <t indent="0" pn="section-12.4.3-1">Clients are expected to be identified by their client instance key. If a particular client instance key is used at more than one AS, this could open up the possibility for multiple unrelated ASes to correlate client instances. This is especially a problem in the common case where a client instance is used by a single individual, as it would allow the ASes to correlate that individual between them. If this is a concern of a client, the client should use distinct keys with each AS.</t>
        </section>
      </section>
      <section anchor="disclosure-in-shared-references" numbered="true" removeInRFC="false" toc="include" pn="section-12.5">
        <name slugifiedName="name-disclosure-in-shared-refere">Disclosure in Shared References</name>
        <t indent="0" pn="section-12.5-1">Throughout many parts of GNAP, the parties pass shared references between each other, sometimes in place of the values themselves (for example, the <tt>interact_ref</tt> value used throughout the flow). These references are intended to be random strings and should not contain any private or sensitive data that could potentially leak information between parties.</t>
      </section>
    </section>
  </middle>
  <back>
    <displayreference target="RFC9110" to="HTTP"/>
    <displayreference target="I-D.ietf-gnap-resource-servers" to="GNAP-RS"/>
    <displayreference target="I-D.ietf-oauth-security-topics" to="OAUTH-SEC-TOPICS"/>
    <references pn="section-13">
      <name slugifiedName="name-references">References</name>
      <references anchor="sec-normative-references" pn="section-13.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <referencegroup anchor="BCP195" target="https://www.rfc-editor.org/info/bcp195" derivedAnchor="BCP195">
          <reference anchor="RFC8996" target="https://www.rfc-editor.org/info/rfc8996" quoteTitle="true">
            <front>
              <title>Deprecating TLS 1.0 and TLS 1.1</title>
              <author fullname="K. Moriarty" initials="K." surname="Moriarty"/>
              <author fullname="S. Farrell" initials="S." surname="Farrell"/>
              <date month="March" year="2021"/>
              <abstract>
                <t indent="0">This document formally deprecates Transport Layer Security (TLS) versions 1.0 (RFC 2246) and 1.1 (RFC 4346). Accordingly, those documents have been moved to Historic status. These versions lack support for current and recommended cryptographic algorithms and mechanisms, and various government and industry profiles of applications using TLS now mandate avoiding these old TLS versions. TLS version 1.2 became the recommended version for IETF protocols in 2008 (subsequently being obsoleted by TLS version 1.3 in 2018), providing sufficient time to transition away from older versions. Removing support for older versions from implementations reduces the attack surface, reduces opportunity for misconfiguration, and streamlines library and product maintenance.</t>
                <t indent="0">This document also deprecates Datagram TLS (DTLS) version 1.0 (RFC 4347) but not DTLS version 1.2, and there is no DTLS version 1.1.</t>
                <t indent="0">This document updates many RFCs that normatively refer to TLS version 1.0 or TLS version 1.1, as described herein. This document also updates the best practices for TLS usage in RFC 7525; hence, it is part of BCP 195.</t>
              </abstract>
            </front>
            <seriesInfo name="BCP" value="195"/>
            <seriesInfo name="RFC" value="8996"/>
            <seriesInfo name="DOI" value="10.17487/RFC8996"/>
          </reference>
          <reference anchor="RFC9325" target="https://www.rfc-editor.org/info/rfc9325" quoteTitle="true">
            <front>
              <title>Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
              <author fullname="Y. Sheffer" initials="Y." surname="Sheffer"/>
              <author fullname="P. Saint-Andre" initials="P." surname="Saint-Andre"/>
              <author fullname="T. Fossati" initials="T." surname="Fossati"/>
              <date month="November" year="2022"/>
              <abstract>
                <t indent="0">Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) are used to protect data exchanged over a wide range of application protocols and can also form the basis for secure transport protocols. Over the years, the industry has witnessed several serious attacks on TLS and DTLS, including attacks on the most commonly used cipher suites and their modes of operation. This document provides the latest recommendations for ensuring the security of deployed services that use TLS and DTLS. These recommendations are applicable to the majority of use cases.</t>
                <t indent="0">RFC 7525, an earlier version of the TLS recommendations, was published when the industry was transitioning to TLS 1.2. Years later, this transition is largely complete, and TLS 1.3 is widely available. This document updates the guidance given the new environment and obsoletes RFC 7525. In addition, this document updates RFCs 5288 and 6066 in view of recent attacks.</t>
              </abstract>
            </front>
            <seriesInfo name="BCP" value="195"/>
            <seriesInfo name="RFC" value="9325"/>
            <seriesInfo name="DOI" value="10.17487/RFC9325"/>
          </reference>
        </referencegroup>
        <reference anchor="HASH-ALG" target="https://www.iana.org/assignments/named-information/" quoteTitle="true" derivedAnchor="HASH-ALG">
          <front>
            <title>Named Information Hash Algorithm Registry</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110" quoteTitle="true" derivedAnchor="HTTP">
          <front>
            <title>HTTP Semantics</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="2022"/>
            <abstract>
              <t indent="0">The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes.</t>
              <t indent="0">This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="97"/>
          <seriesInfo name="RFC" value="9110"/>
          <seriesInfo name="DOI" value="10.17487/RFC9110"/>
        </reference>
        <reference anchor="OIDC" target="https://openid.net/specs/openid-connect-core-1_0.html" quoteTitle="true" derivedAnchor="OIDC">
          <front>
            <title>OpenID Connect Core 1.0 incorporating errata set 2</title>
            <author initials="N." surname="Sakimura">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Bradley">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Jones">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="de Medeiros">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Mortimore">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2023" month="December"/>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="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 indent="0">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="RFC2397" target="https://www.rfc-editor.org/info/rfc2397" quoteTitle="true" derivedAnchor="RFC2397">
          <front>
            <title>The "data" URL scheme</title>
            <author fullname="L. Masinter" initials="L." surname="Masinter"/>
            <date month="August" year="1998"/>
            <abstract>
              <t indent="0">A new URL scheme, "data", is defined. It allows inclusion of small data items as "immediate" data, as if it had been included externally. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2397"/>
          <seriesInfo name="DOI" value="10.17487/RFC2397"/>
        </reference>
        <reference anchor="RFC3339" target="https://www.rfc-editor.org/info/rfc3339" quoteTitle="true" derivedAnchor="RFC3339">
          <front>
            <title>Date and Time on the Internet: Timestamps</title>
            <author fullname="G. Klyne" initials="G." surname="Klyne"/>
            <author fullname="C. Newman" initials="C." surname="Newman"/>
            <date month="July" year="2002"/>
            <abstract>
              <t indent="0">This document defines a date and time format for use in Internet protocols that is a profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3339"/>
          <seriesInfo name="DOI" value="10.17487/RFC3339"/>
        </reference>
        <reference anchor="RFC3986" target="https://www.rfc-editor.org/info/rfc3986" quoteTitle="true" derivedAnchor="RFC3986">
          <front>
            <title>Uniform Resource Identifier (URI): Generic Syntax</title>
            <author fullname="T. Berners-Lee" initials="T." surname="Berners-Lee"/>
            <author fullname="R. Fielding" initials="R." surname="Fielding"/>
            <author fullname="L. Masinter" initials="L." surname="Masinter"/>
            <date month="January" year="2005"/>
            <abstract>
              <t indent="0">A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet. The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier. This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="66"/>
          <seriesInfo name="RFC" value="3986"/>
          <seriesInfo name="DOI" value="10.17487/RFC3986"/>
        </reference>
        <reference anchor="RFC4648" target="https://www.rfc-editor.org/info/rfc4648" quoteTitle="true" derivedAnchor="RFC4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <date month="October" year="2006"/>
            <abstract>
              <t indent="0">This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4648"/>
          <seriesInfo name="DOI" value="10.17487/RFC4648"/>
        </reference>
        <reference anchor="RFC5646" target="https://www.rfc-editor.org/info/rfc5646" quoteTitle="true" derivedAnchor="RFC5646">
          <front>
            <title>Tags for Identifying Languages</title>
            <author fullname="A. Phillips" initials="A." role="editor" surname="Phillips"/>
            <author fullname="M. Davis" initials="M." role="editor" surname="Davis"/>
            <date month="September" year="2009"/>
            <abstract>
              <t indent="0">This document describes the structure, content, construction, and semantics of language tags for use in cases where it is desirable to indicate the language used in an information object. It also describes how to register values for use in language tags and the creation of user-defined extensions for private interchange. 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="47"/>
          <seriesInfo name="RFC" value="5646"/>
          <seriesInfo name="DOI" value="10.17487/RFC5646"/>
        </reference>
        <reference anchor="RFC6749" target="https://www.rfc-editor.org/info/rfc6749" quoteTitle="true" derivedAnchor="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 indent="0">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="RFC6750" target="https://www.rfc-editor.org/info/rfc6750" quoteTitle="true" derivedAnchor="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 indent="0">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="RFC7468" target="https://www.rfc-editor.org/info/rfc7468" quoteTitle="true" derivedAnchor="RFC7468">
          <front>
            <title>Textual Encodings of PKIX, PKCS, and CMS Structures</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <author fullname="S. Leonard" initials="S." surname="Leonard"/>
            <date month="April" year="2015"/>
            <abstract>
              <t indent="0">This document describes and discusses the textual encodings of the Public-Key Infrastructure X.509 (PKIX), Public-Key Cryptography Standards (PKCS), and Cryptographic Message Syntax (CMS). The textual encodings are well-known, are implemented by several applications and libraries, and are widely deployed. This document articulates the de facto rules by which existing implementations operate and defines them so that future implementations can interoperate.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7468"/>
          <seriesInfo name="DOI" value="10.17487/RFC7468"/>
        </reference>
        <reference anchor="RFC7515" target="https://www.rfc-editor.org/info/rfc7515" quoteTitle="true" derivedAnchor="RFC7515">
          <front>
            <title>JSON Web Signature (JWS)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="N. Sakimura" initials="N." surname="Sakimura"/>
            <date month="May" year="2015"/>
            <abstract>
              <t indent="0">JSON Web Signature (JWS) represents content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based data structures. Cryptographic algorithms and identifiers for use with this specification are described in the separate JSON Web Algorithms (JWA) specification and an IANA registry defined by that specification. Related encryption capabilities are described in the separate JSON Web Encryption (JWE) specification.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7515"/>
          <seriesInfo name="DOI" value="10.17487/RFC7515"/>
        </reference>
        <reference anchor="RFC7517" target="https://www.rfc-editor.org/info/rfc7517" quoteTitle="true" derivedAnchor="RFC7517">
          <front>
            <title>JSON Web Key (JWK)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <date month="May" year="2015"/>
            <abstract>
              <t indent="0">A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. This specification also defines a JWK Set JSON data structure that represents a set of JWKs. Cryptographic algorithms and identifiers for use with this specification are described in the separate JSON Web Algorithms (JWA) specification and IANA registries established by that specification.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7517"/>
          <seriesInfo name="DOI" value="10.17487/RFC7517"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="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 indent="0">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="RFC8259" target="https://www.rfc-editor.org/info/rfc8259" quoteTitle="true" derivedAnchor="RFC8259">
          <front>
            <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
            <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
            <date month="December" year="2017"/>
            <abstract>
              <t indent="0">JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>
              <t indent="0">This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="90"/>
          <seriesInfo name="RFC" value="8259"/>
          <seriesInfo name="DOI" value="10.17487/RFC8259"/>
        </reference>
        <reference anchor="RFC8705" target="https://www.rfc-editor.org/info/rfc8705" quoteTitle="true" derivedAnchor="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 indent="0">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="RFC9111" target="https://www.rfc-editor.org/info/rfc9111" quoteTitle="true" derivedAnchor="RFC9111">
          <front>
            <title>HTTP 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="2022"/>
            <abstract>
              <t indent="0">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>
              <t indent="0">This document obsoletes RFC 7234.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="98"/>
          <seriesInfo name="RFC" value="9111"/>
          <seriesInfo name="DOI" value="10.17487/RFC9111"/>
        </reference>
        <reference anchor="RFC9421" target="https://www.rfc-editor.org/info/rfc9421" quoteTitle="true" derivedAnchor="RFC9421">
          <front>
            <title>HTTP Message Signatures</title>
            <author fullname="A. Backman" initials="A." role="editor" surname="Backman"/>
            <author fullname="J. Richer" initials="J." role="editor" surname="Richer"/>
            <author fullname="M. Sporny" initials="M." surname="Sporny"/>
            <date month="February" year="2024"/>
            <abstract>
              <t indent="0">This document describes a mechanism for creating, encoding, and verifying digital signatures or message authentication codes over components of an HTTP message. This mechanism supports use cases where the full HTTP message may not be known to the signer and where the message may be transformed (e.g., by intermediaries) before reaching the verifier. This document also describes a means for requesting that a signature be applied to a subsequent HTTP message in an ongoing HTTP exchange.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9421"/>
          <seriesInfo name="DOI" value="10.17487/RFC9421"/>
        </reference>
        <reference anchor="RFC9493" target="https://www.rfc-editor.org/info/rfc9493" quoteTitle="true" derivedAnchor="RFC9493">
          <front>
            <title>Subject Identifiers for Security Event Tokens</title>
            <author fullname="A. Backman" initials="A." role="editor" surname="Backman"/>
            <author fullname="M. Scurtescu" initials="M." surname="Scurtescu"/>
            <author fullname="P. Jain" initials="P." surname="Jain"/>
            <date month="December" year="2023"/>
            <abstract>
              <t indent="0">Security events communicated within Security Event Tokens may support a variety of identifiers to identify subjects related to the event. This specification formalizes the notion of Subject Identifiers as structured information that describes a subject and named formats that define the syntax and semantics for encoding Subject Identifiers as JSON objects. It also establishes a registry for defining and allocating names for such formats as well as the JSON Web Token (JWT) "sub_id" Claim.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9493"/>
          <seriesInfo name="DOI" value="10.17487/RFC9493"/>
        </reference>
        <reference anchor="RFC9530" target="https://www.rfc-editor.org/info/rfc9530" quoteTitle="true" derivedAnchor="RFC9530">
          <front>
            <title>Digest Fields</title>
            <author fullname="R. Polli" initials="R." surname="Polli"/>
            <author fullname="L. Pardue" initials="L." surname="Pardue"/>
            <date month="February" year="2024"/>
            <abstract>
              <t indent="0">This document defines HTTP fields that support integrity digests. The Content-Digest field can be used for the integrity of HTTP message content. The Repr-Digest field can be used for the integrity of HTTP representations. Want-Content-Digest and Want-Repr-Digest can be used to indicate a sender's interest and preferences for receiving the respective Integrity fields.</t>
              <t indent="0">This document obsoletes RFC 3230 and the Digest and Want-Digest HTTP fields.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9530"/>
          <seriesInfo name="DOI" value="10.17487/RFC9530"/>
        </reference>
        <reference anchor="SAML2" target="https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf" quoteTitle="true" derivedAnchor="SAML2">
          <front>
            <title>Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0</title>
            <author initials="S., Ed." surname="Cantor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J., Ed." surname="Kemp">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R., Ed." surname="Philpott">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Maler, Ed.">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2005" month="March"/>
          </front>
          <refcontent>OASIS Standard</refcontent>
        </reference>
      </references>
      <references anchor="sec-informative-references" pn="section-13.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="Auth-Schemes" target="https://www.iana.org/assignments/http-authschemes" quoteTitle="true" derivedAnchor="Auth-Schemes">
          <front>
            <title>HTTP Authentication Schemes</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="AXELAND2021" target="https://hdl.handle.net/20.500.12380/304105" quoteTitle="true" derivedAnchor="AXELAND2021">
          <front>
            <title>Security Analysis of Attack Surfaces on the Grant Negotiation and Authorization Protocol</title>
            <author initials="Å." surname="Axeland">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="O." surname="Oueidat">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2021"/>
          </front>
          <refcontent>Master's thesis, Department of Computer Science and Engineering, Chalmers University of Technology and University of Gothenburg</refcontent>
        </reference>
        <reference anchor="GNAP-REG" target="https://www.iana.org/assignments/gnap" quoteTitle="true" derivedAnchor="GNAP-REG">
          <front>
            <title>Grant Negotiation and Authorization Protocol (GNAP)</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="I-D.ietf-gnap-resource-servers" target="https://datatracker.ietf.org/doc/html/draft-ietf-gnap-resource-servers-09" quoteTitle="true" derivedAnchor="GNAP-RS">
          <front>
            <title>Grant Negotiation and Authorization Protocol Resource Server Connections</title>
            <author initials="J." surname="Richer" fullname="Justin Richer" role="editor">
              <organization showOnFrontPage="true">Bespoke Engineering</organization>
            </author>
            <author initials="F." surname="Imbault" fullname="Fabien Imbault">
              <organization showOnFrontPage="true">acert.io</organization>
            </author>
            <date month="September" day="23" year="2024"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-gnap-resource-servers-09"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="HELMSCHMIDT2022" target="http://dx.doi.org/10.18419/opus-12203" quoteTitle="true" derivedAnchor="HELMSCHMIDT2022">
          <front>
            <title>Security Analysis of the Grant Negotiation and Authorization Protocol</title>
            <author initials="F." surname="Helmschmidt">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2022"/>
          </front>
          <seriesInfo name="DOI" value="10.18419/opus-12203"/>
          <refcontent>Master's thesis, Institute of Information Security, University of Stuggart</refcontent>
        </reference>
        <reference anchor="MediaTypes" target="https://www.iana.org/assignments/media-types" quoteTitle="true" derivedAnchor="MediaTypes">
          <front>
            <title>Media Types</title>
            <author fullname="IANA">
              <organization showOnFrontPage="true"/>
            </author>
          </front>
        </reference>
        <reference anchor="I-D.ietf-oauth-security-topics" target="https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics-29" quoteTitle="true" derivedAnchor="OAUTH-SEC-TOPICS">
          <front>
            <title>OAuth 2.0 Security Best Current Practice</title>
            <author initials="T." surname="Lodderstedt" fullname="Torsten Lodderstedt">
              <organization showOnFrontPage="true">SPRIND</organization>
            </author>
            <author initials="J." surname="Bradley" fullname="John Bradley">
              <organization showOnFrontPage="true">Yubico</organization>
            </author>
            <author initials="A." surname="Labunets" fullname="Andrey Labunets">
              <organization showOnFrontPage="true">Independent Researcher</organization>
            </author>
            <author initials="D." surname="Fett" fullname="Daniel Fett">
              <organization showOnFrontPage="true">Authlete</organization>
            </author>
            <date month="June" day="3" year="2024"/>
            <abstract>
              <t indent="0">   This document describes best current security practice for OAuth 2.0.
   It updates and extends the threat model and security advice given in
   RFC 6749, RFC 6750, and RFC 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="Internet-Draft" value="draft-ietf-oauth-security-topics-29"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="promise-theory" target="http://markburgess.org/promises.html" quoteTitle="true" derivedAnchor="promise-theory">
          <front>
            <title>Promise Theory: Principles and Applications</title>
            <author initials="J." surname="Bergstra">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Burgess">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019"/>
          </front>
          <refcontent>Second Edition, XtAxis Press</refcontent>
        </reference>
        <reference anchor="RFC2046" target="https://www.rfc-editor.org/info/rfc2046" quoteTitle="true" derivedAnchor="RFC2046">
          <front>
            <title>Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</title>
            <author fullname="N. Freed" initials="N." surname="Freed"/>
            <author fullname="N. Borenstein" initials="N." surname="Borenstein"/>
            <date month="November" year="1996"/>
            <abstract>
              <t indent="0">This second document defines the general structure of the MIME media typing system and defines an initial set of media types. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2046"/>
          <seriesInfo name="DOI" value="10.17487/RFC2046"/>
        </reference>
        <reference anchor="RFC4107" target="https://www.rfc-editor.org/info/rfc4107" quoteTitle="true" derivedAnchor="RFC4107">
          <front>
            <title>Guidelines for Cryptographic Key Management</title>
            <author fullname="S. Bellovin" initials="S." surname="Bellovin"/>
            <author fullname="R. Housley" initials="R." surname="Housley"/>
            <date month="June" year="2005"/>
            <abstract>
              <t indent="0">The question often arises of whether a given security system requires some form of automated key management, or whether manual keying is sufficient. This memo provides guidelines for making such decisions. When symmetric cryptographic mechanisms are used in a protocol, the presumption is that automated key management is generally but not always needed. If manual keying is proposed, the burden of proving that automated key management is not required falls to the proposer. 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="107"/>
          <seriesInfo name="RFC" value="4107"/>
          <seriesInfo name="DOI" value="10.17487/RFC4107"/>
        </reference>
        <reference anchor="RFC6202" target="https://www.rfc-editor.org/info/rfc6202" quoteTitle="true" derivedAnchor="RFC6202">
          <front>
            <title>Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP</title>
            <author fullname="S. Loreto" initials="S." surname="Loreto"/>
            <author fullname="P. Saint-Andre" initials="P." surname="Saint-Andre"/>
            <author fullname="S. Salsano" initials="S." surname="Salsano"/>
            <author fullname="G. Wilkins" initials="G." surname="Wilkins"/>
            <date month="April" year="2011"/>
            <abstract>
              <t indent="0">On today's Internet, the Hypertext Transfer Protocol (HTTP) is often used (some would say abused) to enable asynchronous, "server- initiated" communication from a server to a client as well as communication from a client to a server. This document describes known issues and best practices related to such "bidirectional HTTP" applications, focusing on the two most common mechanisms: HTTP long polling and HTTP streaming. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6202"/>
          <seriesInfo name="DOI" value="10.17487/RFC6202"/>
        </reference>
        <reference anchor="RFC6838" target="https://www.rfc-editor.org/info/rfc6838" quoteTitle="true" derivedAnchor="RFC6838">
          <front>
            <title>Media Type Specifications and Registration Procedures</title>
            <author fullname="N. Freed" initials="N." surname="Freed"/>
            <author fullname="J. Klensin" initials="J." surname="Klensin"/>
            <author fullname="T. Hansen" initials="T." surname="Hansen"/>
            <date month="January" year="2013"/>
            <abstract>
              <t indent="0">This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols. This memo documents an Internet Best Current Practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="13"/>
          <seriesInfo name="RFC" value="6838"/>
          <seriesInfo name="DOI" value="10.17487/RFC6838"/>
        </reference>
        <reference anchor="RFC6973" target="https://www.rfc-editor.org/info/rfc6973" quoteTitle="true" derivedAnchor="RFC6973">
          <front>
            <title>Privacy Considerations for Internet Protocols</title>
            <author fullname="A. Cooper" initials="A." surname="Cooper"/>
            <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
            <author fullname="B. Aboba" initials="B." surname="Aboba"/>
            <author fullname="J. Peterson" initials="J." surname="Peterson"/>
            <author fullname="J. Morris" initials="J." surname="Morris"/>
            <author fullname="M. Hansen" initials="M." surname="Hansen"/>
            <author fullname="R. Smith" initials="R." surname="Smith"/>
            <date month="July" year="2013"/>
            <abstract>
              <t indent="0">This document offers guidance for developing privacy considerations for inclusion in protocol specifications. It aims to make designers, implementers, and users of Internet protocols aware of privacy-related design choices. It suggests that whether any individual RFC warrants a specific privacy considerations section will depend on the document's content.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6973"/>
          <seriesInfo name="DOI" value="10.17487/RFC6973"/>
        </reference>
        <reference anchor="RFC7518" target="https://www.rfc-editor.org/info/rfc7518" quoteTitle="true" derivedAnchor="RFC7518">
          <front>
            <title>JSON Web Algorithms (JWA)</title>
            <author fullname="M. Jones" initials="M." surname="Jones"/>
            <date month="May" year="2015"/>
            <abstract>
              <t indent="0">This specification registers cryptographic algorithms and identifiers to be used with the JSON Web Signature (JWS), JSON Web Encryption (JWE), and JSON Web Key (JWK) specifications. It defines several IANA registries for these identifiers.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7518"/>
          <seriesInfo name="DOI" value="10.17487/RFC7518"/>
        </reference>
        <reference anchor="RFC8126" target="https://www.rfc-editor.org/info/rfc8126" quoteTitle="true" derivedAnchor="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 indent="0">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 indent="0">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 indent="0">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="RFC8264" target="https://www.rfc-editor.org/info/rfc8264" quoteTitle="true" derivedAnchor="RFC8264">
          <front>
            <title>PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings in Application Protocols</title>
            <author fullname="P. Saint-Andre" initials="P." surname="Saint-Andre"/>
            <author fullname="M. Blanchet" initials="M." surname="Blanchet"/>
            <date month="October" year="2017"/>
            <abstract>
              <t indent="0">Application protocols using Unicode code points in protocol strings need to properly handle such strings in order to enforce internationalization rules for strings placed in various protocol slots (such as addresses and identifiers) and to perform valid comparison operations (e.g., for purposes of authentication or authorization). This document defines a framework enabling application protocols to perform the preparation, enforcement, and comparison of internationalized strings ("PRECIS") in a way that depends on the properties of Unicode code points and thus is more agile with respect to versions of Unicode. As a result, this framework provides a more sustainable approach to the handling of internationalized strings than the previous framework, known as Stringprep (RFC 3454). This document obsoletes RFC 7564.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8264"/>
          <seriesInfo name="DOI" value="10.17487/RFC8264"/>
        </reference>
        <reference anchor="RFC8707" target="https://www.rfc-editor.org/info/rfc8707" quoteTitle="true" derivedAnchor="RFC8707">
          <front>
            <title>Resource Indicators for OAuth 2.0</title>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="J. Bradley" initials="J." surname="Bradley"/>
            <author fullname="H. Tschofenig" initials="H." surname="Tschofenig"/>
            <date month="February" year="2020"/>
            <abstract>
              <t indent="0">This document specifies an extension to the OAuth 2.0 Authorization Framework defining request parameters that enable a client to explicitly signal to an authorization server about the identity of the protected resource(s) to which it is requesting access.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8707"/>
          <seriesInfo name="DOI" value="10.17487/RFC8707"/>
        </reference>
        <reference anchor="RFC8792" target="https://www.rfc-editor.org/info/rfc8792" quoteTitle="true" derivedAnchor="RFC8792">
          <front>
            <title>Handling Long Lines in Content of Internet-Drafts and RFCs</title>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="E. Auerswald" initials="E." surname="Auerswald"/>
            <author fullname="A. Farrel" initials="A." surname="Farrel"/>
            <author fullname="Q. Wu" initials="Q." surname="Wu"/>
            <date month="June" year="2020"/>
            <abstract>
              <t indent="0">This document defines two strategies for handling long lines in width-bounded text content. One strategy, called the "single backslash" strategy, is based on the historical use of a single backslash ('\') character to indicate where line-folding has occurred, with the continuation occurring with the first character that is not a space character (' ') on the next line. The second strategy, called the "double backslash" strategy, extends the first strategy by adding a second backslash character to identify where the continuation begins and is thereby able to handle cases not supported by the first strategy. Both strategies use a self-describing header enabling automated reconstitution of the original content.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8792"/>
          <seriesInfo name="DOI" value="10.17487/RFC8792"/>
        </reference>
        <reference anchor="RFC9396" target="https://www.rfc-editor.org/info/rfc9396" quoteTitle="true" derivedAnchor="RFC9396">
          <front>
            <title>OAuth 2.0 Rich Authorization Requests</title>
            <author fullname="T. Lodderstedt" initials="T." surname="Lodderstedt"/>
            <author fullname="J. Richer" initials="J." surname="Richer"/>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <date month="May" year="2023"/>
            <abstract>
              <t indent="0">This document specifies a new parameter that is used to carry fine-grained authorization data in OAuth messages.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9396"/>
          <seriesInfo name="DOI" value="10.17487/RFC9396"/>
        </reference>
        <reference anchor="RFC9440" target="https://www.rfc-editor.org/info/rfc9440" quoteTitle="true" derivedAnchor="RFC9440">
          <front>
            <title>Client-Cert HTTP Header Field</title>
            <author fullname="B. Campbell" initials="B." surname="Campbell"/>
            <author fullname="M. Bishop" initials="M." surname="Bishop"/>
            <date month="July" year="2023"/>
            <abstract>
              <t indent="0">This document describes HTTP extension header fields that allow a TLS terminating reverse proxy (TTRP) to convey the client certificate information of a mutually authenticated TLS connection to the origin server in a common and predictable manner.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9440"/>
          <seriesInfo name="DOI" value="10.17487/RFC9440"/>
        </reference>
        <reference anchor="RFC9525" target="https://www.rfc-editor.org/info/rfc9525" quoteTitle="true" derivedAnchor="RFC9525">
          <front>
            <title>Service Identity in TLS</title>
            <author fullname="P. Saint-Andre" initials="P." surname="Saint-Andre"/>
            <author fullname="R. Salz" initials="R." surname="Salz"/>
            <date month="November" year="2023"/>
            <abstract>
              <t indent="0">Many application technologies enable secure communication between two entities by means of Transport Layer Security (TLS) with Internet Public Key Infrastructure using X.509 (PKIX) certificates. This document specifies procedures for representing and verifying the identity of application services in such interactions.</t>
              <t indent="0">This document obsoletes RFC 6125.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9525"/>
          <seriesInfo name="DOI" value="10.17487/RFC9525"/>
        </reference>
        <reference anchor="SP80063C" target="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-63c.pdf" quoteTitle="true" derivedAnchor="SP80063C">
          <front>
            <title>Digital Identity Guidelines: Federation and Assertions</title>
            <author initials="P." surname="Grassi">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Richer">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Squire">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Fenton">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="E." surname="Nadeau">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Lefkovitz">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Danker">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Y." surname="Choong">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Greene">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Theofanos">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="June"/>
          </front>
          <seriesInfo name="NIST SP" value="800-63C"/>
          <seriesInfo name="DOI" value="10.6028/NIST.SP.800-63c"/>
        </reference>
        <reference anchor="Subj-ID-Formats" target="https://www.iana.org/assignments/secevent" quoteTitle="true" derivedAnchor="Subj-ID-Formats">
          <front>
            <title>Subject Identifier Formats</title>
            <author>
              <organization showOnFrontPage="true">IANA</organization>
            </author>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="vs-oauth2" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-comparison-with-oauth-20">Comparison with OAuth 2.0</name>
      <t indent="0" pn="section-appendix.a-1">GNAP's protocol design differs from OAuth 2.0's in several fundamental ways:</t>
      <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-appendix.a-2"><li pn="section-appendix.a-2.1" derivedCounter="1.">
          <t indent="0" pn="section-appendix.a-2.1.1"><strong>Consent and authorization flexibility:</strong>  </t>
          <t indent="0" pn="section-appendix.a-2.1.2">
OAuth 2.0 generally assumes the user has access to a web browser. The type of interaction available is fixed by the grant type, and the most common interactive grant types start in the browser. OAuth 2.0 assumes that the user using the client software is the same user that will interact with the AS to approve access.  </t>
          <t indent="0" pn="section-appendix.a-2.1.3">
GNAP allows various patterns to manage authorizations and consents required to fulfill this requested delegation, including information sent by the client instance, information supplied by external parties, and information gathered through the interaction process. GNAP allows a client instance to list different ways that it can start and finish an interaction, and these can be mixed together as needed for different use cases. GNAP interactions can use a browser, but they don't have to. Methods can use inter-application messaging protocols, out-of-band data transfer, or anything else. GNAP allows extensions to define new ways to start and finish an interaction, as new methods and platforms are expected to become available over time. GNAP is designed to allow the end user and the RO to be two different people, but it still works in the optimized case of them being the same party.</t>
        </li>
        <li pn="section-appendix.a-2.2" derivedCounter="2.">
          <t indent="0" pn="section-appendix.a-2.2.1"><strong>Intent registration and inline negotiation:</strong>  </t>
          <t indent="0" pn="section-appendix.a-2.2.2">
OAuth 2.0 uses different "grant types" that start at different endpoints for different purposes. Many of these require discovery of several interrelated parameters.  </t>
          <t indent="0" pn="section-appendix.a-2.2.3">
GNAP requests all start with the same type of request to the same endpoint at the AS. Next steps are negotiated between the client instance and AS based on software capabilities, policies surrounding requested access, and the overall context of the ongoing request. GNAP defines a continuation API that allows the client instance and AS to request and send additional information from each other over multiple steps. This continuation API uses the same access token protection that other GNAP-protected APIs use. GNAP allows discovery to optimize the requests, but it isn't required thanks to the negotiation capabilities.  </t>
          <t indent="0" pn="section-appendix.a-2.2.4">
GNAP is able to handle the life cycle of an authorization request and therefore simplifies the mental model surrounding OAuth2. For instance, there's no need for refresh tokens when the API enables proper rotation of access tokens.</t>
        </li>
        <li pn="section-appendix.a-2.3" derivedCounter="3.">
          <t indent="0" pn="section-appendix.a-2.3.1"><strong>Client instances:</strong>  </t>
          <t indent="0" pn="section-appendix.a-2.3.2">
OAuth 2.0 requires all clients to be registered at the AS and to use a client_id known to the AS as part of the protocol. This client_id is generally assumed to be assigned by a trusted authority during a registration process, and OAuth places a lot of trust on the client_id as a result. Dynamic registration allows different classes of clients to get a client_id at runtime, even if they only ever use it for one request.  </t>
          <t indent="0" pn="section-appendix.a-2.3.3">
GNAP allows the client instance to present an unknown key to the AS and use that key to protect the ongoing request. GNAP's client instance identifier mechanism allows for pre-registered clients and dynamically registered clients to exist as an optimized case without requiring the identifier as part of the protocol at all times.</t>
        </li>
        <li pn="section-appendix.a-2.4" derivedCounter="4.">
          <t indent="0" pn="section-appendix.a-2.4.1"><strong>Expanded delegation:</strong>  </t>
          <t indent="0" pn="section-appendix.a-2.4.2">
	    OAuth 2.0 defines the "scope" parameter for controlling access to APIs.
 This parameter has been coopted to mean a number of
 different things in different protocols, including flags for
 turning special behavior on and off and the return of data
 apart from the access token.  
	  The "resource" indicator (defined in <xref target="RFC8707" format="default" sectionFormat="of" derivedContent="RFC8707"/>) and Rich Authorization Request (RAR) extensions (as defined in <xref target="RFC9396" format="default" sectionFormat="of" derivedContent="RFC9396"/>) expand on the "scope" concept in similar but different ways.  </t>
          <t indent="0" pn="section-appendix.a-2.4.3">
GNAP defines a rich structure for requesting access (analogous to RAR), with string references as an optimization (analogous to scopes). GNAP defines methods for requesting directly returned user information, separate from API access. This information includes identifiers for the current user and structured assertions. GNAP makes no assumptions or demands on the format or contents of the access token, but the RS extension allows a negotiation of token formats between the AS and RS.</t>
        </li>
        <li pn="section-appendix.a-2.5" derivedCounter="5.">
          <t indent="0" pn="section-appendix.a-2.5.1"><strong>Cryptography-based security:</strong>  </t>
          <t indent="0" pn="section-appendix.a-2.5.2">
OAuth 2.0 uses shared bearer secrets, including the client_secret and access token, and advanced authentication and sender constraints have been built on after the fact in inconsistent ways.  </t>
          <t indent="0" pn="section-appendix.a-2.5.3">
In GNAP, all communication between the client instance and AS is bound to a key held by the client instance. GNAP uses the same cryptographic mechanisms for both authenticating the client (to the AS) and binding the access token (to the RS and the AS). GNAP allows extensions to define new cryptographic protection mechanisms, as new methods are expected to become available over time. GNAP does not have the notion of "public clients" because key information can always be sent and used dynamically.</t>
        </li>
        <li pn="section-appendix.a-2.6" derivedCounter="6.">
          <t indent="0" pn="section-appendix.a-2.6.1"><strong>Privacy and usable security:</strong>  </t>
          <t indent="0" pn="section-appendix.a-2.6.2">
OAuth 2.0's deployment model assumes a strong binding between the AS and the RS.  </t>
          <t indent="0" pn="section-appendix.a-2.6.3">
GNAP is designed to be interoperable with decentralized identity standards and to provide a human-centric authorization layer. In addition to this specification, GNAP supports various patterns of communication between RSs and ASes through extensions. GNAP tries to limit the odds of a consolidation to just a handful of popular AS services.</t>
        </li>
      </ol>
    </section>
    <section anchor="examples" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-example-protocol-flows">Example Protocol Flows</name>
      <t indent="0" pn="section-appendix.b-1">The protocol defined in this specification provides a number of
features that can be combined to solve many different kinds of
authentication scenarios. This section seeks to show examples of how the
protocol could be applied for different situations.</t>
      <t indent="0" pn="section-appendix.b-2">Some longer fields, particularly cryptographic information, have been
truncated for display purposes in these examples.</t>
      <section anchor="example-auth-code" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.1">
        <name slugifiedName="name-redirect-based-user-interac">Redirect-Based User Interaction</name>
        <t indent="0" pn="section-appendix.b.1-1">In this scenario, the user is the RO and has access to a web
browser, and the client instance can take front-channel callbacks on the same
device as the user. This combination is analogous to the OAuth 2.0
Authorization Code grant type.</t>
        <t indent="0" pn="section-appendix.b.1-2">The client instance initiates the request to the AS. Here, the client instance
identifies itself using its public key.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.1-3">
POST /tx HTTP/1.1
Host: server.example.com
Content-Type: application/json
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            {
                "actions": [
                    "read",
                    "write",
                    "dolphin"
                ],
                "locations": [
                    "https://server.example.net/",
                    "https://resource.local/other"
                ],
                "datatypes": [
                    "metadata",
                    "images"
                ]
            }
        ],
    },
    "client": {
      "key": {
        "proof": "httpsig",
        "jwk": {
            "kty": "RSA",
            "e": "AQAB",
            "kid": "xyz-1",
            "alg": "RS256",
            "n": "kOB5rR4Jv0GMeLaY6_It_r3ORwdf8ci_JtffXyaSx8..."
        }
      }
    },
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.example.net/return/123455",
            "nonce": "LKLTI25DK82FX4T4QFZC"
        }
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.1-4">The AS processes the request and determines that the RO needs to
interact. The AS returns the following response that gives the client instance the
information it needs to connect. The AS has also indicated to the
client instance that it can use the given instance identifier to identify itself in
future requests (<xref target="request-instance" format="default" sectionFormat="of" derivedContent="Section 2.3.1"> </xref>).</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.1-5">
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "interact": {
      "redirect":
        "https://server.example.com/interact/4CF492MLVMSW9MKM",
      "finish": "MBDOFXG4Y5CVJCX821LH"
    }
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU"
        },
        "uri": "https://server.example.com/continue"
    },
    "instance_id": "7C7C4AZ9KHRS6X63AJAO"
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.1-6">The client instance saves the response and redirects the user to the
interaction start mode's "redirect" URI by sending the following HTTP message to the user's
browser.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.1-7">
HTTP 303 Found
Location: https://server.example.com/interact/4CF492MLVMSW9MKM
</sourcecode>
        <t indent="0" pn="section-appendix.b.1-8">The user's browser fetches the AS's interaction URI. The user logs
in, is identified as the RO for the resource being requested, and
approves the request. Since the AS has a callback parameter that was sent in the initial request's interaction finish method, the AS
generates the interaction reference, calculates the hash, and
redirects the user back to the client instance with these additional values
added as query parameters.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.1-9">
NOTE: '\' line wrapping per RFC 8792

HTTP 302 Found
Location: https://client.example.net/return/123455\
  ?hash=x-gguKWTj8rQf7d7i3w3UhzvuJ5bpOlKyAlVpLxBffY\
  &amp;interact_ref=4IFWWIKYBC2PQ6U56NL1
</sourcecode>
        <t indent="0" pn="section-appendix.b.1-10">The client instance receives this request from the user's browser. The
client instance ensures that this is the same user that was sent out by
validating session information and retrieves the stored pending
request. The client instance uses the values in this to validate the hash
parameter. The client instance then calls the continuation URI using the associated continuation access token and presents the
interaction reference in the request content. The client instance signs
the request as above.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.1-11">
POST /continue HTTP/1.1
Host: server.example.com
Content-Type: application/json
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "interact_ref": "4IFWWIKYBC2PQ6U56NL1"
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.1-12">The AS retrieves the pending request by looking up the pending grant request associated with the presented continuation access token. Seeing that the grant is approved, the AS issues
an access token and returns this to the client instance.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.1-13">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "manage": "https://server.example.com/token/PRY5NM33O\
            M4TB8N6BW7OZB8CDFONP219RP1L",
        "access": [{
            "actions": [
                "read",
                "write",
                "dolphin"
            ],
            "locations": [
                "https://server.example.net/",
                "https://resource.local/other"
            ],
            "datatypes": [
                "metadata",
                "images"
            ]
        }]
    },
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU"
        },
        "uri": "https://server.example.com/continue"
    }
}
</sourcecode>
      </section>
      <section anchor="example-device" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.2">
        <name slugifiedName="name-secondary-device-interactio">Secondary Device Interaction</name>
        <t indent="0" pn="section-appendix.b.2-1">In this scenario, the user does not have access to a web browser on
the device and must use a secondary device to interact with the AS.
The client instance can display a user code or a printable QR code.
The client instance is not able to accept callbacks from the AS and needs to poll
for updates while waiting for the user to authorize the request.</t>
        <t indent="0" pn="section-appendix.b.2-2">The client instance initiates the request to the AS.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.2-3">
POST /tx HTTP/1.1
Host: server.example.com
Content-Type: application/json
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            "dolphin-metadata", "some other thing"
        ],
    },
    "client": "7C7C4AZ9KHRS6X63AJAO",
    "interact": {
        "start": ["redirect", "user_code"]
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.2-4">The AS processes this and determines that the RO needs to interact.
The AS supports both redirect URIs and user codes for interaction, so
it includes both. Since there is no interaction finish mode, the AS does not include
a nonce but does include a "wait" parameter on the continuation
section because it expects the client instance to poll for results.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.2-5">
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "interact": {
        "redirect": "https://srv.ex/MXKHQ",
        "user_code": {
            "code": "A1BC3DFF"
        }
    },
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU"
        },
        "uri": "https://server.example.com/continue/VGJKPTKC50",
        "wait": 60
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.2-6">The client instance saves the response and displays the user code visually
on its screen along with the static device URI. The client instance also
displays the short interaction URI as a QR code to be scanned.</t>
        <t indent="0" pn="section-appendix.b.2-7">If the user scans the code, they are taken to the interaction
endpoint, and the AS looks up the current pending request based on the
incoming URI. If the user instead goes to the static page and enters
the code manually, the AS looks up the current pending request based
on the value of the user code. In both cases, the user logs in, is
identified as the RO for the resource being requested, and approves
the request. Once the request has been approved, the AS displays to
the user a message to return to their device.</t>
        <t indent="0" pn="section-appendix.b.2-8">Meanwhile, the client instance polls the AS every 60 seconds at
the continuation URI. The client instance signs the request using the
same key and method that it did in the first request.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.2-9">
POST /continue/VGJKPTKC50 HTTP/1.1
Host: server.example.com
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...
</sourcecode>
        <t indent="0" pn="section-appendix.b.2-10">The AS retrieves the pending request based on the pending grant request associated with the continuation access token and
determines that it has not yet been authorized. The AS indicates to
the client instance that no access token has yet been issued but it can
continue to call after another 60-second timeout.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.2-11">
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "continue": {
        "access_token": {
            "value": "G7YQT4KQQ5TZY9SLSS5E"
        },
        "uri": "https://server.example.com/continue/ATWHO4Q1WV",
        "wait": 60
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.2-12">Note that the continuation URI and access token have been rotated since they were
used by the client instance to make this call. The client instance polls the
continuation URI after a 60-second timeout using this new information.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.2-13">
POST /continue/ATWHO4Q1WV HTTP/1.1
Host: server.example.com
Authorization: GNAP G7YQT4KQQ5TZY9SLSS5E
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...
</sourcecode>
        <t indent="0" pn="section-appendix.b.2-14">The AS retrieves the pending request based on the URI and access token,
determines that it has been approved, and issues an access
token for the client to use at the RS.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.2-15">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "manage": "https://server.example.com/token/PRY5NM33O\
            M4TB8N6BW7OZB8CDFONP219RP1L",
        "access": [
            "dolphin-metadata", "some other thing"
        ]
    }
}
</sourcecode>
      </section>
      <section anchor="example-no-user" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.3">
        <name slugifiedName="name-no-user-involvement">No User Involvement</name>
        <t indent="0" pn="section-appendix.b.3-1">In this scenario, the client instance is requesting access on its own
behalf, with no user to interact with.</t>
        <t indent="0" pn="section-appendix.b.3-2">The client instance creates a request to the AS, identifying itself with its
public key and using MTLS to make the request.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.3-3">
POST /tx HTTP/1.1
Host: server.example.com
Content-Type: application/json

{
    "access_token": {
        "access": [
            "backend service", "nightly-routine-3"
        ],
    },
    "client": {
      "key": {
        "proof": "mtls",
        "cert#S256": "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2"
      }
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.3-4">The AS processes this, determines that the client instance can ask for
the requested resources, and issues an access token.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.3-5">
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "manage": "https://server.example.com/token",
        "access": [
            "backend service", "nightly-routine-3"
        ]
    }
}
</sourcecode>
      </section>
      <section anchor="example-async" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.4">
        <name slugifiedName="name-asynchronous-authorization-2">Asynchronous Authorization</name>
        <t indent="0" pn="section-appendix.b.4-1">In this scenario, the client instance is requesting on behalf of a specific
RO but has no way to interact with the user. The AS can
asynchronously reach out to the RO for approval in this scenario.</t>
        <t indent="0" pn="section-appendix.b.4-2">The client instance starts the request at the AS by requesting a set of
resources. The client instance also identifies a particular user.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.4-3">
POST /tx HTTP/1.1
Host: server.example.com
Content-Type: application/json
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            {
                "type": "photo-api",
                "actions": [
                    "read",
                    "write",
                    "dolphin"
                ],
                "locations": [
                    "https://server.example.net/",
                    "https://resource.local/other"
                ],
                "datatypes": [
                    "metadata",
                    "images"
                ]
            },
            "read", "dolphin-metadata",
            {
                "type": "financial-transaction",
                "actions": [
                    "withdraw"
                ],
                "identifier": "account-14-32-32-3",
                "currency": "USD"
            },
            "some other thing"
        ],
    },
    "client": "7C7C4AZ9KHRS6X63AJAO",
    "user": {
        "sub_ids": [ {
            "format": "opaque",
            "id": "J2G8G8O4AZ"
        } ]
  }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.4-4">The AS processes this and determines that the RO needs to interact.
The AS determines that it can reach the identified user asynchronously
and that the identified user does have the ability to approve this
request. The AS indicates to the client instance that it can poll for
continuation.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.4-5">
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "continue": {
        "access_token": {
            "value": "80UPRY5NM33OMUKMKSKU"
        },
        "uri": "https://server.example.com/continue",
        "wait": 60
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.4-6">The AS reaches out to the RO and prompts them for consent. In this
example scenario, the AS has an application that it can push notifications to for the specified account.</t>
        <t indent="0" pn="section-appendix.b.4-7">Meanwhile, the client instance periodically polls the AS every 60 seconds at
the continuation URI.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.4-8">
POST /continue HTTP/1.1
Host: server.example.com
Authorization: GNAP 80UPRY5NM33OMUKMKSKU
Signature-Input: sig1=...
Signature: sig1=...
</sourcecode>
        <t indent="0" pn="section-appendix.b.4-9">The AS retrieves the pending request based on the continuation access token and
determines that it has not yet been authorized. The AS indicates to
the client instance that no access token has yet been issued but it can
continue to call after another 60-second timeout.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.4-10">
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "continue": {
        "access_token": {
            "value": "BI9QNW6V9W3XFJK4R02D"
        },
        "uri": "https://server.example.com/continue",
        "wait": 60
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.4-11">Note that the continuation access token value has been rotated since it was
used by the client instance to make this call. The client instance polls the
continuation URI after a 60-second timeout using the new token.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.4-12">
POST /continue HTTP/1.1
Host: server.example.com
Authorization: GNAP BI9QNW6V9W3XFJK4R02D
Signature-Input: sig1=...
Signature: sig1=...
</sourcecode>
        <t indent="0" pn="section-appendix.b.4-13">The AS retrieves the pending request based on the handle,
determines that it has been approved, and issues an access
token.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.4-14">
NOTE: '\' line wrapping per RFC 8792

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store

{
    "access_token": {
        "value": "OS9M2PMHKUR64TB8N6BW7OZB8CDFONP219RP1LT0",
        "manage": "https://server.example.com/token/PRY5NM33O\
            M4TB8N6BW7OZB8CDFONP219RP1L",
        "access": [
            "dolphin-metadata", "some other thing"
        ]
    }
}
</sourcecode>
      </section>
      <section anchor="example-oauth2" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.b.5">
        <name slugifiedName="name-applying-oauth-20-scopes-an">Applying OAuth 2.0 Scopes and Client IDs</name>
        <t indent="0" pn="section-appendix.b.5-1">While GNAP is not designed to be directly compatible with
OAuth 2.0 <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>, considerations have been made to enable the use of
OAuth 2.0 concepts and constructs more smoothly within GNAP.</t>
        <t indent="0" pn="section-appendix.b.5-2">In this scenario, the client developer has a <tt>client_id</tt> and set of
<tt>scope</tt> values from their OAuth 2.0 system and wants to apply them to the
new protocol. In OAuth 2.0, the client developer would put
their <tt>client_id</tt> and <tt>scope</tt> values as parameters into a redirect request
to the authorization endpoint.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.5-3">
NOTE: '\' line wrapping per RFC 8792

HTTP 302 Found
Location: https://server.example.com/authorize\
  ?client_id=7C7C4AZ9KHRS6X63AJAO\
  &amp;scope=read%20write%20dolphin\
  &amp;redirect_uri=https://client.example.net/return\
  &amp;response_type=code\
  &amp;state=123455
</sourcecode>
        <t indent="0" pn="section-appendix.b.5-4">Now the developer wants to make an analogous request to the AS
using GNAP. To do so, the client instance makes an HTTP POST and
places the OAuth 2.0 values in the appropriate places.</t>
        <sourcecode type="http-message" markers="false" pn="section-appendix.b.5-5">
POST /tx HTTP/1.1
Host: server.example.com
Content-Type: application/json
Signature-Input: sig1=...
Signature: sig1=...
Content-Digest: sha-256=...

{
    "access_token": {
        "access": [
            "read", "write", "dolphin"
        ],
        "flags": [ "bearer" ]
    },
    "client": "7C7C4AZ9KHRS6X63AJAO",
    "interact": {
        "start": ["redirect"],
        "finish": {
            "method": "redirect",
            "uri": "https://client.example.net/return?state=123455",
            "nonce": "LKLTI25DK82FX4T4QFZC"
        }
    }
}
</sourcecode>
        <t indent="0" pn="section-appendix.b.5-6">The <tt>client_id</tt> can be used to identify the client instance's keys that it
uses for authentication, the scopes represent resources that the
client instance is requesting, and the <tt>redirect_uri</tt> and <tt>state</tt> value are
pre-combined into a <tt>finish</tt> URI that can be unique per request. The
client instance additionally creates a nonce to protect the callback, separate
from the state parameter that it has added to its return URI.</t>
        <t indent="0" pn="section-appendix.b.5-7">From here, the protocol continues as above.</t>
      </section>
    </section>
    <section anchor="interoperability-profiles" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-interoperability-profiles">Interoperability Profiles</name>
      <t indent="0" pn="section-appendix.c-1">The GNAP specification has many different modes, options, and mechanisms, allowing it
to solve a wide variety of problems in a wide variety of deployments. The wide applicability
of GNAP makes it difficult, if not impossible, to define a set of mandatory-to-implement
features, since one environment's required feature would be impossible to do in another environment.
While this is a large problem in many systems, GNAP's back-and-forth negotiation process
allows parties to declare at runtime everything that they support and then have the other party
select from that the subset of items that they also support, leading to functional compatibility
in many parts of the protocol even in an open world scenario.</t>
      <t indent="0" pn="section-appendix.c-2">In addition, GNAP defines a set of interoperability profiles that gather together core requirements
to fix options into common configurations that are likely to be useful to large populations of
similar applications.</t>
      <t indent="0" pn="section-appendix.c-3">Conformant AS implementations of these profiles <bcp14>MUST</bcp14> implement at least the features as specified
in the profile and <bcp14>MAY</bcp14> implement additional features or profiles. Conformant client implementations
of these profiles <bcp14>MUST</bcp14> implement at least the features as specified, except where a subset of the
features allows the protocol to function (such as using polling instead of a push finish method for
the Secondary Device profile).</t>
      <section anchor="web-based-redirection" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.c.1">
        <name slugifiedName="name-web-based-redirection">Web-Based Redirection</name>
        <t indent="0" pn="section-appendix.c.1-1">Implementations conformant to the web-based redirection profile of GNAP <bcp14>MUST</bcp14> implement all of the following features:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.c.1-2">
          <li pn="section-appendix.c.1-2.1">Interaction Start Methods: <tt>redirect</tt></li>
          <li pn="section-appendix.c.1-2.2">Interaction Finish Methods: <tt>redirect</tt></li>
          <li pn="section-appendix.c.1-2.3">Interaction Hash Algorithms:  <tt>sha-256</tt></li>
          <li pn="section-appendix.c.1-2.4">Key Proofing Methods:  <tt>httpsig</tt> with no additional parameters</li>
          <li pn="section-appendix.c.1-2.5">Key Formats:  <tt>jwks</tt> with signature algorithm included in the key's <tt>alg</tt> parameter</li>
          <li pn="section-appendix.c.1-2.6">JOSE Signature Algorithm:  PS256</li>
          <li pn="section-appendix.c.1-2.7">Subject Identifier Formats:  <tt>opaque</tt></li>
          <li pn="section-appendix.c.1-2.8">Assertion Formats:  <tt>id_token</tt></li>
        </ul>
      </section>
      <section anchor="secondary-device" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.c.2">
        <name slugifiedName="name-secondary-device">Secondary Device</name>
        <t indent="0" pn="section-appendix.c.2-1">Implementations conformant to the Secondary Device profile of GNAP <bcp14>MUST</bcp14> implement all of the following features:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.c.2-2">
          <li pn="section-appendix.c.2-2.1">Interaction Start Methods: <tt>user_code</tt> and <tt>user_code_uri</tt></li>
          <li pn="section-appendix.c.2-2.2">Interaction Finish Methods: <tt>push</tt></li>
          <li pn="section-appendix.c.2-2.3">Interaction Hash Algorithms: <tt>sha-256</tt></li>
          <li pn="section-appendix.c.2-2.4">Key Proofing Methods: <tt>httpsig</tt> with no additional parameters</li>
          <li pn="section-appendix.c.2-2.5">Key Formats: <tt>jwks</tt> with signature algorithm included in the key's <tt>alg</tt> parameter</li>
          <li pn="section-appendix.c.2-2.6">JOSE Signature Algorithm: PS256</li>
          <li pn="section-appendix.c.2-2.7">Subject Identifier Formats: <tt>opaque</tt></li>
          <li pn="section-appendix.c.2-2.8">Assertion Formats: <tt>id_token</tt></li>
        </ul>
      </section>
    </section>
    <section anchor="extensions" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.d">
      <name slugifiedName="name-guidance-for-extensions">Guidance for Extensions</name>
      <t indent="0" pn="section-appendix.d-1">Extensions to this specification have a variety of places to alter the protocol, including many
fields and objects that can have additional values in a registry (<xref target="IANA" format="default" sectionFormat="of" derivedContent="Section 10"> </xref>) established by this
specification. For interoperability and to preserve the security of the protocol, extensions should
register new values with IANA by following the specified mechanism. While it may technically be
possible to extend the protocol by adding elements to JSON objects that are not governed by an
IANA registry, a recipient may ignore such values but is also allowed to reject them.</t>
      <t indent="0" pn="section-appendix.d-2">Most object fields in GNAP are specified with types, and those types can allow different but
related behavior. For example, the <tt>access</tt> array can include either strings or objects, as
discussed in <xref target="resource-access-rights" format="default" sectionFormat="of" derivedContent="Section 8"/>. The use of JSON polymorphism (<xref target="polymorphism" format="default" sectionFormat="of" derivedContent="Appendix E"> </xref>)
within GNAP allows extensions to define new fields by not only choosing a new name but also by
using an existing name with a new type. However, the extension's definition
of a new type for a field needs to fit the same kind of item being extended. For example, a
hypothetical extension could define a string value for the <tt>access_token</tt> request field,
with a URL to download a hosted access token request. Such an extension would be appropriate as
the <tt>access_token</tt> field still defines the access tokens being requested. However, if an extension
were to define a string value for the <tt>access_token</tt> request field, with the value instead
being something unrelated to the access token request such as a value or key format, this would
not be an appropriate means of extension. (Note that this specific extension example would create
another form of SSRF attack surface as discussed in <xref target="security-ssrf" format="default" sectionFormat="of" derivedContent="Section 11.34"/>.)</t>
      <t indent="0" pn="section-appendix.d-3">As another example, both interaction start modes (<xref target="request-interact-start" format="default" sectionFormat="of" derivedContent="Section 2.5.1"> </xref>) and
key proofing methods (<xref target="binding-keys" format="default" sectionFormat="of" derivedContent="Section 7.3"> </xref>) can be defined as either strings or objects. An extension
could take a method defined as a string, such as <tt>app</tt>, and define an object-based version with
additional parameters. This extension should still define a method to launch an application on the
end user's device, just like <tt>app</tt> does when specified as a string.</t>
      <t indent="0" pn="section-appendix.d-4">Additionally, the ability to deal with different types for a field is not expected to be equal
between an AS and client software, with the client software being assumed to be both more varied
and more simplified than the AS. Furthermore, the nature of the negotiation process in GNAP allows
the AS more chance of recovery from unknown situations and parameters. As such, any extensions that
change the type of any field returned to a client instance should only do so when the client
instance has indicated specific support for that extension through some kind of request parameter.</t>
    </section>
    <section anchor="polymorphism" numbered="true" removeInRFC="false" toc="include" pn="section-appendix.e">
      <name slugifiedName="name-json-structures-and-polymor">JSON Structures and Polymorphism</name>
      <t indent="0" pn="section-appendix.e-1">GNAP makes use of polymorphism within the <xref target="RFC8259" format="default" sectionFormat="of" derivedContent="RFC8259">JSON</xref> structures used for
the protocol. Each portion of this protocol is defined in terms of the JSON data type
that its values can take, whether it's a string, object, array, boolean, or number. For some
fields, different data types offer different descriptive capabilities and are used in different
situations for the same field. Each data type provides a different syntax to express
the same underlying semantic protocol element, which allows for optimization and
simplification in many common cases.</t>
      <t indent="0" pn="section-appendix.e-2">Even though JSON is often used to describe strongly typed structures, JSON on its own is naturally polymorphic.
In JSON, the named members of an object have no type associated with them, and any
data type can be used as the value for any member. In practice, each member
has a semantic type that needs to make sense to the parties creating and
consuming the object. Within this protocol, each object member is defined in terms
of its semantic content, and this semantic content might have expressions in
different concrete data types for different specific purposes. Since each object
member has exactly one value in JSON, each data type for an object member field
is naturally mutually exclusive with other data types within a single JSON object.</t>
      <t indent="0" pn="section-appendix.e-3">For example, a resource request for a single access token is composed of an object
of resource request descriptions, while a request for multiple access tokens is
composed of an array whose member values are all objects. Both of these represent requests
for access, but the difference in syntax allows the client instance and AS to differentiate
between the two request types in the same request.</t>
      <t indent="0" pn="section-appendix.e-4">Another form of polymorphism in JSON comes from the fact that the values within JSON
arrays need not all be of the same JSON data type. However, within this protocol,
each element within the array needs to be of the same kind of semantic element for
the collection to make sense, even when the data types are different from each other.</t>
      <t indent="0" pn="section-appendix.e-5">For example, each aspect of a resource request can be described using an object with multiple
dimensional components, or the aspect can be requested using a string. In both cases, the resource
request is being described in a way that the AS needs to interpret, but with different
levels of specificity and complexity for the client instance to deal with. An API designer
can provide a set of common access scopes as simple strings but still allow
client software developers to specify custom access when needed for more complex APIs.</t>
      <t indent="0" pn="section-appendix.e-6">Extensions to this specification can use different data types for defined fields, but
each extension needs to not only declare what the data type means but also provide
justification for the data type representing the same basic kind of thing it extends.
For example, an extension declaring an "array" representation for a field would need
to explain how the array represents something akin to the non-array element that it
is replacing. See additional discussion in <xref target="extensions" format="default" sectionFormat="of" derivedContent="Appendix D"/>.</t>
    </section>
    <section anchor="Acknowledgements" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.f">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.f-1">The authors would like to thank the following
      individuals for their reviews, implementations, and contributions:
      <contact fullname="Åke Axeland" asciiFullname="Ake Axeland"/>, <contact fullname="Aaron Parecki"/>, <contact fullname="Adam Omar Oueidat"/>,
      <contact fullname="Andrii Deinega"/>, <contact fullname="Annabelle       Backman"/>, <contact fullname="Dick Hardt"/>, <contact fullname="Dmitri       Zagidulin"/>, <contact fullname="Dmitry Barinov"/>, <contact fullname="Florian Helmschmidt"/>,
      <contact fullname="Francis Pouatcha"/>, <contact fullname="George       Fletcher"/>, <contact fullname="Haardik Haardik"/>, <contact fullname="Hamid Massaoud"/>, <contact fullname="Jacky Yuan"/>, <contact fullname="Joseph Heenan"/>,
      <contact fullname="Kathleen Moriarty"/>, <contact fullname="Leif       Johansson"/>, <contact fullname="Mike Jones"/>, <contact fullname="Mike       Varley"/>, <contact fullname="Nat Sakimura"/>, <contact fullname="Takahiko Kawasaki"/>, <contact fullname="Takahiro Tsuchiya"/>, and
      <contact fullname="Yaron Sheffer"/>.</t>
      <t indent="0" pn="section-appendix.f-2">The authors would also like to thank the GNAP Working Group design
      team (<contact fullname="Kathleen Moriarty"/>, <contact fullname="Dick Hardt"/>, <contact fullname="Mike Jones"/>, and the authors), who
      incorporated elements from the XAuth and XYZ proposals to create the
      first draft version of this document.</t>
      <t indent="0" pn="section-appendix.f-3">In addition, the authors would like to thank <contact fullname="Aaron       Parecki"/> and <contact fullname="Mike Jones"/> for insights into how to
      integrate identity and authentication systems into the core
      protocol. Both <contact fullname="Justin Richer"/> and
      <contact fullname="Dick Hardt"/> developed the use cases, diagrams, and
      insights provided in the XYZ and XAuth proposals that have been
      incorporated here. The authors would like to especially thank <contact fullname="Mike Varley"/> and the team at SecureKey for feedback and
      development of early versions of the XYZ protocol that fed into this
      standards work.</t>
      <t indent="0" pn="section-appendix.f-4">Finally, the authors want to acknowledge the immense contributions of
      <contact fullname="Aaron Parecki"/> to the content of this document. We
      thank him for his insight, input, and hard work, without which GNAP
      would not have grown to what it is.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.g">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="J." surname="Richer" fullname="Justin Richer" role="editor">
        <organization showOnFrontPage="true">Bespoke Engineering</organization>
        <address>
          <email>ietf@justin.richer.org</email>
          <uri>https://bspk.io/</uri>
        </address>
      </author>
      <author initials="F." surname="Imbault" fullname="Fabien Imbault">
        <organization showOnFrontPage="true">acert.io</organization>
        <address>
          <email>fabien.imbault@acert.io</email>
          <uri>https://acert.io/</uri>
        </address>
      </author>
    </section>
  </back>
</rfc>
