Skip to main content

Sign-in and OAuth tokens coverage

Direct and Device Sign-In, refresh and access tokens, and scopes (§4, §4.2 to §4.8). Upstream: personalagentprotocol.org/docs/spec.

34 entries: 27 implemented, 6 partial, 1 open. Each row is one atomic statement of the upstream text, with the SDK symbols that implement it (Python; TypeScript mirrors them), the tests and shared conformance cases that show it, and its status.

IDSectionLevelRoleRequirementSDK symbolTestsStatus
PAP-4-01§4SHOULDcompanyDirect Sign-In (4.2) is the preferred sign-in type. A Company that offers sign-in SHOULD offer Direct Sign-In.CompanyConfig
CompanyService.oauth_metadata
test_draft_04.py::test_the_reference_company_offers_direct_sign_in
lifecycle.direct-sign-in-offered
implemented
PAP-4-02§4SHOULDpersonal-agentA Personal Agent SHOULD use Direct Sign-In when the Company offers it.DiscoveredCompany.preferred_sign_in
DiscoveredCompany.sign_in_types
ConformanceContext.sign_in
test_draft_04.py::test_direct_sign_in_is_preferred_when_offered
test_draft_04.py::test_the_discovery_summary_lists_sign_in_types_direct_first
implemented
PAP-4.2-01§4.2MUSTcompanyredirect_uri MUST exactly match an entry in the Personal Agent's redirect_uris (4.1), except for the port of a loopback redirect URI, as RFC 8252 §7.3 describes.CompanyService._authorize
CompanyService._code_grant
redirect_uri_matches
test_direct_and_api.py::test_the_consent_page_is_never_framed_and_bad_redirects_are_not_followed
test_auth.py::test_a_loopback_redirect_matches_with_any_port
implemented
PAP-4.2-02§4.2MUSTpersonal-agentThe Personal Agent MUST check that iss exactly matches the issuer of the Company it started sign-in with.validate_direct_sign_in_callbacktest_auth.py::test_validates_callback_and_keeps_the_code_secret
test_auth.py::test_rejects_invalid_callbacks
implemented
PAP-4.3-01§4.3MUSTbothCompanies that offer Device Sign-In and Personal Agents that use it MUST follow the best practices in RFC 10027 (BCP 247) §2.verification_host_allowed
CompanyService.approve_device
test_device.py::test_a_device_link_is_shown_only_on_the_issuer_or_its_domainspartial: The SDK applies the mitigations the protocol states (the link's host, the company named, codes bound to a key, no approval on opening) and chooses Direct Sign-In when the Company offers it (PAP-4-02); the risk assessment RFC 10027 asks for is the deployment's.
PAP-4.3-02§4.3MUSTpersonal-agentBefore showing them, the Personal Agent MUST check that the link's host is the host of the Company's issuer or organization.domain (3.1), or a subdomain of eitherverification_host_allowed
DeviceSignInClient.begin
CompanyConfig
test_device.py::test_a_device_link_is_shown_only_on_the_issuer_or_its_domains
test_hosted_pages.py::test_hosted_page_templates_are_checked
test_device.py::test_another_protected_resource_of_the_issuer_does_not_make_a_link_showable
implemented
PAP-4.3-03§4.3MUSTpersonal-agentand MUST show the Company's organization.name and domain with them.DeviceSignInStart
PapSignIn
test_device.py::test_a_device_link_is_shown_only_on_the_issuer_or_its_domains
test_ui.py::test_a_device_or_mediated_sign_in_names_its_company
test_ui.py::test_a_device_answer_is_a_display_whose_code_only_the_page_sees
implemented
PAP-4.3-04§4.3MUST NOTcompanyOpening the link MUST NOT approve the request by itself.CompanyService.approve_devicetest_draft_03.py::test_a_device_code_works_only_for_the_agent_it_was_issued_toimplemented
PAP-4.2-20§4.2MUSTbothCompanies that offer Direct Sign-In, and Personal Agents that open the authorization URL on a device other than the one the User is using, MUST follow the best practices in RFC 10027 (BCP 247) §2, as for Device Sign-In (4.3).DirectSignInClient.begin
connect_heading
connect_caution
test_published_04.py::test_a_direct_sign_in_opened_on_another_device_is_short_lived
test_published_04.py::test_the_companys_page_names_the_agent_and_says_when_to_continue
partial: The SDK keeps a cross-device request short-lived (cross_device) and the reference company's page names the agent and says when to continue; limiting the scopes asked for, and the risk assessment RFC 10027 asks for, are the host's and the deployment's.
PAP-4.2-21§4.2SHOULDpersonal-agentA Personal Agent SHOULD receive the redirect only on the device that opened the authorization URL when it can, at a loopback redirect URI or in its own app signed in as the User who started the sign-in (RFC 8252).DirectSignInClient.completetest_published_04.py::test_a_redirect_that_arrives_for_another_user_gets_no_tokenspartial: Where the redirect is received is the host's choice of redirect_uri; the SDK refuses a redirect the host says arrived for another User than the one who started (completed_by).
PAP-4.4-01§4.4MUSTpersonal-agentA Company MAY return a new refresh token. The Personal Agent then MUST use the new one from then on. If the response omits refresh_token, the Personal Agent keeps using the one it has, as RFC 6749 §6 describes.RefreshTokenClient.refreshtest_accounts.py::test_refresh_gets_an_access_token_and_rotates_the_stored_token
test_accounts.py::test_concurrent_refreshes_rotate_one_after_the_other
test_conformance.py::test_python_agent_python_company_over_tls
test_accounts.py::test_a_refresh_that_omits_the_refresh_token_keeps_the_one_held
lifecycle.rotated-token
lifecycle.sign-out-revokes-every-refresh-token
implemented
PAP-4.5-01§4.5SHOULDpersonal-agentPersonal Agents SHOULD support DPoP, because a Personal Agent that doesn't can't sign in at a Company that requires it.SessionClient.token_request
session_headers
JoseDpopProver
test_dpop.py::test_a_token_request_proves_when_the_issuer_lists_es256
test_dpop.py::test_a_token_request_sends_no_proof_to_a_company_that_does_not_list_es256
test_sessions.py::test_a_dpop_answer_with_no_proof_sent_is_refused
test_conformance.py::test_python_agent_python_company_binding_with_dpop_over_tls
dpop.proof-only-when-listed
dpop.dpop-answer-needs-a-proof
dpop.proof-shape
dpop.token-bound-and-used
dpop.refresh-after-the-key-is-lost
implemented
PAP-4.5-02§4.5MUSTpersonal-agentThe Personal Agent MUST use each DPoP key for one User ID only, for the same reason as delegated keys (5.2).InMemoryDpopKeys
JoseDpopProver
proves_with_dpop
FileDpopKeys
test_dpop.py::test_one_key_per_user_id_and_a_new_jti_for_each_proof
test_dpop.py::test_each_user_id_signs_in_with_its_own_dpop_key
test_dpop.py::test_a_mediated_sign_in_binds_its_token
implemented
PAP-4.7-01§4.7SHOULDcompanyThe Company SHOULD describe each scope it offers Personal Agents, so the Personal Agent can choose the ones a task needs: in the scopes of an OAuth 2.0 security scheme in an OpenAPI description it lists (section 7), or otherwise in auth.scopes.CompanyConfig
CompanyService.discovery_document
test_draft_03.py::test_scopes_are_the_companys_described_and_never_poppy
test_security_review.py::test_finding_5_operations_without_a_write_scope_is_a_configuration_error
test_fixtures.py::test_local_fixture_case
protocol.auth-scopes-optional
implemented
PAP-4.7-08§4.7SHOULDcompanyThe Company SHOULD list the scopes it supports in scopes_supported in its OAuth server metadata (3.2).CompanyService.oauth_metadatatest_draft_03.py::test_scopes_are_the_companys_described_and_never_poppyimplemented
PAP-4.7-02§4.7MUSTcompanyA Company MUST include both fields in each entry.CompanyConfig
ScopeHint
test_draft_03.py::test_an_unknown_changes_hint_is_read_as_irreversibleimplemented
PAP-4.7-03§4.7MUSTpersonal-agentA Personal Agent MUST ignore fields it doesn't recognize, and treat a changes value it doesn't recognize as irreversible, so later versions can add both.ScopeHint.effective_changestest_draft_03.py::test_an_unknown_changes_hint_is_read_as_irreversibleimplemented
PAP-4.7-04§4.7MUST NOTcompanyThe Company MUST NOT grant scopes beyond those requested.CompanyService.approve_device
CompanyService.approve_authorization
CompanyService._refresh_grant
CompanyService._mediated_grant
test_direct_and_api.py::test_partial_consent_and_a_write_that_was_not_granted
test_conformance.py::test_python_agent_python_company_over_tls
lifecycle.sign-in-scopes
lifecycle.wider-scopes-refused
implemented
PAP-4.7-05§4.7MUSTpersonal-agentEach sign-in request MUST include scope, except where an extension continues an earlier request, as a space-separated string, following OAuth scope syntax._scopes
DeviceSignInClient.begin
MediatedSignInClient.sign_in
test_auth.py::test_builds_direct_sign_in_url_with_s256_pkce
test_conformance.py::test_python_agent_python_company_over_tls
lifecycle.sign-in-scopes
lifecycle.unknown-scope-refused
implemented
PAP-4.7-06§4.7SHOULDpersonal-agentA Personal Agent SHOULD request only the scopes the User's tasks need, following RFC 9700 §2.3._scopestest_cli_protocol.py::test_exit_codes_for_setup_input_refusals_and_usagepartial: The SDK requests exactly the scopes the host names; the CLI never chooses for the user and refuses to sign in without --scope.
PAP-4.7-07§4.7SHOULDpersonal-agentThe new refresh token replaces the old one, which the Personal Agent SHOULD revoke (4.6).RefreshTokenClient.revoke—open: No helper replaces and revokes the previous Account Token after a wider sign-in; the host calls revoke().
PAP10-4.2-01§4.2 (1.0)MUSTpersonal-agentUnless the Personal Agent receives the redirect only on the device that opened the authorization URL, as below, the authorization request MUST include prompt=consent (OpenID Connect Core §3.1.2.1).build_direct_sign_in_request
DirectSignInClient.begin
PROMPT_CONSENT
test_published_10.py::test_a_direct_sign_in_asks_for_consent_unless_the_redirect_stays_on_the_device
test_hosted_pages.py::test_authorize_redirects_to_the_hosted_consent_page_which_reads_the_request
implemented
PAP10-4.2-04§4.2 (1.0)SHOULDcompanyThe Company SHOULD support prompt=consent, whether or not it supports OpenID Connect, and show its consent page for a request that includes it, even when the account already granted every requested scope to the client_id (10.8).CompanyService._authorize
CompanyService.authorization_request
test_published_10.py::test_the_consent_page_lists_every_scope_and_marks_the_earlier_ones
test_hosted_pages.py::test_authorize_redirects_to_the_hosted_consent_page_which_reads_the_request
implemented
PAP10-4.2-02§4.2 (1.0)MUSTpersonal-agentA Company MAY require Pushed Authorization Requests (PAR, RFC 9126) by setting require_pushed_authorization_requests to true in its issuer's metadata (3.2). The Personal Agent then MUST send the authorization request's parameters to the pushed_authorization_request_endpoint with its client assertion, and open the authorization_endpoint with only client_id and the request_uri it gets back.DirectSignInClient.begin
DirectSignInClient._push
DirectSignInRequest.pushed_authorization_url
OAuthServerMetadata
CompanyService._pushed_request
CompanyConfig
test_published_10.py::test_a_company_offers_or_requires_par_and_the_agent_pushes
test_published_10.py::test_a_company_that_requires_par_takes_nothing_else
test_published_10.py::test_a_push_with_a_dpop_proof_binds_the_code_to_its_key
dpop.pushed-authorization-request
implemented
PAP10-4.2-03§4.2 (1.0)SHOULDpersonal-agentA Personal Agent SHOULD use PAR whenever the metadata lists the endpoint.DirectSignInClient.begin
ConformanceContext.sign_in
test_published_10.py::test_a_company_offers_or_requires_par_and_the_agent_pushes
dpop.pushed-authorization-request
partial: DirectSignInClient pushes whenever the host passes the issuer's pushed_authorization_request_endpoint, as the pap CLI and the conformance runner do; a host that calls it without the endpoint doesn't push.
PAP10-4.2-05§4.2 (1.0)SHOULDpersonal-agentWhen the Personal Agent sends the User a link to open later, such as on their phone, it SHOULD link to a page of its own that pushes the request when the User opens it and then redirects to the authorization_endpoint.DirectSignInClient.open_linktest_published_10.py::test_a_link_opened_later_goes_to_the_agents_page_which_pushes_thenpartial: begin(link_page=...) hands the browser the agent's own page and open_link pushes when it is opened; serving that page and redirecting is the host's.
PAP10-4.3-01§4.3 (1.0)SHOULDcompanyThe Company SHOULD show its consent page for every request, even when the account already granted every requested scope to the client_id (10.8).CompanyService.device_request
CompanyService.approve_device
test_published_10.py::test_every_device_sign_in_shows_its_page_with_the_earlier_scopes_markedimplemented
PAP10-4.4-01§4.4 (1.0)MUSTpersonal-agentA Personal Agent that sends a DPoP proof when it gets a refresh token (4.5) MUST send a proof from the same key with every refresh of that refresh token, and of the refresh tokens that replace it.InMemoryDpopKeys
JoseDpopProver
RefreshTokenClient.refresh
CompanyConfig
test_published_10.py::test_a_bound_refresh_token_refreshes_only_with_its_key
test_published_10.py::test_without_binding_a_refresh_with_a_new_key_still_works
dpop.refresh-bound-to-its-key
implemented
PAP10-4.5-01§4.5 (1.0)MUSTcompanyAfter a sign-in without resource, the Company MUST issue a token for any resource it offers Personal Agents, at refresh too.CompanyService._refresh_grant
CompanyService._resource
CompanyService._resource_allowed
ServiceTokens.token_for
test_published_10.py::test_a_service_left_out_is_invalid_target_and_used_signed_outimplemented
PAP10-4.5-02§4.5 (1.0)SHOULD NOTpersonal-agentThe Personal Agent SHOULD NOT include resource in the request that starts sign-in: if it does, the Company MAY limit the grant to the resources it names, as RFC 8707 §2.2 allows.build_direct_sign_in_request
DeviceSignInClient.begin
test_published_10.py::test_a_direct_sign_in_asks_for_consent_unless_the_redirect_stays_on_the_deviceimplemented
PAP11-4.4-01§4.4 (1.1)MUSTcompanyA Company whose issuer does MUST list offline_access in scopes_supported in the issuer's metadata (3.2).CompanyConfig.offline_access
CompanyService.oauth_metadata
test_draft_11.py::test_a_company_whose_refresh_tokens_need_offline_access
lifecycle.offline-access-kept-from-resources
implemented
PAP11-4.4-02§4.4 (1.1)MUSTpersonal-agentWhen the issuer's metadata lists it, the Personal Agent MUST include it in every sign-in request, and in scope when it asks for fewer scopes at refresh.request_scope
DirectSignInClient.begin
DeviceSignInClient.begin
MediatedSignInClient.sign_in
RefreshTokenClient.refresh
OAuthServerMetadata.lists_offline_access
test_draft_11.py::test_offline_access_is_requested_when_the_issuer_lists_it_and_never_granted
test_draft_11.py::test_a_company_whose_refresh_tokens_need_offline_access
test_draft_11.py::test_offline_access_in_a_pushed_request_a_mediated_sign_in_and_no_challenge
test_draft_11.py::test_offline_access_is_an_unknown_scope_where_refresh_tokens_need_none
implemented
PAP11-4.4-03§4.4 (1.1)SHOULD NOTcompanyResources SHOULD NOT list it in their protected resource metadata, and MUST NOT name it in a challenge (section 7) or an authorization event (8.11).CompanyService.domain_resource_metadata
CompanyService.protected_resource_metadata
test_draft_11.py::test_a_company_whose_refresh_tokens_need_offline_access
lifecycle.offline-access-kept-from-resources
implemented
PAP11-4.4-04§4.4 (1.1)MUST NOTcompanyResources SHOULD NOT list it in their protected resource metadata, and MUST NOT name it in a challenge (section 7) or an authorization event (8.11). A refresh token isn't something a resource requires.CompanyConfig.offered_scopestest_draft_11.py::test_offline_access_in_a_pushed_request_a_mediated_sign_in_and_no_challenge
lifecycle.offline-access-kept-from-resources
implemented

Conformance case IDs name protocol/fixtures/conformance cases; see the conformance report for their outcome in every language pairing.