BasicAuthHandler.BuildPsValidator method

Builds a PowerShell-based validator function for authenticating users.

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

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