Get-AuthorizationHeader.psm1
function Get-AuthorizationHeader { Param ( [Parameter(Mandatory=$true)] [string] $ClientID, [Parameter(Mandatory=$true)] [string] $RedirectUri ) $token = Get-AuthToken -ClientID $ClientID -RedirectUri $RedirectUri $authHeader = @{ 'Content-Type'='application/json' 'Authorization'=$token.CreateAuthorizationHeader() } return $authHeader } |