Private/Get-DuneAuthUrl.ps1
|
<#
.SYNOPSIS Return the Dune authentication URL for the specified instance. .DESCRIPTION Maps a Dune instance name (Prod, Dev, Test, Local) to the corresponding browser-based authentication login URL. .PARAMETER DuneInstance The target Dune instance. Valid values: Prod, Dev, Test, Local. .EXAMPLE PS> Get-DuneAuthUrl -DuneInstance Prod Returns the production login URL. #> function Get-DuneAuthUrl { param( [Parameter(Mandatory)] [ValidateSet("Prod", "Dev","Test","Local")] [string]$DuneInstance ) switch ($DuneInstance) { 'Prod' { return 'https://duneframework.com/gui/authentication/login-minimized' } 'Dev' { return 'https://dev.duneframework.com/gui/authentication/login-minimized' } 'Test' { return 'https://test.duneframework.com/gui/authentication/login-minimized' } 'Local' { return 'https://localhost:5001/gui/authentication/login-minimized' } } } |