Skip to content

Document FakeAuthenticator's deliberate leniencies#37

Merged
JanTvrdik merged 1 commit into
masterfrom
document-fake-authenticator-leniencies
Jul 13, 2026
Merged

Document FakeAuthenticator's deliberate leniencies#37
JanTvrdik merged 1 commit into
masterfrom
document-fake-authenticator-leniencies

Conversation

@JanTvrdik

Copy link
Copy Markdown
Member

Follow-up to the pre-1.0 review (item E): FakeAuthenticator has two deliberate simplifications a test author should know their tests do not cover, and neither was documented:

  • it takes the RP ID from the options at face value instead of validating it against the origin, so a mismatched rpId/origins configuration passes in tests and only fails in a real browser;
  • it always reports itself as a platform authenticator (authenticatorAttachment: "platform", transports: ["internal"]).

Docs-only: a paragraph on the class docblock plus a sentence on createPasskey(). (The third previously-flagged leniency — backedUp coupling BE+BS — was already documented on the constructor param.)

Co-Authored-By: Claude Code

Copilot AI review requested due to automatic review settings July 13, 2026 17:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents two intentional limitations of FakeAuthenticator so test authors understand what their tests may not cover compared to real browser/WebAuthn behavior.

Changes:

  • Expanded FakeAuthenticator class docblock to describe the two deliberate simplifications (RP ID validation leniency; always “platform”/internal attachment).
  • Added a clarifying note to createPasskey() docs about RP ID validation not being enforced like a real client.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Testing/FakeAuthenticator.php
Comment thread src/Testing/FakeAuthenticator.php
@JanTvrdik
JanTvrdik merged commit d22e2d9 into master Jul 13, 2026
5 checks passed
@JanTvrdik
JanTvrdik deleted the document-fake-authenticator-leniencies branch July 13, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants