次の方法で共有


IPassportManager::get_HasTicket

IPassportManager::get_HasTicket

Returns whether a user has a Microsoft .NET Passport Ticket on the query string or in a cookie.

Syntax

HRESULT get_HasTicket (
    VARIANT_BOOL* pVal
);

Parameters

  • pVal
    [out, retval] A pointer to a VARIANT Boolean value. Returns VARIANT_TRUE if the Ticket was provided on the incoming request query string or is present as a cookie; otherwise, returns VARIANT_FALSE.

Return values

Returns one of the following values:

S_OK Success.

Remarks

This method returns VARIANT_TRUE when called if the user possesses a .NET Passport Ticket. This method returns VARIANT_FALSE if no Ticket exists in the calling domain. This method will also return VARIANT_FALSE (with S_OK as the HRESULT) if the Ticket is not valid (for example, is a locally hacked Ticket). It determines only whether the Ticket exists, and not whether it is stale or current, and is actually a call to IPassportManager::IsAuthenticated with TimeWindow equal to zero and ForceLogin equal to VARIANT_FALSE.

See Also

IPassportManager Interface | IPassportManager::IsAuthenticated