{"_id":"@bun-win32/credui","_rev":"4-328a98095b8c8ba6eaba7e0bf5059b7a","name":"@bun-win32/credui","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/credui","version":"1.0.0","keywords":["bun","ffi","win32","windows","credui","credentials","authentication","sspi","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/credui@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"ba0cc546a87238e40725ce3389b8e0d4016065fd","tarball":"https://registry.npmjs.org/@bun-win32/credui/-/credui-1.0.0.tgz","fileCount":6,"integrity":"sha512-tZlPKhHgtkL66zdCvKGdA2O2axMfj9QCWJfhlwtD2BZa8WiMhGkBxT/DS84K9n86abme1ZGgxKuiHgg9/+/D/g==","signatures":[{"sig":"MEUCIQDaL6kHjwhWVm6WMGVOzennpMW4JlD4dKjWoM2cs7tBkAIgJycmeft2CtRscwTJmkjd45Thyf3j9ZtPwUpzSZU+0tk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24720},"main":"./index.ts","type":"module","module":"index.ts","shasum":"ba0cc546a87238e40725ce3389b8e0d4016065fd","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:credential-diagnostic":"bun ./example/credential-diagnostic.ts","example:system-credential-dialog":"bun ./example/system-credential-dialog.ts","example:credential-buffer-visualizer":"bun ./example/credential-buffer-visualizer.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-tZlPKhHgtkL66zdCvKGdA2O2axMfj9QCWJfhlwtD2BZa8WiMhGkBxT/DS84K9n86abme1ZGgxKuiHgg9/+/D/g==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/credui"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 CREDUI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"1.0.21"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/credui_1.0.0_1775743835910_0.5490955940079103","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/credui","version":"1.0.1","keywords":["bun","ffi","win32","windows","credui","credentials","authentication","sspi","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/credui@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"6f2078829746402539df1043926d116a8a8f6fc3","tarball":"https://registry.npmjs.org/@bun-win32/credui/-/credui-1.0.1.tgz","fileCount":6,"integrity":"sha512-F4miWDITihcOypFbfCoHo5wRmyjJPqkT5E6+uiMfywSXmI8nEs2BKR2ZR2Q1DldV0DgCqKoIM1ReFXTS9ppwEg==","signatures":[{"sig":"MEUCIQCawxqVWo3wfsO4LMnOg3BmcZBL98yBA9ElDtt02lH+LgIgdArjAaZofwcCf9qqFBugbQLBvGBjjCRdiMqO4W6siT0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24758},"main":"./index.ts","type":"module","module":"index.ts","shasum":"6f2078829746402539df1043926d116a8a8f6fc3","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:credential-diagnostic":"bun ./example/credential-diagnostic.ts","example:system-credential-dialog":"bun ./example/system-credential-dialog.ts","example:credential-buffer-visualizer":"bun ./example/credential-buffer-visualizer.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-F4miWDITihcOypFbfCoHo5wRmyjJPqkT5E6+uiMfywSXmI8nEs2BKR2ZR2Q1DldV0DgCqKoIM1ReFXTS9ppwEg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/credui"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 CREDUI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/ole32":"1.0.2","@bun-win32/kernel32":"1.0.26"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/credui_1.0.1_1781130805166_0.3501738779408472","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/credui","version":"2.0.0","keywords":["bun","ffi","win32","windows","credui","credentials","authentication","sspi","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/credui@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"8ffb033964210a84f960963cf422bdb2e0c8bd2b","tarball":"https://registry.npmjs.org/@bun-win32/credui/-/credui-2.0.0.tgz","fileCount":6,"integrity":"sha512-PTw/a6yWQkq60ThYtEBWhsdu15xVjycF+S4K9AwTDUsD98ZCvBMnkFaFNK56g8Iq/NFmmDL58D2NgaHYWNx//w==","signatures":[{"sig":"MEUCIHqZU5/YWVKkEkGZlThlRwHBxBIaNXmBUGdcsp33+lN2AiEArDK/udyJVtvrE4nmvl+FiOj6qMIWxrkNf/mr+MIcqlo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26666},"main":"./index.ts","type":"module","module":"index.ts","shasum":"8ffb033964210a84f960963cf422bdb2e0c8bd2b","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:credential-diagnostic":"bun ./example/credential-diagnostic.ts","example:system-credential-dialog":"bun ./example/system-credential-dialog.ts","example:credential-buffer-visualizer":"bun ./example/credential-buffer-visualizer.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-PTw/a6yWQkq60ThYtEBWhsdu15xVjycF+S4K9AwTDUsD98ZCvBMnkFaFNK56g8Iq/NFmmDL58D2NgaHYWNx//w==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/credui"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 CREDUI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/ole32":"2.0.0","@bun-win32/kernel32":"2.0.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/credui_2.0.0_1782435283689_0.6212505027984001","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 CREDUI bindings for Bun (FFI) on Windows.","devDependencies":{"@bun-win32/kernel32":"2.0.1","@bun-win32/ole32":"2.0.1","@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/credui","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/credui"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","credui","credentials","authentication","sspi","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:credential-buffer-visualizer":"bun ./example/credential-buffer-visualizer.ts","example:credential-diagnostic":"bun ./example/credential-diagnostic.ts","example:system-credential-dialog":"bun ./example/system-credential-dialog.ts"},"_id":"@bun-win32/credui@2.0.1","_integrity":"sha512-N3FjC6VKIkwF2l1+6ZZWc1CCUHCHNEpnUQgt5jlSCW3k/flgADcMpRAdYPNHtxK4vtnYkixvZnAi1Hld0DU65Q==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"2dbc3d6dbfcf54a63d2c0fbff9b87fcde824dc00","dist":{"integrity":"sha512-N3FjC6VKIkwF2l1+6ZZWc1CCUHCHNEpnUQgt5jlSCW3k/flgADcMpRAdYPNHtxK4vtnYkixvZnAi1Hld0DU65Q==","shasum":"2dbc3d6dbfcf54a63d2c0fbff9b87fcde824dc00","tarball":"https://registry.npmjs.org/@bun-win32/credui/-/credui-2.0.1.tgz","fileCount":6,"unpackedSize":26666,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB9S+TUeqK4b+bzEEBjkycktwZw6P3Lh8MYnuR4mFSfWAiEAyJfyml3R+y3nU+u1wJS26jXJzxgfr3lbEaKqDhct2BY="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/credui_2.0.1_1782437741901_0.49333772173935597"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-09T14:10:35.822Z","modified":"2026-06-26T01:35:42.187Z","1.0.0":"2026-04-09T14:10:36.061Z","1.0.1":"2026-06-10T22:33:25.299Z","2.0.0":"2026-06-26T00:54:43.827Z","2.0.1":"2026-06-26T01:35:42.042Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","credui","credentials","authentication","sspi","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/credui"},"description":"Zero-dependency, zero-overhead Win32 CREDUI bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/credui\n\nZero-dependency, zero-overhead Win32 CredUI bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/credui` exposes the `credui.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Credui`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `credui.dll` (credential prompts, packed authentication buffers, SSPI-assisted credential flows, and SSO helpers).\n- In-source docs in `structs/Credui.ts` with links to Microsoft Docs.\n- Lazy binding on first call; optional eager preload (`Credui.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases (see `types/Credui.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n\n## Installation\n\n```sh\nbun add @bun-win32/credui\n```\n\n## Quick Start\n\n```ts\nimport Credui from '@bun-win32/credui';\n\nconst principal = Buffer.from('CONTOSO\\\\alice\\0', 'utf16le');\nconst userBuffer = Buffer.alloc((513 + 1) * 2);\nconst domainBuffer = Buffer.alloc((513 + 1) * 2);\n\nconst status = Credui.CredUIParseUserNameW(principal.ptr, userBuffer.ptr, 514, domainBuffer.ptr, 514);\n\nif (status === 0) {\n  const user = userBuffer.toString('utf16le').replace(/\\0.*$/, '');\n  const domain = domainBuffer.toString('utf16le').replace(/\\0.*$/, '');\n  console.log({ domain, user });\n}\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example:credential-buffer-visualizer\nbun run example:credential-diagnostic\nbun run example:system-credential-dialog\n```\n\n`example:system-credential-dialog` opens the real Windows credential provider UI. On a Hello-enabled machine, the available tiles can include password, PIN, face, fingerprint, smart card, or other installed providers, depending on local policy and configuration.\n\n## Notes\n\n- Either rely on lazy binding or call `Credui.Preload()`.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}