I am using following method to sign in to ArcGIS portal and get the token
public static IArcGISSingleSignon SingleSignon
{
get
{
if (_singleSignon == null)
_singleSignon = new ESRI.ArcGIS.SystemUI.ArcGISSingleSignonClass();
return _singleSignon;
}
}
internal static void SignIn()
{
string bsToken = string.Empty, bsReferrer = string.Empty, bsUser = string.Empty;
int IExpiration = 0;
try
{
SingleSignon.GetToken(0, ref bsToken, ref bsReferrer, ref IExpiration, ref bsUser);
}
catch (System.Runtime.InteropServices.COMException)
{ }
}
Documentation of the GetToken method says this about the IExpiration
lExpiration is a parameter of type long
So how do I know from this long value when my token is going to expire?