PowerShell RestPS Tutorial #4 - Authentication
Автор: JackedProgrammer
Загружено: 2021-12-06
Просмотров: 2319
Описание:
In this video I go over how to add basic authentication to your REST PS deployment and add a SSL certificate to it as well to be able to use the API over https.
Encoding password :
[Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes("PasswordHere"))
Bypass self signed SSL Cert :
add-type -TypeDefinition @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
Tags:
Rest api,api,powershell,jackedprogrammer,programming,coding,scripting,restful,setup, tutorial, powershell restps, restps, https, ssl, authentication
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: