Commit Graph

44 Commits

Author SHA1 Message Date
Token2 a3ce37051b Merge pull request #14 from allamiro/fix/proxy-curlopt
Fix proxy support: replace putenv with CURLOPT_PROXY on every curl handle
2026-06-17 11:13:13 +02:00
Tamir Suliman 05d33a777f Fix proxy support: replace putenv with CURLOPT_PROXY on every curl handle
putenv('https_proxy=...') is unreliable for HTTPS destinations across
libcurl versions - it frequently skips CONNECT tunnelling, so the first
call to login.microsoftonline.com fails auth even though the proxy itself
is reachable.

Replace the two commented putenv lines with the applyProxySettings()
pattern from index-proxy.php: $proxy / $proxy_userpwd config vars at
the top of the file and an applyProxySettings($ch) call on every curl
handle (11 handles: getAccessToken, fetchTokens, importTokens,
importCSVTokens x3, getUsers, assignToken, activateToken, unassignToken,
deleteToken).

Fixes #13
2026-06-16 21:52:45 +02:00
Token2 716ed98697 Enhance index.php with proxy and logging comments
Added comments for HTTP proxy support and server-side debug logging.
2026-06-12 09:37:18 +02:00
Token2 b15949c89b Merge pull request #10 from allamiro/fix/getusers-stderr-http500
Fix HTTP 500 on user search: stop writing debug output to stderr
2026-06-10 08:37:11 +02:00
Token2 2287847821 Update Generate-Token2Cert.ps1 2026-06-10 08:36:23 +02:00
Tamir Suliman 17d57c6bc4 Fix HTTP 500 on user search: stop writing debug output to stderr
getUsers() was the only endpoint enabling CURLOPT_VERBOSE and calling
error_log() unconditionally. Both write to stderr, and on some SAPIs
(notably IIS FastCGI with fastcgi.logging=1) any stderr output fails the
request with HTTP 500 and returns the debug text as the response body,
even though the Graph call itself succeeded.

- Remove CURLOPT_VERBOSE from getUsers()
- Replace all error_log() calls with a debugLog() helper that appends to
  a file in the system temp directory (outside the web root), gated by a
  DEBUG_LOG flag that is off by default

Fixes token2/token_inventory#9
2026-06-10 05:18:09 +02:00
Token2 b4ba3c70b1 Update index.php R3 2026-06-02 18:14:53 +02:00
Token2 07150d9c76 Delete index-proxy.php 2026-06-02 18:14:28 +02:00
Token2 363d8ef3ac Implement automatic token activation during CSV upload
Introduced automatic activation of Token2 Classic OATH tokens during CSV uploads, enhancing deployment efficiency and eliminating the need for separate activation tools.
2026-06-02 18:14:10 +02:00
Token2 3d3f5cfb36 Update README.md 2026-06-02 18:13:49 +02:00
Token2 dbdce49feb Merge pull request #4 from marcel-burkhard/patch-1
Make fetchTokens work with more than 1000 tokens
2025-12-15 20:40:47 +01:00
Marcel Burkhard 1278d07fbe Remove $page counter
as it's not needed
2025-12-15 11:11:41 +01:00
Marcel Burkhard fd0f514cc0 Make fetchTokens work with more than 1000 tokens
If your tenant has more than 1000 tokens it only returned the first 1000 as the presence of a `@odata.nextLink` was ignored.
2025-12-15 11:10:14 +01:00
Token2 993f2a42df Update LOCAL_APP definition and footer link R2 2025-10-17 14:25:57 +02:00
Token2 ec736d403d Add files via upload 2025-09-24 15:09:55 +02:00
Token2 5078b41f8d Update index.php 2025-09-23 13:03:32 +02:00
Token2 11ad8db719 Delete app_registration_guide.md 2025-09-21 13:07:01 +02:00
Token2 28ba593143 Delete README.html 2025-09-21 13:06:18 +02:00
Token2 3dd92b42fb Update index.php 0.1 2025-09-20 22:03:37 +02:00
Token2 ecbc49b12b Update index.php 2025-09-20 22:03:04 +02:00
Token2 eb20688f84 Update index.php 2025-09-20 22:02:33 +02:00
Token2 1d840a2a35 Update index.php 2025-09-20 22:01:24 +02:00
Token2 192c722d22 Update index.php 2025-09-20 22:00:24 +02:00
Token2 44330b90b7 Update index.php 2025-09-20 21:59:58 +02:00
Token2 9c85d43d34 Delete enhanced_index.php 2025-09-20 21:59:17 +02:00