System.Net.HttpListener.BuildChallenge C# (CSharp) Method

BuildChallenge() private method

private BuildChallenge ( AuthenticationSchemes authenticationScheme, ulong connectionId, NTAuthentication &newContext, ExtendedProtectionPolicy policy, bool isSecureConnection ) : ArrayList
authenticationScheme AuthenticationSchemes
connectionId ulong
newContext NTAuthentication
policy ExtendedProtectionPolicy
isSecureConnection bool
return ArrayList
        private ArrayList BuildChallenge(AuthenticationSchemes authenticationScheme, ulong connectionId,
            out NTAuthentication newContext, ExtendedProtectionPolicy policy, bool isSecureConnection)
        {
            if (NetEventSource.IsEnabled) NetEventSource.Info(this, "AuthenticationScheme:" + authenticationScheme.ToString());
            ArrayList challenges = null;
            newContext = null;

            if ((authenticationScheme & AuthenticationSchemes.Negotiate) != 0)
            {
                AddChallenge(ref challenges, AuthConstants.Negotiate);
            }

            if ((authenticationScheme & AuthenticationSchemes.Ntlm) != 0)
            {
                AddChallenge(ref challenges, AuthConstants.NTLM);
            }

            if ((authenticationScheme & AuthenticationSchemes.Digest) != 0)
            {
                if (NetEventSource.IsEnabled) NetEventSource.Info(this, "WDigest");
                throw new NotImplementedException();
            }

            if ((authenticationScheme & AuthenticationSchemes.Basic) != 0)
            {
                AddChallenge(ref challenges, "Basic realm =\"" + Realm + "\"");
            }

            return challenges;
        }