test kerberos sso with "save ticket in memory" enabled

This commit is contained in:
Robin Appelman 2022-01-20 14:09:23 +01:00
commit 8cfc847166
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<?php
require('vendor/autoload.php');
if (php_sapi_name() == "cli") {
echo "Note: this example shouldn't be called from cli as it expects apache to setup the keberos ticket\n";
}
// dfs paths not working
$host = 'krb.domain.test';
$share = 'netlogon';
$auth = new \Icewind\SMB\KerberosApacheAuth(true);
$serverFactory = new \Icewind\SMB\ServerFactory();
$server = $serverFactory->createServer($host, $auth);
$share = $server->getShare($share);
$files = $share->dir('/');
foreach ($files as $file) {
echo $file->getName() . "\n";
}