Skip to content

Commit 3c4e392

Browse files
Merge pull request #68 from jmilczek/master
Merge for 1.1.7
2 parents a99acee + 74b27e8 commit 3c4e392

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scripts/Get-IdentityNowAuth.ps1

+5-5
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
159159
if ($IdentityNowConfiguration.AdminCredential -and $IdentityNowConfiguration.AdminCredential.UserName -and $IdentityNowConfiguration.AdminCredential.Password) {
160160
# IdentityNow Admin User
161161
$adminUSR = [string]$IdentityNowConfiguration.AdminCredential.UserName.ToLower()
162-
$adminPWDClear = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.AdminCredential.Password))
162+
$adminPWDClear = [System.Runtime.InteropServices.marshal]::PtrToStringBSTR([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.AdminCredential.Password))
163163

164164
# Generate the account hash
165165
$hashUser = Get-HashString $adminUSR.ToLower()
@@ -170,7 +170,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
170170
}
171171

172172
if ($IdentityNowConfiguration.v3 -and $IdentityNowConfiguration.v3.Username -and $IdentityNowConfiguration.v3.Password) {
173-
$clientSecretv3 = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.v3.Password))
173+
$clientSecretv3 = [System.Runtime.InteropServices.marshal]::PtrToStringBSTR([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.v3.Password))
174174
# Basic Auth
175175
$Bytesv3 = [System.Text.Encoding]::utf8.GetBytes("$($IdentityNowConfiguration.v3.UserName):$($clientSecretv3)")
176176
$encodedAuthv3 = [Convert]::ToBase64String($Bytesv3)
@@ -212,7 +212,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
212212
}
213213
elseif ($oAuthTokenBody.client_id -eq $IdentityNowConfiguration.PAT.UserName) {
214214
Write-Verbose "AuthType: Personal Access Token"
215-
$oAuthTokenBody.client_secret = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password))
215+
$oAuthTokenBody.client_secret = [System.Runtime.InteropServices.marshal]::PtrToStringBSTR([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password))
216216
}
217217
}
218218
}
@@ -221,7 +221,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
221221
$oAuthTokenBody = @{
222222
grant_type = "client_credentials"
223223
client_id = $IdentityNowConfiguration.PAT.UserName
224-
client_secret = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password))
224+
client_secret = [System.Runtime.InteropServices.marshal]::PtrToStringBSTR([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password))
225225
}
226226
}
227227
else {
@@ -261,7 +261,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
261261
# v2 Auth
262262
# Check to see if v2 API Client exists before generating v2 Headers
263263
if ($IdentityNowConfiguration.v2) {
264-
$clientSecretv2 = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.v2.Password))
264+
$clientSecretv2 = [System.Runtime.InteropServices.marshal]::PtrToStringBSTR([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.v2.Password))
265265
$Bytes = [System.Text.Encoding]::utf8.GetBytes("$($IdentityNowConfiguration.v2.UserName):$($clientSecretv2)")
266266
$encodedAuth = [Convert]::ToBase64String($Bytes)
267267
Write-Verbose "AuthType: v2 Basic Auth"

scripts/Test-IdentityNowCredentials.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function Test-IdentityNowCredentials {
6464
$oAuthTokenBody = @{
6565
grant_type = "client_credentials"
6666
client_id = $IdentityNowConfiguration.PAT.UserName
67-
client_secret = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password))
67+
client_secret = [System.Runtime.InteropServices.marshal]::PtrToStringBSTR([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password))
6868
}
6969

7070
$v3PAT = Invoke-RestMethod -Uri $oAuthURI -Method Post -Body $oAuthTokenBody

0 commit comments

Comments
 (0)