Internet-Draft OAuth over AGTP November 2026
Hood Expires 27 May 2027 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-hood-oauth-over-agtp-00
Published:
Intended Status:
Informational
Expires:
Author:
C. Hood
Nomotic, Inc.

OAuth 2.0 over the Agent Transfer Protocol

Abstract

This document specifies how the OAuth 2.0 authorization framework is carried over the Agent Transfer Protocol (AGTP). OAuth defines its endpoints as HTTP resources and authenticates clients with secrets or signed assertions. AGTP is a transfer protocol for agent traffic in which every request carries the sending agent's identifier and a proof that the sender holds that agent's key. This document defines an authorization server reachable as an AGTP agent, maps the token, pushed authorization, device authorization, revocation, introspection, and metadata endpoints onto AGTP methods and paths, replaces client authentication with the AGTP request signature, and defines access tokens bound to an Agent-ID. It states which parts of OAuth move to AGTP and which remain on HTTPS. It changes no OAuth grant.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 27 May 2027.

▲

Table of Contents

1. Introduction

OAuth 2.0 [RFC6749] has four parties: a resource owner, a client, an authorization server, and a resource server. Its endpoints are HTTP resources, its client authentication is a secret or a signed assertion [RFC7523], and its proof that a token is presented by the party it was issued to is either absent (bearer tokens, [RFC6750]) or added per request by DPoP [RFC9449].

When the client is an agent that speaks the Agent Transfer Protocol [AGTP], three of those pieces are already present on every request. The Agent-ID header names the client. The Request-Signature header proves that the sender holds the client's key. The signed Attribution-Record on every response records what was asked and what was answered. [AGTP-COMPOSITION] already specifies how an OAuth access token rides on an AGTP request to a resource server. It leaves open how the agent obtains that token.

This document fills that gap. It follows the position that OAuth sign-in has two valid carriers. It can stay on HTTPS, unchanged, with the resulting token carried on AGTP. Or the authorization server can be an agent, and the back-channel exchanges of OAuth can be AGTP method invocations. A deployment MAY use either, and an authorization server MAY offer both at once.

One part of OAuth stays where it is in every case. A resource owner who is a person authenticates to the authorization server and consents in a browser. That exchange is between a person and a web page, and it remains on HTTPS. Section 5.3 states the one bounded case in which consent can be carried on AGTP.

1.1. Terminology

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

This document uses the terms of [RFC6749] (resource owner, client, authorization server, resource server, access token, refresh token, grant) and of [AGTP] (Agent-ID, Identity Document, Authority-Scope, Request-Signature, Attribution-Record, Delegation-Chain). Two terms are specific to this document:

Authorization agent:

An OAuth authorization server that holds an AGTP identity and accepts the methods and paths of Section 3.

Agent-bound token:

An access or refresh token that carries the confirmation member of Section 4 and is usable only on requests signed by the Agent-ID it names.

1.2. Overview

 Client agent          AGTP                     Authorization agent
              ============================>
              DISCOVER /oauth                   metadata
              EXECUTE  /oauth/authorization     pushed or device request
              EXECUTE  /oauth/token             grant -> bound token
              <============================
              NOTIFY   /oauth/authorization     user decision reached

 Resource     HTTPS (unchanged)                 Authorization agent,
 owner        <-------------------------->      browser pages
              authenticate and consent

 Client agent          AGTP                     Resource server
              ============================>
              any method, Authorization:
              AGTP <token>, Request-Signature

2. Roles

2.1. The client is the agent

The OAuth client is an AGTP agent. Its client_id is its canonical Agent-ID, and its Identity Document [AGTP-IDDOC] takes the place of client registration metadata. An authorization agent resolves the document to learn the client's name, owner, declared Authority-Scope, and current signing key. Redirect URIs, where a flow uses them (Section 5.1), are declared in an oauth member of the Identity Document as redirect_uris.

No client secret exists and none is issued. An authorization agent keeps its own policy on which Agent-IDs it serves: an allowlist, a required trust tier, or a required owner.

2.2. Client authentication

