예제 #1
0
        public async Task <bool> IsPinEntered(string clientId)
        {
            var partitionKey = PinSecurityEntity.GeneratePartitionKey();
            var rowKey       = PinSecurityEntity.GenerateRowKey(clientId);

            return(await _tableStorage.GetDataAsync(partitionKey, rowKey) != null);
        }
예제 #2
0
        public async Task <bool> CheckAsync(string clientId, string pin)
        {
            var partitionKey = PinSecurityEntity.GeneratePartitionKey();
            var rowKey       = PinSecurityEntity.GenerateRowKey(clientId);
            var entity       = await _tableStorage.GetDataAsync(partitionKey, rowKey);

            return(entity != null && entity.CheckPassword(pin));
        }