internal static void CheckForReal401(IServicesContext context) { if(context == null) { throw new ArgumentNullException("context"); } if (context.DoA401) { var response = context.BaseContext.Response; response.ClearContent(); response.ClearHeaders(); response.StatusCode = 401; if (context.SupportBasicAuth) { response.AppendHeader("WWW-Authenticate", "Basic realm=\"DNNAPI\""); } if (context.SupportDigestAuth) { var stale = context.IsStale.ToString(CultureInfo.InvariantCulture).ToLowerInvariant(); var value = string.Format("Digest realm=\"DNNAPI\", nonce=\"{0}\", opaque=\"0000000000000000\", stale={1}, algorithm=MD5, qop=\"auth\"", CreateNewNonce(), stale); response.AppendHeader("WWW-Authenticate", value); } } }
internal static void CheckForReal401(IServicesContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (context.DoA401) { var response = context.BaseContext.Response; response.ClearContent(); response.ClearHeaders(); response.StatusCode = 401; if (context.SupportBasicAuth) { response.AppendHeader("WWW-Authenticate", "Basic realm=\"DNNAPI\""); } if (context.SupportDigestAuth) { var stale = context.IsStale.ToString(CultureInfo.InvariantCulture).ToLowerInvariant(); var value = string.Format("Digest realm=\"DNNAPI\", nonce=\"{0}\", opaque=\"0000000000000000\", stale={1}, algorithm=MD5, qop=\"auth\"", CreateNewNonce(), stale); response.AppendHeader("WWW-Authenticate", value); } } }
/// <summary> /// Constructor /// </summary> /// <param name="emailServices"></param> /// <param name="configurationManager"></param> /// <param name="servicesContext">The services context</param> public FileSystemServices(IServicesContext servicesContext, IEmailServices emailServices, IConfigurationManager configurationManager) : base(servicesContext) { _emailServices = emailServices; _configurationManager = configurationManager; }