The Request-Signature of [AGTP] is the client authentication. It is a compact JWS [RFC7515] over the method, path, Agent-ID, Authority-Scope, Delegation-Chain digest, body digest, timestamp, and nonce, verified against the key in the client's Identity Document. An authorization agent MUST verify it on every request of Section 3 except metadata retrieval, and MUST reject a request that carries client_secret, client_assertion, or client_assertion_type in its body with 422. A client is therefore authenticated on every exchange, this profile has no public clients, and the body of every token request is covered by the client's signature.

2.3. The authorization server is an agent

An authorization agent has an Agent-ID, an Identity Document, and a Server-ID that it returns on every response. Its OAuth issuer identifier [RFC8414] remains an HTTPS URL, since tokens it issues may be validated by parties that never speak AGTP. The binding between issuer and agent is stated in both places: the Identity Document carries oauth.issuer, and the issuer's HTTPS metadata document carries agtp_agent_id. A client MUST confirm that each names the other before it sends a grant to the agent.

3. Endpoint Mapping

Every exchange uses a floor method of [AGTP]. No new method is defined.

Table 1: OAuth exchanges and their AGTP carriers
OAuth exchange AGTP method and path Authority-Scope
Server metadata [RFC8414] DISCOVER /oauth none
Signing keys (jwks_uri) DISCOVER /oauth/keys none
Pushed authorization request [RFC9126] EXECUTE /oauth/authorization, action push oauth:authorization:request
Device authorization [RFC8628] EXECUTE /oauth/authorization, action device oauth:authorization:request
Token request, every grant EXECUTE /oauth/token, action issue oauth:token:issue
Revocation [RFC7009] EXECUTE /oauth/token, action revoke oauth:token:revoke
Introspection [RFC7662] QUERY /oauth/introspection oauth:token:introspect
Decision reached (redirect or polling in HTTP) NOTIFY /oauth/authorization from the authorization agent n/a
Resource owner authentication and consent HTTPS, unchanged n/a

OAuth request parameters, which HTTP carries as form fields, travel as members of a JSON object in the payload of EXECUTE or the parameters of QUERY, with payload_type set to application/vnd.oauth+json. Parameter names and values are those of the OAuth specifications. OAuth response parameters are returned as the result member of the AGTP response envelope.

The lifecycle method REVOKE of [AGTP] retires an Agent-ID. It has no part in token revocation, which is the revoke action above.

3.1. Metadata

DISCOVER /oauth returns the authorization server metadata object of [RFC8414] with these additions:

agtp_agent_id:

The authorization agent's canonical Agent-ID.

agtp_endpoint:

The agtp:// URI at which the paths of this section are served.

agtp_token_binding_supported:

true when the agent issues agent-bound tokens (Section 4).

agtp_notify_supported:

true when the agent sends the NOTIFY of Section 5.2.

The HTTP endpoint members (token_endpoint and the others) remain present when the server also serves HTTPS. DISCOVER /oauth MAY be served to anonymous requests. A server that lists its inventory through DISCOVER / per [AGTP-METHODS] includes /oauth in the directory.

A resource server that requires OAuth authorization states so in its own DISCOVER /oauth response, which carries the protected resource metadata of [RFC9728]: its resource identifier, the authorization_servers it accepts, and for each the agtp_agent_id where one exists.

3.2. Token requests

The client sends EXECUTE /oauth/token with action issue. The payload carries grant_type and the parameters of that grant:

Table 2: Grants over AGTP
Grant Parameters in payload Notes
authorization_code code, code_verifier, redirect_uri when one was used Section 5.1
urn:ietf:params:oauth:grant-type:device_code device_code Section 5.2
refresh_token refresh_token, optional scope Rotation per [RFC9700]
client_credentials optional scope, resource The agent acts for itself
urn:ietf:params:oauth:grant-type:token-exchange parameters of [RFC8693] Section 6

client_id is omitted; the Agent-ID header supplies it. A payload that carries a client_id different from the header MUST be rejected with 422. The resource parameter [RFC8707] keeps its meaning and MAY name an agtp:// URI.

A successful response is 200 with the token response of [RFC6749] as result. EXECUTE on this path is unsafe and is ineligible for early data on any binding of [AGTP-BINDINGS]. A client SHOULD send idempotency_key; an authorization agent that receives a repeated key within the signature acceptance window returns the original response and issues nothing new.

The client_credentials grant needs no further credential. The request signature identifies the agent, and the authorization agent issues a token for the scopes its policy grants that Agent-ID.

3.3. Revocation and introspection

EXECUTE /oauth/token with action revoke carries token and the optional token_type_hint, and returns 200 for a known token and for an unknown one alike, as [RFC7009] requires. An authorization agent MUST accept revocation of a token only from the Agent-ID the token is bound to, or from an agent its policy names.

QUERY /oauth/introspection is sent by a resource server that holds an Agent-ID. The token travels in the body, and the response is the introspection response of [RFC7662]. QUERY is safe and idempotent, and is eligible for early data on some bindings; a resource server MUST NOT send an introspection request as early data, since the body holds a credential.

4. Agent-Bound Tokens

4.1. Confirmation

An authorization agent that issues a token in answer to a request of Section 3.2 binds the token to the requesting agent. For a JWT access token the binding is a confirmation claim [RFC7800]:

"cnf": { "agtp_aid": "<canonical Agent-ID, 64 hex>" }

For an opaque token the binding is held by the authorization agent and returned as the same cnf member in the introspection response. The token response carries token_type set to AGTP.

The binding names the Agent-ID and no key. An Agent-ID is stable across renewal of the agent's signing key [AGTP], so a token outlives a key rotation without reissue. The key in force at the time of a request is the one in the agent's Identity Document.

Refresh tokens are bound in the same way. A refresh request signed by any other Agent-ID MUST be rejected, and SHOULD cause the authorization agent to revoke the token family, as [RFC9700] recommends for a replayed refresh token.

4.2. Presentation

A client presents an agent-bound token on an AGTP request as:

Authorization: AGTP <token>

The header is the Authorization header that [AGTP-COMPOSITION] specifies for external credentials, with the scheme AGTP in place of Bearer. A resource server MUST:

  1. Verify the Request-Signature of the request per [AGTP].

  2. Validate the token as it would a bearer token.

  3. Confirm that cnf.agtp_aid equals the request's Agent-ID.

  4. Reject the request with 401 and reason oauth-invalid when any check fails.

The request signature is the proof of possession. No DPoP header is sent and no separate proof is constructed. A resource server MUST NOT accept a token that carries cnf.agtp_aid under the Bearer scheme, on AGTP or on HTTPS.

On success the resource server lifts the configured claim into the Attribution-Record as principal_id per [AGTP-COMPOSITION] and [AGTP-IDENTIFIERS]. The token itself MUST NOT appear in the record.

4.3. DPoP-bound tokens

A token issued over HTTPS with a DPoP binding carries cnf.jkt, the thumbprint of the DPoP key [RFC9449]. A client MAY use its AGTP signing key as its DPoP key. A resource server reached over AGTP MAY then accept that token under the AGTP scheme when cnf.jkt equals the thumbprint of the key in the Identity Document of the request's Agent-ID. The request signature is made with that same key and serves as the proof. Such a token stops being usable on AGTP when the agent's key is renewed, and the client then obtains a new one. This is the answer this document gives to the open issue on DPoP recorded in [POPPY-AGTP].

5. Resource Owner Authorization

5.1. Authorization code flow

The client sends the authorization request as a pushed authorization request: EXECUTE /oauth/authorization with action push and the authorization parameters (response_type, scope, state, code_challenge, code_challenge_method, resource, and redirect_uri) as payload. The response carries request_uri and expires_in per [RFC9126]. Since the request is signed by the client and delivered directly to the authorization agent, its contents cannot be altered in the browser.

The client then directs the resource owner's browser to the authorization agent's HTTPS authorization endpoint with client_id and request_uri. The resource owner authenticates and consents there. The authorization agent redirects the browser to the registered redirect_uri with code and iss. The client redeems the code with a token request (Section 3.2), including the PKCE code_verifier [RFC7636]. PKCE is REQUIRED.

5.2. Decoupled flow

An agent often has no browser on the device where the resource owner is. The device authorization grant [RFC8628] covers that case, and over AGTP it loses its polling loop.

The client sends EXECUTE /oauth/authorization with action device and its scope. The response carries device_code, user_code, verification_uri, verification_uri_complete, and expires_in. The client shows the URI and code to the resource owner by whatever means it has. The resource owner opens the URI in any browser, authenticates, and consents over HTTPS.

