feat(npauth): implement synchronous requests and id token query #2364

Closed
Darkeox34 wants to merge 1 commit from upstream-pr/2364 into main
Darkeox34 commented 2026-10-09 16:25:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Darkeox34 on 2026-10-09T16:25:18Z.


What

Completes 100% export coverage for libSceNpAuth (8/8 functions):

  • Implements sceNpAuthCreateRequest allocating sequential request identifiers.
  • Implements sceNpAuthGetIdTokenV3 validating parameters and reporting SCE_NP_ERROR_SIGNED_OUT, mirroring sceNpAuthGetAuthorizationCodeV3.
  • Implements sceNpAuthWaitAsync completing requests immediately with SCE_NP_ERROR_SIGNED_OUT like sceNpAuthPollAsync.
  • Adds core/libs/prx/libSceNpAuth/CMakeLists.txt and guest unit test suite core/libs/tests/GuestNpAuth.cpp.
  • Documents libSceNpAuth offline requests in docs/dev/TechnicalDebt.md.

Tested

  • Validated with python tools/check_conventions.py --base upstream/main.
  • Verified 100% export coverage with python tools/progress.py.
  • Covered by guest unit test suite GuestNpAuth.cpp driving sync/async request creation, abort/delete, argument validation, authorization code, ID token, poll, and wait.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4803095101 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2364). Originally posted by [Darkeox34](https://github.com/Darkeox34) on 2026-10-09T16:25:18Z. --- ### What Completes 100% export coverage for `libSceNpAuth` (8/8 functions): - Implements `sceNpAuthCreateRequest` allocating sequential request identifiers. - Implements `sceNpAuthGetIdTokenV3` validating parameters and reporting `SCE_NP_ERROR_SIGNED_OUT`, mirroring `sceNpAuthGetAuthorizationCodeV3`. - Implements `sceNpAuthWaitAsync` completing requests immediately with `SCE_NP_ERROR_SIGNED_OUT` like `sceNpAuthPollAsync`. - Adds `core/libs/prx/libSceNpAuth/CMakeLists.txt` and guest unit test suite `core/libs/tests/GuestNpAuth.cpp`. - Documents `libSceNpAuth` offline requests in `docs/dev/TechnicalDebt.md`. ### Tested - Validated with `python tools/check_conventions.py --base upstream/main`. - Verified 100% export coverage with `python tools/progress.py`. - Covered by guest unit test suite `GuestNpAuth.cpp` driving sync/async request creation, abort/delete, argument validation, authorization code, ID token, poll, and wait. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-09 16:32:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T16:32:33Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#2224 docs/dev/TechnicalDebt.md L23-24
#2228 docs/dev/TechnicalDebt.md L23-24
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085035447 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2364#issuecomment-6085035447). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T16:32:33Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #2224 | `docs/dev/TechnicalDebt.md` [L23-24](https://github.com/boykopovar/AnyPS5/blob/8b393b6e9a8ade9188d4f74a0293e0efd9828597/docs/dev/TechnicalDebt.md#L23-L24) | | | | #2228 | `docs/dev/TechnicalDebt.md` [L23-24](https://github.com/boykopovar/AnyPS5/blob/8b393b6e9a8ade9188d4f74a0293e0efd9828597/docs/dev/TechnicalDebt.md#L23-L24) | | |
Kikoarl commented 2026-10-09 17:44:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-09T17:44:19Z.


Linux run: Linux 7.2 (x86_64), GCC 16.2.1, Release, -DBUILD_TESTING=ON, #2364 (ac316512) tested on current main (0fdda7be).

  • tests/guest_np_auth_tests: passes cleanly.
  • tools/check_conventions.py: passes cleanly.
  • Verified synchronous NP auth requests and ID token queries on Linux.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6086156242 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2364#issuecomment-6086156242). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-09T17:44:19Z. --- Linux run: Linux 7.2 (x86_64), GCC 16.2.1, Release, `-DBUILD_TESTING=ON`, #2364 (`ac316512`) tested on current `main` (`0fdda7be`). - `tests/guest_np_auth_tests`: passes cleanly. - `tools/check_conventions.py`: passes cleanly. - Verified synchronous NP auth requests and ID token queries on Linux.
popcoder565 commented 2026-10-09 19:42:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:42:02Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head ac316512, merged onto main 8b393b6e in one build with 31 other PRs that had no Windows run.

  • This PR's tests pass: guest_np_auth.
  • Full ctest in that build: 520 of 521. The one failure is guest_offline_imports, broken by #2359 (reported there).

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088012331 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2364#issuecomment-6088012331). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T19:42:02Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `ac316512`, merged onto `main` 8b393b6e in one build with 31 other PRs that had no Windows run. - This PR's tests pass: `guest_np_auth`. - Full ctest in that build: 520 of 521. The one failure is `guest_offline_imports`, broken by #2359 (reported there). No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
oneandonlydean commented 2026-10-09 20:12:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:12:29Z.


Same as #2346: no title is shown reaching sceNpAuthCreateRequest, GetIdTokenV3 or WaitAsync on main. Please reopen with the title ID and the log line if one does.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088478645 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2364#issuecomment-6088478645). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T20:12:29Z. --- Same as #2346: no title is shown reaching `sceNpAuthCreateRequest`, `GetIdTokenV3` or `WaitAsync` on main. Please reopen with the title ID and the log line if one does.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!2364
No description provided.