AjaxUploader
Search Results for

    Show / Hide Table of Contents

    Class SigningAuthorization

    Optional gate for the direct-to-cloud presign endpoints (ajaxupload.axd/s3/, /azure/, /gcs/*).

    Those endpoints are privileged: whoever can call them can obtain credentials to write into your bucket or container. The handler is registered for the whole application, so a <location> rule on ajaxupload.axd would also gate ordinary uploads. This hook lets you authorize signing specifically.

    Default (Handler left null) is permissive, preserving existing behavior. Set it once at startup:

    // Global.asax Application_Start
    AjaxUploader.Security.SigningAuthorization.Handler = (context, operation) =>
        context.User != null &&
        context.User.Identity.IsAuthenticated &&
        context.User.IsInRole("Uploaders");

    Returning false answers 403. The check runs before the "signer not configured" branch, so a denied caller cannot learn which cloud providers a deployment has wired up.

    This is the Web Forms counterpart of CoreUpload's IUploadAuthorizationHandler.AuthorizeSigningAsync.

    Inheritance
    object
    SigningAuthorization
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: AjaxUploader.Security
    Assembly: AjaxUploader.dll
    Syntax
    public static class SigningAuthorization

    Properties

    Handler

    Called with the current request and the signing operation ("s3/create", "s3/sign", "azure/create", "gcs/abort", ...). Return false to reject the request with 403.

    Declaration
    public static Func<HttpContext, string, bool> Handler { get; set; }
    Property Value
    Type Description
    Func<HttpContext, string, bool>
    In this article
    Back to top AjaxUploader API Reference