public static async Task <Token> GenerateToken(string tokenUrl, string user, string password, int expiration = 60) { var token = await Esri.GetTokenInfo(tokenUrl, user, password, expiration); return(new Token(token.token, Esri.BaseTime.AddMilliseconds(token.expires))); }