Badgerati / Pode

Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
https://badgerati.github.io/Pode
MIT License
830 stars 92 forks source link

Authentication method does not exist for merging #1289

Open beesanne opened 4 months ago

beesanne commented 4 months ago

I am trying to merge two authentication methods -- Basic and Windows IIS Auth but when i try I get the error: Authentication method does not exist for merging: authForGet. You cannot call a method on a null-valued expression

I tried merging with a different Windows Auth I have called 'auth' but then I get the following error: Authentication method does not exist for merging: BasicAuth. You cannot call a method on a null-valued expression

Is merging Windows Auth and Basic Auth not supported?

Add-PodeAuthIIS -Name 'authForGet' -Sessionless -ScriptBlock { param($creds) return @{ User = $creds } }

New-PodeAuthScheme -Basic | Add-PodeAuth -Name 'BasicAuth' -Sessionless -ScriptBlock { param($creds) return @{ User = $creds } }

Merge-PodeAuth -Name MergedAuth -Authentication 'authForGet', 'BasicAuth' -Valid One

mdaneri commented 2 months ago

I'm not able to reproduce your issue with Pode v2.10.0 and v2.10.1 Do you still have the issue ?