When the resource owner has decided, an authorization agent that advertises agtp_notify_supported sends the client NOTIFY /oauth/authorization with content holding the device_code hash and decision set to approved or denied. The NOTIFY carries no token and no code. The client then sends one token request with the device_code. A client that receives no NOTIFY MAY poll with token requests at the interval the response gave, as [RFC8628] describes; the answer while the decision is pending is 202 with oauth_error set to authorization_pending.

6. Delegation

An agent-bound token is usable by one Agent-ID. When that agent delegates a task with DELEGATE, the sub-agent cannot present the token. Two paths exist.

The delegating agent keeps the token and makes the resource requests itself. This is the default and needs no further mechanism.

Or the sub-agent obtains its own token by token exchange [RFC8693]. It sends a token request with the exchange grant, the delegator's token as subject_token, and the Delegation-Chain header of [AGTP] on the request. The authorization agent verifies each hop of the chain, confirms that the chain originates at the Agent-ID the subject token is bound to, and confirms that the requested scope is within both the subject token's scope and the scope of the delegation. It issues a token bound to the sub-agent that carries an act claim naming the delegating Agent-ID. A broken chain is answered with 551.

7. Scopes

Two vocabularies apply, as in [AGTP-COMPOSITION]. Authority-Scope states what the agent has the capacity to do. OAuth scope states what a resource owner or policy granted. This document adds the oauth Authority-Scope domain with the tokens of Section 3, which govern whether an agent may take part in OAuth exchanges at all. An authorization agent evaluates Authority-Scope first, from headers. A resource server evaluates Authority-Scope and then the token's OAuth scope, and a request MUST satisfy both.

8. Error Mapping

An OAuth error is returned as an AGTP status with the OAuth error object (error, error_description, error_uri) carried in the body as oauth_error.

Table 3: Error translation at the authorization agent
OAuth error HTTP status AGTP status
invalid_request 400 422
invalid_client 401 401, reason possession-unproven
invalid_grant 400 422
unauthorized_client 400 403
unsupported_grant_type 400 422
invalid_scope 400 422
access_denied 400 403
authorization_pending 400 202
slow_down 400 429
expired_token 400 422
invalid_target 400 422
Authority-Scope lacks the oauth token required n/a 455
Delegation-Chain fails verification n/a 551

At a resource server the reasons of [AGTP-COMPOSITION] apply: 401 with oauth-required when no token was sent, and 401 with oauth-invalid when the token or its binding fails. Insufficient OAuth scope is 455, with the scopes needed named in the body. A response of oauth-required SHOULD carry the resource identifier and the accepted authorization servers, so that the client can begin a flow without a second request.

9. What Moves and What Stays

Table 4: Carrier of each part of OAuth
Part of OAuth Carrier in this profile
Client registration Agent Identity Document
Client authentication Request-Signature
Server metadata, keys DISCOVER on the authorization agent; HTTPS also valid
Pushed and device authorization requests EXECUTE
Token issuance, refresh, exchange EXECUTE
Revocation, introspection EXECUTE, QUERY
Proof of possession at the resource Request-Signature with an agent-bound token
Notice that the owner decided NOTIFY, in place of polling
Record of issuance and use Attribution-Record
Resource owner authentication HTTPS, unchanged
Initial consent HTTPS, unchanged
Later consent for a bound account HTTPS, or ESCALATE and CONFIRM under Section 5.3
Token format and claims Unchanged, with cnf.agtp_aid added

10. Security Considerations

The security considerations of [RFC6749], [RFC9700], [AGTP], and [AGTP-COMPOSITION] apply.

Scheme downgrade:

An agent-bound token presented as a bearer token would lose its binding. The AGTP token type and scheme, and the rule that a token carrying cnf.agtp_aid is refused under Bearer, exist to prevent this. A resource server on HTTPS that ignores cnf remains exposed, and an authorization agent SHOULD issue agent-bound tokens only for resources known to enforce the binding.

Issuer and agent binding:

A party could publish an Identity Document that claims another server's issuer. The two-way check of Section 2 defeats this. A client that checks one direction alone can be led to send grants to the wrong agent.

Decoupled approval:

