Exemple #1
0
        private string GetUserIdFromApiKey()
        {
            var apiKeyHeader = Request.Headers.FirstOrDefault(x => x.Key.EqualsCaseInvariant(ApiKeyHeader));

            if (apiKeyHeader.Key.Empty() || apiKeyHeader.Value == null || !apiKeyHeader.Value.Any())
            {
                return(string.Empty);
            }

            return(IdentityProvider.GetUserIdForApiKey(apiKeyHeader.Value.First()));
        }