GSSAPIContext
PHP Manual

GSSAPIContext::acceptSecContext

(No version information available, might be only in CVS)

GSSAPIContext::acceptSecContextAccepts a GSSAPI context initiated by a remote party

Description

public bool GSSAPIContext::acceptSecContext ( string $input_token [, string &$output_token [, string &$src_name [, int &$ret_flags [, int &$time_rec [, KRB5CCache $deleg ]]]]] )

Accepts a GSSAPI context initiated by a remote party. GSSAPIContext::acquireCredentials should first be used to select the correct credentials, otherwise the default credential cache and keytab will be used.

Parameters

input_token

Token passed by the remote party.

output_token

Token to pass to the remote party.

src_name

Principal name of the authenticated remote party

ret_flags

Flags of the established GSSAPI context.

time_rec

Time in seconds for which the context will stay valid.

deleg

The given credential cache will be reinitalized and filled using delegated credentials, if available.

Return Values

Will return true if the context was established, false otherwise.

Examples

Example #1 GSSAPIContext::acceptSecContext() example

<?php
// assume $client is a KRB5CCache containing credentials for client@MYREALM
// assume $server is a KRB5CCache containing credentials for server@MYREALM (initialized using keytab)

$cgssapi = new GSSAPIContext();
$cgssapi->acquireCredentials($client);

$sgssapi = new GSSAPIContext();
$sgssapi->acquireCredentials($server);

$token '';
$cgssapi->initSecContext("server@MYREALM"nullnullnull$token);

$token2 '';
$remote '';
$sgssapi->acceptSecContext($token$token2$remote);

echo 
$remote;
?>

The above example will output something similar to:

client@MYREALM

See Also


GSSAPIContext
PHP Manual