The decoupled flow carries the remote phishing risk of the device authorization grant: a hostile client starts a flow and persuades a person to approve it. The mitigations of [RFC8628] apply. The consent page MUST name the requesting agent from its verified Identity Document, including its owner, since under AGTP that identity is verified and under plain OAuth the client name is self-asserted.

Agent-asserted consent:

Section 5.3 confines consent over AGTP to accounts already bound to the answering agent. An authorization agent that accepts a CONFIRM as proof of a person's identity or of a first grant has replaced user authentication with an agent's claim.

Secrets in records and in model context:

Tokens, codes, and device codes MUST NOT appear in an Attribution-Record. An authorization agent records the grant type, the scopes, the bound Agent-ID, and the token identifier (jti) or a hash. Agents built on language models MUST keep tokens out of model context.

Key compromise:

A stolen agent signing key lets its holder use every token bound to that Agent-ID until the key is replaced in the Identity Document. Replacement takes effect at the next signature check, with no token reissue. A DPoP-bound token used under Section 4 is bound to the key and stops working at the same moment.

11. IANA Considerations

This document requests the following registrations.

In the "JWT Confirmation Methods" registry: the confirmation method agtp_aid, described as the canonical AGTP Agent-ID of the party entitled to present the token, with this document as the reference.

In the "OAuth Access Token Types" registry: the token type AGTP, with the HTTP authentication scheme AGTP and this document as the reference.

In the "OAuth Authorization Server Metadata" registry: the metadata names agtp_agent_id, agtp_endpoint, agtp_token_binding_supported, and agtp_notify_supported.

If the Reserved Authority-Scope Domains table of [AGTP] becomes an IANA registry, the oauth domain with the tokens of Section 3 is to be registered there by a future revision.

12. Open Issues

  1. Status for a missing credential. [AGTP-COMPOSITION] specifies 401 with oauth-required. [AGTP] version 10 also describes 262 with credentials-missing for a server that requires an OAuth-scoped token. This document follows [AGTP-COMPOSITION]. The two texts need to be aligned.

  2. Method choice. This revision uses floor methods only, with EXECUTE and an action for token issuance and revocation. A later revision may adopt intent methods from the catalog of [AGTP-METHODS] once the fitting verbs are confirmed.

  3. The AGTP authentication scheme extends the Authorization header text of [AGTP-COMPOSITION], which lists Bearer and passes other schemes to the validator. That document needs a matching entry.

  4. OpenID Connect ID tokens, client-initiated backchannel authentication, and rich authorization requests are unmapped.

  5. [MCP-AGTP] and [POPPY-AGTP] predate this document. Their next revisions are to reference it for token acquisition and for the DPoP question.

  6. No implementation of this document exists at the time of writing.

13. References

13.1. Normative References

[AGTP]
Hood, C., "Agent Transfer Protocol (AGTP)", Work in Progress, Internet-Draft, draft-hood-independent-agtp-10, , <https://datatracker.ietf.org/doc/html/draft-hood-independent-agtp-10>.
[AGTP-COMPOSITION]
Hood, C., "AGTP Composition Profiles", Work in Progress, Internet-Draft, draft-hood-agtp-composition-02, , <https://datatracker.ietf.org/doc/html/draft-hood-agtp-composition-02>.
[AGTP-IDENTIFIERS]
Hood, C., "AGTP Identifier Stack and Attribution-Record", Work in Progress, Internet-Draft, draft-hood-agtp-identifiers-03, , <https://datatracker.ietf.org/doc/html/draft-hood-agtp-identifiers-03>.
[AGTP-METHODS]
Hood, C., "AGTP Methods (AGTP Verbs): Method Vocabulary, Path Grammar, and Endpoints", Work in Progress, Internet-Draft, draft-hood-agtp-methods-00, , <https://datatracker.ietf.org/doc/html/draft-hood-agtp-methods-00>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC6749]
Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", RFC 6749, DOI 10.17487/RFC6749, , <https://www.rfc-editor.org/rfc/rfc6749>.
[RFC7515]
Jones, M., Bradley, J., and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, , <https://www.rfc-editor.org/rfc/rfc7515>.
[RFC7800]
Jones, M., Bradley, J., and H. Tschofenig, "Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)", RFC 7800, DOI 10.17487/RFC7800, , <https://www.rfc-editor.org/rfc/rfc7800>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[RFC8414]
Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 Authorization Server Metadata", RFC 8414, DOI 10.17487/RFC8414, , <https://www.rfc-editor.org/rfc/rfc8414>.

