(No version information available, might be only in CVS)
KRB5CCache::initPassword — Gets a TGT using a given password
Gets a TGT using a given password. Please note that using passwords is not suitable for services needing to accept GSSAPI contexts as the service key is required but then not available to GSSAPI.
Name of principal to get TGT for.
Password to authenticate.
Associative array of Ticket flags.
flag | type | description |
---|---|---|
forwardable | bool | Try to get a forwardable TGT |
proxiable | bool | Try to get a proxiable TGT |
tkt_life | integer | Lifetime of TGT in seconds |
renew_life | integer | Renewable lifetime of TGT in seconds |
Example #1 KRB5CCache::initPassword() example
<?php
$ccache = new KRB5CCache();
$flags = array(
"forwardable" => true,
"tkt_life" => 60 * 60
);
$ccache->initPassword("test@MYREALM", "test", $flags);
// if everything worked $ccache will now contain forwardable a TGT
// for test@MYREALM with lifetime of one hour
?>