Skip to content

Commit

Permalink
♻️ UPDATE New-PASSession
Browse files Browse the repository at this point in the history
Brought info in the comment based help up to date with the new way of working with the module  and the expanded authentication options now available  in `New-PASSession`.

Rearranged the order of spme parameters. Removed `$SecureMode` & `$AdditionalInfo` parameters.
  • Loading branch information
pspete committed Jun 13, 2019
1 parent 7131cbd commit 6976278
Showing 1 changed file with 17 additions and 38 deletions.
55 changes: 17 additions & 38 deletions psPAS/Functions/Authentication/New-PASSession.ps1
Expand Up @@ -4,16 +4,16 @@
Authenticates a user to CyberArk Vault.
.DESCRIPTION
Authenticates a user to a CyberArk Vault and returns a token and a webrequest session object
that can be used in subsequent PAS Web Services calls.
Authenticates a user to a CyberArk Vault and stores an authentication token and a webrequest session object
which are used in subsequent calls to the API.
In addition, this method allows you to set a new password.
Authenticate using CyberArk, LDAP or RADIUS authentication (From CyberArk version 9.7 up).
Authenticate using CyberArk, LDAP, RADIUS, SAML or Shared authentication (From CyberArk version 9.7 up),
Windows authentication is supported (from CyberArk 10.4 up).
For CyberArk version older than 9.7:
Only CyberArk Authentication method is supported.
newPassword Parameter is not supported.
useRadiusAuthentication Parameter is not supported.
connectionNumber Parameter is not supported.
Additionally, if using CyberArk 9.7+, this function will return version information from PVWA
.PARAMETER Credential
A Valid PSCredential object.
Expand All @@ -39,12 +39,6 @@
Valid values are CyberArk, LDAP, Windows or RADIUS
Windows is only a valid option for version 10.4 onward.
.PARAMETER AdditionalInfo
The Version 10 API accepts a string value containing Additional Info
.PARAMETER SecureMode
The Version 10 API accepts a boolean value indicating true or false for SecureMode
.PARAMETER connectionNumber
In order to allow more than one connection for the same user simultaneously, each request
should be sent with different 'connectionNumber'.
Expand Down Expand Up @@ -185,21 +179,13 @@
[ValidateSet("CyberArk", "LDAP", "Windows", "RADIUS")]
[string]$type = "CyberArk",

[Parameter(
Mandatory = $false,
ValueFromPipeline = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = "v10"
)]
[string]$AdditionalInfo,

[Parameter(
[parameter(
Mandatory = $false,
ValueFromPipeline = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = "v10"
ParameterSetName = "integrated"
)]
[bool]$SecureMode,
[switch]$UseDefaultCredentials,

[Parameter(
Mandatory = $false,
Expand All @@ -210,20 +196,6 @@
[ValidateRange(1, 100)]
[int]$connectionNumber,

[Parameter(
Mandatory = $false,
ValueFromPipeline = $false,
ValueFromPipelinebyPropertyName = $false
)]
[switch]$SkipVersionCheck,

[parameter(
Mandatory = $false,
ValueFromPipeline = $false,
ValueFromPipelinebyPropertyName = $false
)]
[string]$SessionVariable = "PASSession",

[parameter(
Mandatory = $true,
ValueFromPipeline = $false,
Expand All @@ -238,13 +210,20 @@
)]
[string]$PVWAAppName = "PasswordVault",

[Parameter(
Mandatory = $false,
ValueFromPipeline = $false,
ValueFromPipelinebyPropertyName = $false
)]
[switch]$SkipVersionCheck,

[parameter(
Mandatory = $false,
ValueFromPipeline = $false,
ValueFromPipelinebyPropertyName = $true,
ParameterSetName = "integrated"
ValueFromPipelinebyPropertyName = $false
)]
[switch]$UseDefaultCredentials
[string]$SessionVariable = "PASSession"

)

BEGIN {
Expand Down

0 comments on commit 6976278

Please sign in to comment.