icinga-powershell-framework/lib/webserver/Send-IcingaWebAuthMessage.psm1
Lord Hepipud 3d875639e4 Feature Requests: Add Proxy Server support
Also re-arranges web content by using old content from lib/web into lib/webserver, while new lib/web contains the proxy configuration.
Fixes #19
2020-11-19 17:16:33 +01:00

32 lines
856 B
PowerShell

<#
.SYNOPSIS
Sends a basic auth request back to the client
.DESCRIPTION
Sends a basic auth request back to the client
.FUNCTIONALITY
Sends a basic auth request back to the client
.EXAMPLE
PS>Send-IcingaWebAuthMessage -Connection $Connection;
.PARAMETER Connection
The connection data of the Framework containing the client and stream object
.INPUTS
System.Hashtable
.OUTPUTS
Null
.LINK
https://github.com/Icinga/icinga-powershell-framework
#>
function Send-IcingaWebAuthMessage()
{
param (
[Hashtable]$Connection = @{}
);
Send-IcingaTCPClientMessage -Message (
New-IcingaTCPClientRESTMessage `
-HTTPResponse ($IcingaHTTPEnums.HTTPResponseType.Unauthorized) `
-ContentBody 'Please provide your credentials for login.' `
-BasicAuth
) -Stream $Connection.Stream;
}