Compartir a través de


IPassportManager::get_TicketAge

IPassportManager::get_TicketAge

Declares the amount of time, in seconds, that has passed since a user's Ticket was issued or refreshed. The Ticket timestamp is provided either in the Microsoft .NET Passport Ticket cookie or the query string.

Syntax

HRESULT get_TicketAge  (
    int* pVal
);

Parameters

  • pVal
    [out, retval] A pointer to an integer (int), which gives the time, in seconds, since the Ticket was last issued or refreshed.

Return values

Returns one of the following values:

S_OK Success.
PP_E_INVALID_TICKET The Ticket on the query string or in the cookie is invalid.

Remarks

A Ticket contains two timestamps: the time of the last refresh (whether silent or manual), and the time of the last manual sign-in, when users actually typed in their passwords on the Login server. This method returns the difference between the last refresh (whether silent or manual) and the current time. This method would typically be used to perform an initial check of the Ticket for what would happen if IPassportManager2::AuthURL2 or IPassportManager::IsAuthenticated were called at this point, with ForceLogin for those methods set to VARIANT_FALSE. The returned pVal time of this method would be compared against the intended TimeWindow for those two methods.

See Also

IPassportManager Interface | IPassportManager2::AuthURL2 | IPassportManager::IsAuthenticated