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(KestrunHost host,
AuthenticationCodeSettings settings)
| parameter | description |
|---|---|
| host | The Kestrun host instance. |
| settings | The settings containing the PowerShell authentication code. |
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
- class KestrunHost
- record AuthenticationCodeSettings
- class ApiKeyAuthHandler
- namespace Kestrun.Authentication