[PR #3712] [MERGED] NpAuth: Improved stubs #3675

Closed
opened 2026-02-27 22:04:35 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3712
Author: @StevenMiller123
Created: 10/5/2025
Status: Merged
Merged: 10/6/2025
Merged by: @squidbus

Base: mainHead: np-auth


📝 Commits (10+)

📊 Changes

5 files changed (+404 additions, -51 deletions)

View changed files

📝 src/core/libraries/np/np_auth.cpp (+328 -38)
📝 src/core/libraries/np/np_auth.h (+42 -13)
src/core/libraries/np/np_auth_error.h (+13 -0)
📝 src/core/libraries/np/np_error.h (+1 -0)
📝 src/core/libraries/np/np_types.h (+20 -0)

📄 Description

This PR adds more thorough stubs for a majority of the libSceNpAuth library, based primarily around decompilation and hardware testing.

Most of libSceNpAuth's functions behave around a similar request logic to libSceNpManager, though the internal request data and library state as a whole are completely separate, which is why I've chosen to rename the internal structs I used despite copying most of that logic from my NpManager PR.

The only actual time where libSceNpAuth calls into libSceNpManager is when sending the actual requests, where it uses internal libSceNpManager calls to create an NpManager request, get the authorization_code, issuer_id, and token as needed, then delete the NpManager request.

The GetAuthorizationCode and GetIdToken helper functions are based around similar helper functions I decompiled from the actual library, and same goes for the various parameter checks spread throughout this code.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3712 **Author:** [@StevenMiller123](https://github.com/StevenMiller123) **Created:** 10/5/2025 **Status:** ✅ Merged **Merged:** 10/6/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `np-auth` --- ### 📝 Commits (10+) - [`9818495`](https://github.com/shadps4-emu/shadPS4/commit/9818495ee35d2e4b5f8fd3083be0c86501e07896) Some structs and function definitions - [`3232b56`](https://github.com/shadps4-emu/shadPS4/commit/3232b56de77efc1fe2387a1c9a3ff5adf774f38a) Fill in remaining function definitions and structs - [`64b742f`](https://github.com/shadps4-emu/shadPS4/commit/64b742fe9d9440cfffb450dc503da4dd15cbb9e0) Some errors - [`e9f4443`](https://github.com/shadps4-emu/shadPS4/commit/e9f4443b79ccbd45a29053bf2e25489f53863b1d) Minor formatting change - [`e659cf3`](https://github.com/shadps4-emu/shadPS4/commit/e659cf3dc1b52b67b5fb952714711145497b6485) Some more errors - [`1852921`](https://github.com/shadps4-emu/shadPS4/commit/185292189bddbdced58358cdaabaa1033ae2db71) GetIdToken error cases - [`59440e6`](https://github.com/shadps4-emu/shadPS4/commit/59440e69bc17e38259496bf2079db315b384a0f8) Remaining error cases - [`2044f59`](https://github.com/shadps4-emu/shadPS4/commit/2044f593d898f231981ecb3b5ddad0627135f8fa) Basic request handling - [`ba6dbb6`](https://github.com/shadps4-emu/shadPS4/commit/ba6dbb690a2d0c593164313de65a72a3d9fb0bcb) NpAuthRequest usage - [`87e6b28`](https://github.com/shadps4-emu/shadPS4/commit/87e6b28856ba77100fe5f0c8ac7bf9f1f7c45fc5) Oops ### 📊 Changes **5 files changed** (+404 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/np/np_auth.cpp` (+328 -38) 📝 `src/core/libraries/np/np_auth.h` (+42 -13) ➕ `src/core/libraries/np/np_auth_error.h` (+13 -0) 📝 `src/core/libraries/np/np_error.h` (+1 -0) 📝 `src/core/libraries/np/np_types.h` (+20 -0) </details> ### 📄 Description This PR adds more thorough stubs for a majority of the libSceNpAuth library, based primarily around decompilation and hardware testing. Most of libSceNpAuth's functions behave around a similar request logic to libSceNpManager, though the internal request data and library state as a whole are completely separate, which is why I've chosen to rename the internal structs I used despite copying most of that logic from my NpManager PR. The only actual time where libSceNpAuth calls into libSceNpManager is when sending the actual requests, where it uses internal libSceNpManager calls to create an NpManager request, get the authorization_code, issuer_id, and token as needed, then delete the NpManager request. The `GetAuthorizationCode` and `GetIdToken` helper functions are based around similar helper functions I decompiled from the actual library, and same goes for the various parameter checks spread throughout this code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:35 +03:00
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3675
No description provided.