Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
Update library to 4.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jazuntee committed Oct 16, 2020
1 parent f9641ad commit 57d1432
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Identity.Client" version="4.19.0" />
<package id="Microsoft.Identity.Client" version="4.21.0" />
<!-- <package id="System.Security.Cryptography.ProtectedData" version="4.7.0" /> -->
</packages>
4 changes: 2 additions & 2 deletions src/Get-MsalToken.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function Get-MsalToken {

# Modifies the token acquisition request so that the acquired token is a Proof of Possession token (PoP), rather than a Bearer token.
[Parameter(Mandatory = $false)]
[System.Net.Http.HttpRequestMessage] $WithProofOfPosession,
[System.Net.Http.HttpRequestMessage] $ProofOfPossession,

# Ignore any access token in the user token cache and attempt to acquire new access token using the refresh token for the account if one is available.
[Parameter(Mandatory = $false, ParameterSetName = 'PublicClient')]
Expand Down Expand Up @@ -329,7 +329,7 @@ function Get-MsalToken {
if ($Authority) { [void] $AquireTokenParameters.WithAuthority($Authority.AbsoluteUri) }
if ($CorrelationId) { [void] $AquireTokenParameters.WithCorrelationId($CorrelationId) }
if ($ExtraQueryParameters) { [void] $AquireTokenParameters.WithExtraQueryParameters((ConvertTo-Dictionary $ExtraQueryParameters -KeyType ([string]) -ValueType ([string]))) }
if ($WithProofOfPosession) { [void] $AquireTokenParameters.WithProofOfPosession($WithProofOfPosession) }
if ($ProofOfPossession) { [void] $AquireTokenParameters.WithProofOfPosession($ProofOfPossession) }
Write-Debug ('Aquiring Token for Application with ClientId [{0}]' -f $ClientApplication.ClientId)
if (!$Timeout) { $Timeout = [timespan]::Zero }

Expand Down
6 changes: 3 additions & 3 deletions src/MSAL.PS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
RootModule = 'MSAL.PS.psm1'

# Version number of this module.
ModuleVersion = '4.19.0'
ModuleVersion = '4.21.0'

# Supported PSEditions
CompatiblePSEditions = 'Core','Desktop'
Expand Down Expand Up @@ -115,8 +115,8 @@ AliasesToExport = @()

# List of all files packaged with this module
FileList = @(
'..\build\packages\Microsoft.Identity.Client.4.19.0\lib\netcoreapp2.1\Microsoft.Identity.Client.dll'
'..\build\packages\Microsoft.Identity.Client.4.19.0\lib\net45\Microsoft.Identity.Client.dll'
'..\build\packages\Microsoft.Identity.Client.4.21.0\lib\netcoreapp2.1\Microsoft.Identity.Client.dll'
'..\build\packages\Microsoft.Identity.Client.4.21.0\lib\net45\Microsoft.Identity.Client.dll'
#'..\build\packages\System.Security.Cryptography.ProtectedData.4.7.0\lib\netstandard1.3\System.Security.Cryptography.ProtectedData.dll'
'.\TokenCacheHelper.cs'
'.\DeviceCodeHelper.cs'
Expand Down
8 changes: 7 additions & 1 deletion src/New-MsalClientApplication.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function New-MsalClientApplication {
# Address of the authority to issue token.
[Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true)]
[uri] $Authority,
# Use Platform Authentication Broker
#[Parameter(Mandatory = $false, ParameterSetName = 'PublicClient', ValueFromPipelineByPropertyName = $true)]
#[Parameter(Mandatory = $false, ParameterSetName = 'PublicClient-InputObject', ValueFromPipelineByPropertyName = $true)]
#[switch] $AuthenticationBroker,
# Sets Extra Query Parameters for the query string in the HTTP authentication request.
[Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true)]
[hashtable] $ExtraQueryParameters,
Expand Down Expand Up @@ -89,8 +93,10 @@ function New-MsalClientApplication {
$ClientApplicationBuilder = [Microsoft.Identity.Client.PublicClientApplicationBuilder]::Create($ClientId)
}

if ($PSBoundParameters.ContainsKey('EnableExperimentalFeatures')) { [void] $ClientApplicationBuilder.WithExperimentalFeatures($EnableExperimentalFeatures) } # Must be called before other experimental features
if ($RedirectUri) { [void] $ClientApplicationBuilder.WithRedirectUri($RedirectUri.AbsoluteUri) }
elseif (!$PublicClientOptions -or !$PublicClientOptions.RedirectUri) { [void] $ClientApplicationBuilder.WithDefaultRedirectUri() }
if ($PSBoundParameters.ContainsKey('AuthenticationBroker')) { [void] $ClientApplicationBuilder.WithBroker($AuthenticationBroker) }

$ClientOptions = $PublicClientOptions
}
Expand All @@ -102,6 +108,7 @@ function New-MsalClientApplication {
$ClientApplicationBuilder = [Microsoft.Identity.Client.ConfidentialClientApplicationBuilder]::Create($ClientId)
}

if ($PSBoundParameters.ContainsKey('EnableExperimentalFeatures')) { [void] $ClientApplicationBuilder.WithExperimentalFeatures($EnableExperimentalFeatures) } # Must be called before other experimental features
if ($ClientSecret) { [void] $ClientApplicationBuilder.WithClientSecret((ConvertFrom-SecureStringAsPlainText $ClientSecret -Force)) }
if ($ClientAssertion) { [void] $ClientApplicationBuilder.WithClientAssertion($ClientAssertion) }
if ($ClientClaims) { [void] $ClientApplicationBuilder.WithClientClaims($ClientCertificate, (ConvertTo-Dictionary $ClientClaims -KeyType ([string]) -ValueType ([string]))) }
Expand All @@ -120,7 +127,6 @@ function New-MsalClientApplication {
[void] $ClientApplicationBuilder.WithClientVersion($PSVersionTable.PSVersion)
}
if ($ExtraQueryParameters) { [void] $ClientApplicationBuilder.WithExtraQueryParameters((ConvertTo-Dictionary $ExtraQueryParameters -KeyType ([string]) -ValueType ([string]))) }
if ($PSBoundParameters.ContainsKey('EnableExperimentalFeatures')) { [void] $ClientApplicationBuilder.WithExperimentalFeatures($EnableExperimentalFeatures) }
#[void] $ClientApplicationBuilder.WithLogging($null, [Microsoft.Identity.Client.LogLevel]::Verbose, $false, $true)

$ClientApplication = $ClientApplicationBuilder.Build()
Expand Down

0 comments on commit 57d1432

Please sign in to comment.