Table of Contents

AddHmac Method

Definition

AddHmac(AuthenticationBuilder, Action<HmacAuthenticationOptions>)

Adds an HmacAuthenticationHandler to the authentication middleware.

public static AuthenticationBuilder AddHmac(this AuthenticationBuilder builder, Action<HmacAuthenticationOptions> setup)

Parameters

builder AuthenticationBuilder

The AuthenticationBuilder to extend.

setup Action<HmacAuthenticationOptions>

The HmacAuthenticationOptions which needs to be configured.

Returns

AuthenticationBuilder

A reference to builder so that additional calls can be chained.

Exceptions

ArgumentNullException

builder cannot be null.

ArgumentException

setup failed to configure an instance of HmacAuthenticationOptions in a valid state.