Skip to content

feat: allow IdP to set NameID on sendAuthnResponse - #11

Merged
william-suppo merged 1 commit into
4.xfrom
feat/authn-response-name-id-format
Jul 7, 2026
Merged

feat: allow IdP to set NameID on sendAuthnResponse#11
william-suppo merged 1 commit into
4.xfrom
feat/authn-response-name-id-format

Conversation

@william-suppo

Copy link
Copy Markdown
Contributor

Summary

  • Closes Allow the IdP to set the NameID Format when sending an AuthnResponse #8. IdentityProviderWrapper::sendAuthnResponse() built the assertion's Subject/NameID without any value or format, so the IdP had no way to honor a requested NameIDPolicy end-to-end.
  • Adds an optional ?NameId $nameId = null parameter, reusing the same NameId value object already used by sendLogoutRequest() for consistency, and sets it on the Subject in both the plain- and encrypted-attribute assertion branches.

Test plan

  • composer test (73 tests, 185 assertions) — added can_send_authn_response_with_name_id covering the IdP→SP round trip
  • composer phpstan — no errors

sendAuthnResponse() built the assertion's Subject/NameID without any
value or format, leaving no way for the IdP to honor a requested
NameIDPolicy end-to-end. Adds an optional NameId parameter, consistent
with the object already used by sendLogoutRequest().

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@william-suppo william-suppo linked an issue Jul 7, 2026 that may be closed by this pull request
@william-suppo
william-suppo merged commit 734b920 into 4.x Jul 7, 2026
3 checks passed
@william-suppo
william-suppo deleted the feat/authn-response-name-id-format branch July 7, 2026 12:29
william-suppo added a commit that referenced this pull request Jul 7, 2026
sendAuthnResponse() built the assertion's Subject/NameID without any
value or format, leaving no way for the IdP to honor a requested
NameIDPolicy end-to-end. Adds an optional NameId parameter, consistent
with the object already used by sendLogoutRequest().

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

Allow the IdP to set the NameID Format when sending an AuthnResponse

1 participant