Exemple #1
0
        public async Task <Employee> AuthenticateAsync(Credential credential)
        {
            try
            {
                var result = await _manager.AuthenticateAsync(CredentialTranslator.ToDomainModel(credential));

                if (result == null)
                {
                    return(null);
                }
                return(result.ToDataContract());
            }
            catch (Exception ex)
            {
                var rethrow = ExceptionPolicy.HandleException("service.policy", ex);
                if (rethrow)
                {
                    throw;
                }
                return(null);
            }
        }