BasicAuthHandler.BuildPsValidator method

Builds a PowerShell-based validator function for authenticating users.

public static Func<HttpContext, string, string, Task<bool>> BuildPsValidator(
    AuthenticationCodeSettings settings, ILogger logger)
parameter description
settings The authentication code settings containing the PowerShell script.
logger The logger instance.

Return Value

A function that validates credentials using the provided PowerShell script.

Remarks

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

See Also