diff --git a/Tests/Add-PASPublicSSHKey.Tests.ps1 b/Tests/Add-PASPublicSSHKey.Tests.ps1 index ea127d1c..b08c29a7 100644 --- a/Tests/Add-PASPublicSSHKey.Tests.ps1 +++ b/Tests/Add-PASPublicSSHKey.Tests.ps1 @@ -90,7 +90,7 @@ Describe $($PSCommandPath -Replace '.Tests.ps1') { Assert-MockCalled Invoke-PASRestMethod -ParameterFilter { - $URI -eq "$($Script:psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/SomeUser%40domain.com/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/" + $URI -eq "$($Script:psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/SomeUser%40domain.com/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys" } -Times 1 -Exactly -Scope It diff --git a/Tests/Get-PASPublicSSHKey.Tests.ps1 b/Tests/Get-PASPublicSSHKey.Tests.ps1 index bbf05c23..40a85d50 100644 --- a/Tests/Get-PASPublicSSHKey.Tests.ps1 +++ b/Tests/Get-PASPublicSSHKey.Tests.ps1 @@ -85,7 +85,7 @@ Describe $($PSCommandPath -Replace '.Tests.ps1') { Assert-MockCalled Invoke-PASRestMethod -ParameterFilter { - $URI -eq "$($Script:psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/SomeUser%40domain.com/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/" + $URI -eq "$($Script:psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/SomeUser%40domain.com/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys" } -Times 1 -Exactly -Scope It diff --git a/Tests/Remove-PASPublicSSHKey.Tests.ps1 b/Tests/Remove-PASPublicSSHKey.Tests.ps1 index 5409e4ec..22b1c20a 100644 --- a/Tests/Remove-PASPublicSSHKey.Tests.ps1 +++ b/Tests/Remove-PASPublicSSHKey.Tests.ps1 @@ -86,7 +86,7 @@ Describe $($PSCommandPath -Replace '.Tests.ps1') { Assert-MockCalled Invoke-PASRestMethod -ParameterFilter { - $URI -eq "$($Script:psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/SomeUser%40domain.com/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/SomeKeyID/" + $URI -eq "$($Script:psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/SomeUser%40domain.com/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/SomeKeyID" } -Times 1 -Exactly -Scope It diff --git a/psPAS/Functions/Authentication/Add-PASPublicSSHKey.ps1 b/psPAS/Functions/Authentication/Add-PASPublicSSHKey.ps1 index f3f5594c..a14ccc57 100644 --- a/psPAS/Functions/Authentication/Add-PASPublicSSHKey.ps1 +++ b/psPAS/Functions/Authentication/Add-PASPublicSSHKey.ps1 @@ -25,7 +25,7 @@ function Add-PASPublicSSHKey { #Create URL to endpoint for request $URI = "$($psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/$($UserName | - Get-EscapedString)/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/" + Get-EscapedString)/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys" #create request body $Body = @{ diff --git a/psPAS/Functions/Authentication/Get-PASPublicSSHKey.ps1 b/psPAS/Functions/Authentication/Get-PASPublicSSHKey.ps1 index 9a69f3e2..b1e49061 100644 --- a/psPAS/Functions/Authentication/Get-PASPublicSSHKey.ps1 +++ b/psPAS/Functions/Authentication/Get-PASPublicSSHKey.ps1 @@ -18,7 +18,7 @@ function Get-PASPublicSSHKey { #Create URL for request $URI = "$($psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/$($UserName | - Get-EscapedString)/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/" + Get-EscapedString)/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys" #Send request to web service $result = Invoke-PASRestMethod -Uri $URI -Method GET diff --git a/psPAS/Functions/Authentication/Remove-PASPublicSSHKey.ps1 b/psPAS/Functions/Authentication/Remove-PASPublicSSHKey.ps1 index 432c1c03..25288160 100644 --- a/psPAS/Functions/Authentication/Remove-PASPublicSSHKey.ps1 +++ b/psPAS/Functions/Authentication/Remove-PASPublicSSHKey.ps1 @@ -24,7 +24,7 @@ function Remove-PASPublicSSHKey { #Create URL string for request $URI = "$($psPASSession.BaseURI)/WebServices/PIMServices.svc/Users/$($UserName | - Get-EscapedString)/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/$KeyID/" + Get-EscapedString)/AuthenticationMethods/SSHKeyAuthentication/AuthorizedKeys/$KeyID" if ($PSCmdlet.ShouldProcess($KeyID, 'Delete Public SSH Key')) {