13.2. Informative References

[AGTP-BINDINGS]
Hood, C., "AGTP Transport Bindings", Work in Progress, Internet-Draft, draft-hood-agtp-bindings-01, , <https://datatracker.ietf.org/doc/html/draft-hood-agtp-bindings-01>.
[AGTP-IDDOC]
Hood, C., "AGTP Agent Identity Document", Work in Progress, Internet-Draft, draft-hood-agtp-identity-document-00, , <https://datatracker.ietf.org/doc/html/draft-hood-agtp-identity-document-00>.
[MCP-AGTP]
Hood, C., "Model Context Protocol over the Agent Transfer Protocol", Work in Progress, Internet-Draft, draft-hood-agentproto-mcp-over-agtp-00, , <https://datatracker.ietf.org/doc/html/draft-hood-agentproto-mcp-over-agtp-00>.
[POPPY-AGTP]
Hood, C., "Personal Agent Protocol (Poppy) over the Agent Transfer Protocol", Work in Progress, Internet-Draft, draft-hood-agentproto-poppy-over-agtp-00, , <https://datatracker.ietf.org/doc/html/draft-hood-agentproto-poppy-over-agtp-00>.
[RFC6750]
Jones, M. and D. Hardt, "The OAuth 2.0 Authorization Framework: Bearer Token Usage", RFC 6750, DOI 10.17487/RFC6750, , <https://www.rfc-editor.org/rfc/rfc6750>.
[RFC7009]
Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth 2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009, , <https://www.rfc-editor.org/rfc/rfc7009>.
[RFC7523]
Jones, M., Campbell, B., and C. Mortimore, "JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants", RFC 7523, DOI 10.17487/RFC7523, , <https://www.rfc-editor.org/rfc/rfc7523>.
[RFC7636]
Sakimura, N., Ed., Bradley, J., and N. Agarwal, "Proof Key for Code Exchange by OAuth Public Clients", RFC 7636, DOI 10.17487/RFC7636, , <https://www.rfc-editor.org/rfc/rfc7636>.
[RFC7662]
Richer, J., Ed., "OAuth 2.0 Token Introspection", RFC 7662, DOI 10.17487/RFC7662, , <https://www.rfc-editor.org/rfc/rfc7662>.
[RFC8628]
Denniss, W., Bradley, J., Jones, M., and H. Tschofenig, "OAuth 2.0 Device Authorization Grant", RFC 8628, DOI 10.17487/RFC8628, , <https://www.rfc-editor.org/rfc/rfc8628>.
[RFC8693]
Jones, M., Nadalin, A., Campbell, B., Ed., Bradley, J., and C. Mortimore, "OAuth 2.0 Token Exchange", RFC 8693, DOI 10.17487/RFC8693, , <https://www.rfc-editor.org/rfc/rfc8693>.
[RFC8707]
Campbell, B., Bradley, J., and H. Tschofenig, "Resource Indicators for OAuth 2.0", RFC 8707, DOI 10.17487/RFC8707, , <https://www.rfc-editor.org/rfc/rfc8707>.
[RFC9126]
Lodderstedt, T., Campbell, B., Sakimura, N., Tonge, D., and F. Skokan, "OAuth 2.0 Pushed Authorization Requests", RFC 9126, DOI 10.17487/RFC9126, , <https://www.rfc-editor.org/rfc/rfc9126>.
[RFC9449]
Fett, D., Campbell, B., Bradley, J., Lodderstedt, T., Jones, M., and D. Waite, "OAuth 2.0 Demonstrating Proof of Possession (DPoP)", RFC 9449, DOI 10.17487/RFC9449, , <https://www.rfc-editor.org/rfc/rfc9449>.
[RFC9700]
Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, "Best Current Practice for OAuth 2.0 Security", BCP 240, RFC 9700, DOI 10.17487/RFC9700, , <https://www.rfc-editor.org/rfc/rfc9700>.
[RFC9728]
Jones, M.B., Hunt, P., and A. Parecki, "OAuth 2.0 Protected Resource Metadata", RFC 9728, DOI 10.17487/RFC9728, , <https://www.rfc-editor.org/rfc/rfc9728>.

