Skip to content

IIS Authentication redirected #647

@m4admin

Description

@m4admin

Anyone get Pode.Web authenticated with IIS?

Pode 2.11.1 works really good, but pode.web couldnt get to work with kerberos auth:

`
Start-PodeServer -EnablePool Schedules {

Add-PodeEndpoint -Address 127.0.0.1 -Protocol Http


Enable-PodeSessionMiddleware -Duration 120 -Extend
Add-PodeAuthIIS -Name 'IISAuth'
Use-PodeWebTemplates -Title Investigations -Theme Auto
Set-PodeWebAuth -Authentication IISAuth

# social
Set-PodeWebSocial -Type GitHub -Url 'https://github.com/badgerati'
Set-PodeWebSocial -Type Twitter -Url 'https://twitter.com/Badgerati' -Tooltip '@Badgerati'

# set the home page controls (just a simple paragraph)
$section = New-PodeWebCard -Name 'Welcome' -NoTitle -Content @(
    New-PodeWebParagraph -Value "This is an example homepage, with some example text: $($WebEvent.Auth.User)"
    New-PodeWebParagraph -Value "Using some example paragraphs: : $($WebEvent.Auth.User) "
)
Add-PodeWebPage -Name 'Home' -Title "Awesome Homepage: $($WebEvent.Auth.User)"

Add-PodeWebPage -Name 'Services' -Icon 'Settings' -ScriptBlock {
    New-PodeWebCard -Content @(
        New-PodeWebTable -Name 'Services' -ScriptBlock {
            foreach ($svc in (Get-Service)) {
                [ordered]@{
                    Name   = $svc.Name
                    Status = "$($svc.Status)"
                }
            }
        }
    )
}

Add-PodeRoute -Method Get -Path '/test' -Authentication 'IISAuth' -ScriptBlock {
    Write-PodeJsonResponse -Value @{ User = $WebEvent.Auth.User }
}

}

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions