ps/Modules/Alkami.DevOps.Common/Public/Get-IPSTSUrlFromClient.ps1

18 lines
615 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Get-IPSTSUrlFromClient {
<#
.SYNOPSIS
Returns the IPSTS URL based on a Client Database object
#>
[CmdletBinding()]
param(
[Parameter(Position = 0, Mandatory = $true)]
[PSObject]$Client
)
$queryString = "SELECT s.Value FROM core.ItemSetting s JOIN core.Item i on i.ID = s.ItemID JOIN core.Provider p on p.ID = i.ParentId WHERE REPLACE(p.AssemblyInfo, ' ', '') = " +
"'Alkami.Security.Provider.TokenTranslator.Entrust,Alkami.Security.Provider.TokenTranslator.Entrust.Provider' AND s.Name = 'Issuer'"
return (Invoke-QueryOnClientDatabase $client $queryString)
}