<?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-00" 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="2023" month="April" day="25"/>

    
    <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'><organization/></author>
<date month='October' year='2017'/>
<abstract><t>This specification defines a model for the relationships between resources on the Web (&quot;links&quot;) and the type of those relationships (&quot;link relation types&quot;).</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:
H4sIAAAAAAAAA51X224bNxB951cM5IcAhVZ23RZI1SStcyniwrnAcdCHoqip
XUpivUtuSa4VNUi+vWdISt6VhFzqB0O7vMyZM2cuWxSFqGRQUzo9Of2uOPm+
OP1BBB1qvBldaHNDTtUyaGv8UrcU1q3yNLeOZBeWygRdxsWRqGxpZINTlZPz
UGgV5sUyhFa2uhjuLWpcW5ycCDyqhXXrKflQiZV1Nwtnu3ZKz6+uXp+9Phe6
dVMKrvPh9OTkx5NTcaPW2FZN6dwE5YwKxVO2JnyQpvpL1tYAwFp50eop/RFs
OSb806aC9TF564JTc49f6yb/CE6XW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