Share via


IPassportManager::get_TimeSinceSignIn

IPassportManager::get_TimeSinceSignIn

Retrieves the amount of time, in seconds, that has passed since a user's sign-in to the Microsoft .NET Passport Login server. This checks the timestamp in the .NET Passport Ticket cookie or query string and calculates how many seconds have passed since the user last manually entered his or her credentials.

Syntax

HRESULT get_TimeSinceSignIn  (
    int* pVal
);

Parameters

  • pVal
    [out, retval] A pointer to an integer value (int), which gives the time, in seconds, since sign-in.

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 Ticket refresh (whether silent or manual), and the time of the last sign-in, when the user actually typed in a password on the Login server. This method returns the difference between the last manual sign-in and the current time, in seconds. This method would typically be used to do an initial check of a user's Ticket to determine what would happen if IPassportManager2::AuthURL2 or IPassportManager::IsAuthenticated were called at this point, with the ForceLogin parameter for those methods set to VARIANT_TRUE. The returned pVal time of this method would be compared against the intended TimeWindow for those two methods.

This method will still return the same expected values while the Passport Manager object is in stand-alone mode.

See Also

IPassportManager Interface | IPassportManager2::AuthURL2 | IPassportManager::IsAuthenticated | Stand-Alone Mode