ApiKeyAuthHandler.BuildPsValidator method

Builds a PowerShell-based API key validator delegate using the provided authentication code settings.

public static Func<HttpContext, string, byte[], Task<bool>> BuildPsValidator(
    AuthenticationCodeSettings settings, ILogger logger)
parameter description
settings The settings containing the PowerShell authentication code.
logger The logger to use for debug output.

Return Value

A delegate that validates an API key using PowerShell code.

Remarks

This method compiles the PowerShell script and returns a delegate that can be used to validate API keys.

See Also