Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IHmacSecretKeyService

    Used to get and create the imaging HMAC secret key.

    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IHmacSecretKeyService

    Methods

    View Source

    CreateHmacSecretKeyAsync()

    Generates a new cryptographic HMAC secret key and persists it to the configuration file if one is not already configured. No-ops when a key already exists to avoid rotating the key and invalidating previously generated signed URLs.

    Declaration
    Task<Attempt<HmacSecretKeyOperationStatus>> CreateHmacSecretKeyAsync()
    Returns
    Type Description
    Task<Attempt<HmacSecretKeyOperationStatus>>

    An Attempt<TResult> with status Success if the key was generated and persisted, KeyExists if a key already exists, or Error if persistence failed.

    View Source

    HasHmacSecretKey()

    Checks whether a non-empty HMAC secret key is configured.

    Declaration
    bool HasHmacSecretKey()
    Returns
    Type Description
    bool
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX