<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.31 (Ruby 3.2.2) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>

<?rfc tocindent="yes"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc docmapping="yes"?>

<rfc ipr="trust200902" docName="draft-ietf-httpapi-authentication-link-01" category="std" consensus="true" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title>Link relationship types for authentication</title>

    <author initials="E." surname="Pot" fullname="Evert Pot">
      <organization></organization>
      <address>
        <email>me@evertpot.com</email>
        <uri>https://evertpot.com/</uri>
      </address>
    </author>

    <date year="2024" month="March" day="04"/>

    
    <workgroup>HTTPAPI</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This specification defines a set of relationships that may be used
to indicate where a user may authenticate, log out, register a new
account or find out who is currently authenticated.</t>



    </abstract>



  </front>

  <middle>


<section anchor="introduction"><name>Introduction</name>

<t><xref target="RFC8288"/> defines a framework and registry for Link Relationships types.
This specification defines a set of new relationship types to aid clients
in discovering endpoints for authentication and registration:
<spanx style="verb">authenticate</spanx>, <spanx style="verb">authenticated-as</spanx>, <spanx style="verb">logout</spanx> and <spanx style="verb">register-user</spanx>.</t>

<section anchor="usage-examples"><name>Usage examples</name>

<section anchor="browsers"><name>Browsers</name>

<t>Many websites already provide these features. If these links are annotated
with a standard relationship type, it might allow browser extensions to
automatically discover these and present them in new ways. It could for
example show a browser-level logout button.</t>

<t>Link relationships such as these could appear on any page where Sign in,
Register, Log in or Log out features exist.</t>

</section>
<section anchor="web-services"><name>Web services</name>

<t>Many webservices provide a resource to discover more information about the
authenticated entity. Creating standard link relationships might allow a
generic client to discover information about the currently logged in user.</t>

<t>Similarly, an <spanx style="verb">authenticate</spanx> link could allow a generic client to find
an OAuth2 Authorization endpoint.</t>

<t>This link relationship could appear on any API endpoint where this might be
relevant, or it might just show up on central endpoint discovery document.</t>

</section>
</section>
</section>
<section anchor="authenticate"><name>authenticate</name>

<t>The <spanx style="verb">authenticate</spanx> can be used to link to a resource that hosts
a page where a user can authenticate itself for the current resource.</t>

<t>For example, this link might refer to a HTML login page.</t>

<t>Example:</t>

<figure><sourcecode type="html"><![CDATA[
<a href="/login" rel="authenticate">Login</a>
]]></sourcecode></figure>

</section>
<section anchor="authenticated-as"><name>authenticated-as</name>

<t>The <spanx style="verb">authenticated-as</spanx> link refers to a resource that describes the effective
authenticated user for a HTTP response.</t>

<t>Following this link might allow a client to answer the question 'who am I?'.
This might link to a user profile page, or it might link to an API that
returns a JSON response with user information.</t>

<t>Example:</t>

<figure><sourcecode type="http"><![CDATA[
Link: <https://api.example.org/users/123-abc>; rel="authenticated-as"
]]></sourcecode></figure>

</section>
<section anchor="logout"><name>logout</name>

<t>The <spanx style="verb">logout</spanx> refers to a resource where an authenticated user
might end their session.</t>

<t>In a browser this might clear cookies, or in the case of OAuth2 it could
revoke any active authentication tokens.</t>

</section>
<section anchor="register-user"><name>register-user</name>

<t>The <spanx style="verb">register-user</spanx> Link Relation refers to a resource where a user might
sign up for a service for the context URI.</t>

<t>The linked resource might contain a HTML registration form, or otherwise
instructions that allow a client to find out how to sign up for the service.</t>

</section>
<section anchor="iana-considerations"><name>IANA considerations</name>

<t>This document defines <spanx style="verb">authenticate</spanx>, <spanx style="verb">authenticated-as</spanx>, <spanx style="verb">logout</spanx> and
<spanx style="verb">register-user</spanx> link relation types and adds them to the "Link Relations"
registry:</t>

<section anchor="authenticate-link-relation"><name>authenticate link relation</name>

<t><list style="symbols">
  <t>Relation name: authenticate</t>
  <t>Description: Refers to a resource where a client may authenticate for the
the context URI.</t>
  <t>Reference: TBD</t>
</list></t>

</section>
<section anchor="authenticated-as-link-relation"><name>authenticated-as link relation</name>

<t><list style="symbols">
  <t>Relation name: authenticated-as</t>
  <t>Description: Refers to a resource that describes the authenticated entity
for the HTTP response.</t>
  <t>Reference: TBD</t>
</list></t>

</section>
<section anchor="logout-link-relation"><name>logout link relation</name>

<t><list style="symbols">
  <t>Relation name: logout</t>
  <t>Description: Refers to an endpoint where a client may invalidate the current
authentication session.</t>
  <t>Reference: TBD</t>
</list></t>

</section>
<section anchor="register-user-link-relation"><name>register-user link relation</name>

<t><list style="symbols">
  <t>Relation name: register-user</t>
  <t>Description: Refers to a resource where a client may create a new user
account for the context URI.</t>
  <t>Reference: TBD</t>
</list></t>

</section>
</section>


  </middle>

  <back>


    <references title='Normative References'>



<reference anchor='RFC8288'>
  <front>
    <title>Web Linking</title>
    <author fullname='M. Nottingham' initials='M.' surname='Nottingham'/>
    <date month='October' year='2017'/>
    <abstract>
      <t>This specification defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types").</t>
      <t>It also defines the serialisation of such links in HTTP headers with the Link header field.</t>
    </abstract>
  </front>
  <seriesInfo name='RFC' value='8288'/>
  <seriesInfo name='DOI' value='10.17487/RFC8288'/>
</reference>




    </references>



<section anchor="changelog"><name>Changelog</name>

<section anchor="changes-since-00"><name>Changes since -00</name>

<t><list style="symbols">
  <t>More examples and clarifications</t>
</list></t>

</section>
</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA51X224bNxB951cM5IcAhVdWnD6kapLWuSEunAsSB30oipra
pSTWu+SW5FpRg+Tbe4ak5F1JyKV+MLTLy5w5c+ayRVGISgY1pdPJ6Y/F5F4x
+VEEHWq8GV1oc01O1TJoa/xStxTWrfI0t45kF5bKBF3GxZGobGlkg1OVk/NQ
aBXmxTKEVra6GO4talxbTO4KPKqFdesp+VCJlXXXC2e7dkovLi/fnL05F7p1
Uwqu8+F0Mvlpciqu1Rrbqimdm6CcUaF4ytaED9JUf8naGgBYKy9aPaU/gi2P
Cf+0qWD9mLx1wam5x691k38Ep0sslbZpZ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