System.Net.Security.NegoState.CheckSpn C# (CSharp) Method

CheckSpn() private method

private CheckSpn ( ) : bool
return bool
        private bool CheckSpn()
        {
            if (_context.IsKerberos)
            {
                return true;
            }

            if (_extendedProtectionPolicy.PolicyEnforcement == PolicyEnforcement.Never ||
                    _extendedProtectionPolicy.CustomServiceNames == null)
            {
                return true;
            }

            string clientSpn = _context.ClientSpecifiedSpn;

            if (String.IsNullOrEmpty(clientSpn))
            {
                if (_extendedProtectionPolicy.PolicyEnforcement == PolicyEnforcement.WhenSupported)
                {
                    return true;
                }
            }
            else
            {
                return _extendedProtectionPolicy.CustomServiceNames.Contains(clientSpn);
            }

            return false;
        }