Exemple #1
0
        // Token: 0x06000276 RID: 630 RVA: 0x00010964 File Offset: 0x0000EB64
        private static bool Return403UnauthorizedResponse(OperationContext operationContext, string reason)
        {
            ExTraceGlobals.AuthenticationTracer.TraceDebug <string>(0L, "Returning a 403 Unauthorized response for reason: {0}", reason);
            RequestDetailsLoggerBase <RequestDetailsLogger> .Current.AppendAuthError("AuthFailureReason", reason);

            HttpResponseMessageProperty httpResponseMessageProperty = AutodiscoverAuthorizationManager.GetHttpResponseMessageProperty(operationContext);

            httpResponseMessageProperty.StatusCode         = HttpStatusCode.Forbidden;
            httpResponseMessageProperty.SuppressEntityBody = true;
            return(false);
        }
Exemple #2
0
        // Token: 0x06000277 RID: 631 RVA: 0x000109B0 File Offset: 0x0000EBB0
        private static bool Return302RedirectionResponse(OperationContext operationContext, string redirectUrl)
        {
            ExTraceGlobals.AuthenticationTracer.TraceDebug <string>(0L, "Returning a 302 Redirection response to Location: {0}", redirectUrl);
            RequestDetailsLoggerBase <RequestDetailsLogger> .Current.SetRedirectionType(RedirectionType.HttpRedirect);

            HttpResponseMessageProperty httpResponseMessageProperty = AutodiscoverAuthorizationManager.GetHttpResponseMessageProperty(operationContext);

            httpResponseMessageProperty.StatusCode         = HttpStatusCode.Found;
            httpResponseMessageProperty.SuppressEntityBody = true;
            httpResponseMessageProperty.Headers.Add(HttpResponseHeader.Location, redirectUrl);
            return(false);
        }