Appendix A. Wire Examples

A.1. Metadata retrieval

AGTP/1.0 DISCOVER /oauth
Content-Type: application/vnd.agtp+json

{"method": "DISCOVER", "parameters": {}}

AGTP/1.0 200 OK
Server-ID: auth.shop.example
Response-ID: 01JD20...
Audit-ID: 5a1f...77c2
Attribution-Record: <compact JWS>
Content-Type: application/vnd.agtp+json

{"status": 200,
 "result": {
   "issuer": "https://auth.shop.example",
   "agtp_agent_id": "c41d...9e02",
   "agtp_endpoint": "agtp://auth.shop.example:4480",
   "grant_types_supported": ["authorization_code", "refresh_token",
     "urn:ietf:params:oauth:grant-type:device_code"],
   "scopes_supported": ["orders.read", "orders.write"],
   "agtp_token_binding_supported": true,
   "agtp_notify_supported": true}}

A.2. Decoupled authorization

AGTP/1.0 EXECUTE /oauth/authorization
Agent-ID: 7f3a9c2d...e41b
Authority-Scope: oauth:authorization:request
Request-Signature: <compact JWS>
Content-Type: application/vnd.agtp+json

{"method": "EXECUTE",
 "parameters": {"action": "device",
   "payload_type": "application/vnd.oauth+json",
   "payload": {"scope": "orders.read orders.write"}}}

AGTP/1.0 200 OK
Server-ID: auth.shop.example
Audit-ID: 81c3...0b9d
Attribution-Record: <compact JWS>
Content-Type: application/vnd.agtp+json

{"status": 200,
 "result": {"device_code": "<device code>", "user_code": "WDJB-MJHT",
   "verification_uri": "https://auth.shop.example/device",
   "expires_in": 900, "interval": 5}}

The resource owner approves in a browser. The authorization agent then tells the client:

AGTP/1.0 NOTIFY /oauth/authorization
Agent-ID: c41d...9e02
Request-Signature: <compact JWS>
Content-Type: application/vnd.agtp+json

{"method": "NOTIFY",
 "parameters": {"recipient": "7f3a9c2d...e41b",
   "urgency": "informational",
   "content": {"device_code_hash": "<base64url SHA-256>",
               "decision": "approved"}}}

A.3. Token request

AGTP/1.0 EXECUTE /oauth/token
Agent-ID: 7f3a9c2d...e41b
Authority-Scope: oauth:token:issue
Request-Signature: <compact JWS>
Content-Type: application/vnd.agtp+json

{"method": "EXECUTE",
 "parameters": {"action": "issue",
   "payload_type": "application/vnd.oauth+json",
   "idempotency_key": "01JD21...",
   "payload": {
     "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
     "device_code": "<device code>"}}}

AGTP/1.0 200 OK
Server-ID: auth.shop.example
Audit-ID: 2e90...d4a1
Attribution-Record: <compact JWS>
Content-Type: application/vnd.agtp+json

{"status": 200,
 "result": {"access_token": "<JWT with cnf.agtp_aid>",
   "token_type": "AGTP", "expires_in": 600,
   "refresh_token": "<refresh token>",
   "scope": "orders.read orders.write"}}

A.4. Use at a resource server

AGTP/1.0 QUERY /orders
Agent-ID: 7f3a9c2d...e41b
Authority-Scope: orders:query
Authorization: AGTP <JWT with cnf.agtp_aid>
Request-Signature: <compact JWS>
Content-Type: application/vnd.agtp+json

{"method": "QUERY", "parameters": {"intent": "open orders"}}

The resource server verifies the signature, validates the token, and confirms that cnf.agtp_aid is 7f3a9c2d...e41b. The same token sent from any other Agent-ID is refused with 401 and reason oauth-invalid.

Appendix B. Acknowledgments

This document rests on the work of the OAuth working group. It changes no grant and defines no new flow; it moves existing exchanges to a carrier that already identifies the client.

Author's Address

Chris Hood
Nomotic, Inc.