allow saving/loading of kerberos tickets

This commit is contained in:
Robin Appelman 2022-07-06 14:37:38 +02:00
commit a103d9d79e
7 changed files with 186 additions and 89 deletions

View file

@ -1,5 +1,7 @@
<?php
use Icewind\SMB\KerberosTicket;
require('vendor/autoload.php');
if (php_sapi_name() == "cli") {
@ -10,7 +12,8 @@ if (php_sapi_name() == "cli") {
$host = 'krb.domain.test';
$share = 'netlogon';
$auth = new \Icewind\SMB\KerberosApacheAuth();
$auth = new \Icewind\SMB\KerberosAuth();
$auth->setTicket(KerberosTicket::fromEnv());
$serverFactory = new \Icewind\SMB\ServerFactory();
$server = $serverFactory->createServer($host, $auth);