mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
test kerberos sso with "save ticket in memory" enabled
This commit is contained in:
parent
c1ce4fbb2f
commit
8cfc847166
2 changed files with 55 additions and 0 deletions
23
example-apache-kerberos-memory.php
Normal file
23
example-apache-kerberos-memory.php
Normal 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";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue