System.Net.NTAuthentication.GetOutgoingBlob C# (CSharp) Метод

GetOutgoingBlob() приватный Метод

private GetOutgoingBlob ( byte incomingBlob, bool thrownOnError ) : byte[]
incomingBlob byte
thrownOnError bool
Результат byte[]
        internal byte[] GetOutgoingBlob(byte[] incomingBlob, bool thrownOnError)
        {
            SecurityStatusPal statusCode;
            return GetOutgoingBlob(incomingBlob, thrownOnError, out statusCode);
        }

Same methods

NTAuthentication::GetOutgoingBlob ( byte incomingBlob, bool throwOnError, SecurityStatusPal &statusCode ) : byte[]
NTAuthentication::GetOutgoingBlob ( string incomingBlob ) : string

Usage Example

        public bool Update(string challenge, WebRequest webRequest)
        {
            HttpWebRequest   request         = webRequest as HttpWebRequest;
            NTAuthentication securityContext = request.CurrentAuthenticationState.GetSecurityContext(this);

            if (securityContext != null)
            {
                if (!securityContext.IsCompleted && (request.CurrentAuthenticationState.StatusCodeMatch == request.ResponseStatusCode))
                {
                    return(false);
                }
                if (!request.UnsafeOrProxyAuthenticatedConnectionSharing)
                {
                    request.ServicePoint.ReleaseConnectionGroup(request.GetConnectionGroupLine());
                }
                bool flag = true;
                int  num  = (challenge == null) ? -1 : GetSignatureIndex(challenge, out flag);
                if (num >= 0)
                {
                    int    startIndex   = num + (flag ? "nego2".Length : "negotiate".Length);
                    string incomingBlob = null;
                    if ((challenge.Length > startIndex) && (challenge[startIndex] != ','))
                    {
                        startIndex++;
                    }
                    else
                    {
                        num = -1;
                    }
                    if ((num >= 0) && (challenge.Length > startIndex))
                    {
                        incomingBlob = challenge.Substring(startIndex);
                    }
                    securityContext.GetOutgoingBlob(incomingBlob);
                    request.CurrentAuthenticationState.Authorization.MutuallyAuthenticated = securityContext.IsMutualAuthFlag;
                }
                request.ServicePoint.SetCachedChannelBinding(request.ChallengedUri, securityContext.ChannelBinding);
                this.ClearSession(request);
            }
            return(true);
        }
All Usage Examples Of System.Net.NTAuthentication::GetOutgoingBlob