Пример #1
0
        public static async Task <Tuple <string, string, IList <string> > > AuthenticateDeviceAsync(string id, string token)
        {
            AzureStorage   storage = new AzureStorage();
            IStorageDevice device  = await storage.AuthenticateAnonymousDeviceAsync(id.UrnToId(), token);

            if (device == null)
            {
                return(null);
            }
            else
            {
                return(new Tuple <string, string, IList <string> >(device.Id.ToUrn(),
                                                                   device.Token, device.Sensors.Select(s => s.Key).ToList()));
            }
        }