• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • CaseHandlingUriBuilder
      • CaseHandlingUriBuilder.CaseHandling
      • CommandHandling
      • ExifOrientationUtilities
      • Format
      • FormatCommand
      • FormatUtilities
      • FormattedImage
      • HMACUtilities
      • ImageCacheMetadata
      • ImageMetadata
      • RequestAuthorizationUtilities
      • Resampler
      • ResamplerCommand
    • SixLabors.ImageSharp.Web.Caching
      • ICacheHash
      • ICacheKey
      • IImageCache
      • LegacyV1CacheKey
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
      • SHA256CacheHash
      • UriAbsoluteCacheKey
      • UriAbsoluteLowerInvariantCacheKey
      • UriRelativeCacheKey
      • UriRelativeLowerInvariantCacheKey
    • SixLabors.ImageSharp.Web.Commands
      • CommandCollection
      • CommandCollectionExtensions
      • CommandParser
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ArrayConverter<T>
      • ColorConverter
      • EnumConverter
      • ICommandConverter
      • ICommandConverter<T>
      • IntegralNumberConverter<T>
      • ListConverter<T>
      • SimpleCommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • AutoOrientWebProcessor
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • QualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • FileProviderImageProvider
      • IImageProvider
      • PhysicalFileSystemProvider
      • PhysicalFileSystemProviderOptions
      • ProcessingBehavior
      • WebRootImageProvider
    • SixLabors.ImageSharp.Web.Resolvers
      • FileProviderImageResolver
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>
    • SixLabors.ImageSharp.Web.TagHelpers
      • HmacTokenTagHelper
      • ImageTagHelper

    Class RequestAuthorizationUtilities

    Contains various helper methods for authorizing image requests.

    Inheritance
    object
    RequestAuthorizationUtilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SixLabors.ImageSharp.Web
    Assembly: SixLabors.ImageSharp.Web.dll
    Syntax
    public sealed class RequestAuthorizationUtilities

    Constructors

    | Edit this page View Source

    RequestAuthorizationUtilities(IOptions<ImageSharpMiddlewareOptions>, IRequestParser, IEnumerable<IImageWebProcessor>, CommandParser, IServiceProvider)

    Initializes a new instance of the RequestAuthorizationUtilities class.

    Declaration
    public RequestAuthorizationUtilities(IOptions<ImageSharpMiddlewareOptions> options, IRequestParser requestParser, IEnumerable<IImageWebProcessor> processors, CommandParser commandParser, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IOptions<ImageSharpMiddlewareOptions> options

    The middleware configuration options.

    IRequestParser requestParser

    An IRequestParser instance used to parse image requests for commands.

    IEnumerable<IImageWebProcessor> processors

    A collection of IImageWebProcessor instances used to process images.

    CommandParser commandParser

    The command parser.

    IServiceProvider serviceProvider

    The service provider.

    Fields

    | Edit this page View Source

    TokenCommand

    The command used by image requests for transporting Hash-based Message Authentication Code (HMAC) tokens.

    Declaration
    public const string TokenCommand = "hmac"
    Field Value
    Type Description
    string

    Methods

    | Edit this page View Source

    ComputeHMAC(HostString, PathString, QueryString, QueryCollection, CommandHandling)

    Compute a Hash-based Message Authentication Code (HMAC) for request authentication.

    Declaration
    public string? ComputeHMAC(HostString host, PathString path, QueryString queryString, QueryCollection query, CommandHandling handling)
    Parameters
    Type Name Description
    HostString host

    The host header.

    PathString path

    The path or pathbase.

    QueryString queryString

    The querystring.

    QueryCollection query

    The query collection.

    CommandHandling handling

    The command collection handling.

    Returns
    Type Description
    string

    The computed HMAC.

    | Edit this page View Source

    ComputeHMAC(HostString, PathString, QueryString, CommandHandling)

    Compute a Hash-based Message Authentication Code (HMAC) for request authentication.

    Declaration
    public string? ComputeHMAC(HostString host, PathString path, QueryString queryString, CommandHandling handling)
    Parameters
    Type Name Description
    HostString host

    The host header.

    PathString path

    The path or pathbase.

    QueryString queryString

    The querystring.

    CommandHandling handling

    The command collection handling.

    Returns
    Type Description
    string

    The computed HMAC.

    | Edit this page View Source

    ComputeHMAC(HttpContext, CommandHandling)

    Compute a Hash-based Message Authentication Code (HMAC) for request authentication.

    Declaration
    public string? ComputeHMAC(HttpContext context, CommandHandling handling)
    Parameters
    Type Name Description
    HttpContext context

    The request HTTP context.

    CommandHandling handling

    The command collection handling.

    Returns
    Type Description
    string

    The computed HMAC.

    | Edit this page View Source

    ComputeHMAC(string, CommandHandling)

    Compute a Hash-based Message Authentication Code (HMAC) for request authentication.

    Declaration
    public string? ComputeHMAC(string uri, CommandHandling handling)
    Parameters
    Type Name Description
    string uri

    The uri to compute the code from.

    CommandHandling handling

    The command collection handling.

    Returns
    Type Description
    string

    The computed HMAC.

    | Edit this page View Source

    ComputeHMAC(Uri, CommandHandling)

    Compute a Hash-based Message Authentication Code (HMAC) for request authentication.

    Declaration
    public string? ComputeHMAC(Uri uri, CommandHandling handling)
    Parameters
    Type Name Description
    Uri uri

    The uri to compute the code from.

    CommandHandling handling

    The command collection handling.

    Returns
    Type Description
    string

    The computed HMAC.

    | Edit this page View Source

    StripUnknownCommands(CommandCollection)

    Strips any unknown commands from the command collection.

    Declaration
    public void StripUnknownCommands(CommandCollection commands)
    Parameters
    Type Name Description
    CommandCollection commands

    The unsanitized command collection.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX