Token feature update (#255)
This commit is contained in:
Родитель
8cc860afeb
Коммит
3fc6b82d63
|
@ -28,8 +28,9 @@ Connect-PartnerCenter -AccessToken <String> [-Environment <EnvironmentName>] [-T
|
|||
|
||||
### RefreshToken
|
||||
```powershell
|
||||
Connect-PartnerCenter -ApplicationId <String> [-Credential <PSCredential>] [-Environment <EnvironmentName>]
|
||||
-RefreshToken <String> [-Tenant <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
Connect-PartnerCenter -ApplicationId <String> [-CertificateThumbprint <String>] [-Credential <PSCredential>]
|
||||
[-Environment <EnvironmentName>] -RefreshToken <String> [-Tenant <String>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### ServicePrincipalCertificate
|
||||
|
@ -121,6 +122,18 @@ Accept wildcard characters: False
|
|||
### -CertificateThumbprint
|
||||
Certificate Hash (Thumbprint)
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: RefreshToken
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: ServicePrincipalCertificate
|
||||
|
|
|
@ -22,9 +22,9 @@ New-PartnerAccessToken -AccessToken <String> -ApplicationId <String> [-Credentia
|
|||
|
||||
### RefreshToken
|
||||
```powershell
|
||||
New-PartnerAccessToken [-ApplicationId <String>] [-Credential <PSCredential>] [-Environment <EnvironmentName>]
|
||||
[-Module <ModuleName>] -RefreshToken <String> -Scopes <String[]> [-ServicePrincipal] [-Tenant <String>]
|
||||
[<CommonParameters>]
|
||||
New-PartnerAccessToken [-ApplicationId <String>] [-CertificateThumbprint <String>] [-Credential <PSCredential>]
|
||||
[-Environment <EnvironmentName>] [-Module <ModuleName>] -RefreshToken <String> -Scopes <String[]>
|
||||
[-ServicePrincipal] [-Tenant <String>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### ServicePrincipal
|
||||
|
@ -47,8 +47,8 @@ New-PartnerAccessToken -ApplicationId <String> [-Environment <EnvironmentName>]
|
|||
|
||||
### ByModule
|
||||
```powershell
|
||||
New-PartnerAccessToken [-Environment <EnvironmentName>] -Module <ModuleName> -Scopes <String[]>
|
||||
[-Tenant <String>] [-UseAuthorizationCode] [<CommonParameters>]
|
||||
New-PartnerAccessToken [-Environment <EnvironmentName>] -Module <ModuleName> [-Tenant <String>]
|
||||
[-UseAuthorizationCode] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
@ -122,6 +122,18 @@ Accept wildcard characters: False
|
|||
### -CertificateThumbprint
|
||||
Certificate Hash (Thumbprint)
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: RefreshToken
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: ServicePrincipalCertificate
|
||||
|
@ -226,7 +238,7 @@ Scopes requested to access a protected API.
|
|||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Parameter Sets: AccessToken, RefreshToken, ServicePrincipal, ServicePrincipalCertificate, User
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
|
|
|
@ -115,7 +115,11 @@ namespace Microsoft.Store.PartnerCenter.PowerShell.Commands
|
|||
/// <summary>
|
||||
/// Gets or sets the scopes used for authentication.
|
||||
/// </summary>
|
||||
[Parameter(HelpMessage = "Scopes requested to access a protected API.", Mandatory = true)]
|
||||
[Parameter(HelpMessage = "Scopes requested to access a protected API.", Mandatory = true, ParameterSetName = AccessTokenParameterSet)]
|
||||
[Parameter(HelpMessage = "Scopes requested to access a protected API.", Mandatory = true, ParameterSetName = RefreshTokenParameterSet)]
|
||||
[Parameter(HelpMessage = "Scopes requested to access a protected API.", Mandatory = true, ParameterSetName = ServicePrincipalParameterSet)]
|
||||
[Parameter(HelpMessage = "Scopes requested to access a protected API.", Mandatory = true, ParameterSetName = ServicePrincipalCertificateParameterSet)]
|
||||
[Parameter(HelpMessage = "Scopes requested to access a protected API.", Mandatory = true, ParameterSetName = UserParameterSet)]
|
||||
public string[] Scopes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace Microsoft.Store.PartnerCenter.PowerShell.Commands
|
|||
|
||||
if (!string.IsNullOrEmpty(PartnerSession.Instance?.Context?.Account?.Identifier))
|
||||
{
|
||||
qosEvent.UserId = GenerateSha256HashString(PartnerSession.Instance.Context.Account.Identifier);
|
||||
qosEvent.UserId = GenerateSha256HashString(PartnerSession.Instance.Context.Account.Identifier)?.Replace("-", string.Empty)?.ToLowerInvariant();
|
||||
}
|
||||
|
||||
if (MyInvocation != null && MyInvocation.BoundParameters != null && MyInvocation.BoundParameters.Keys != null)
|
||||
|
@ -271,7 +271,6 @@ namespace Microsoft.Store.PartnerCenter.PowerShell.Commands
|
|||
base.StopProcessing();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Terminate the command and report an error.
|
||||
/// </summary>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 01/08/2010
|
||||
# Generated on: 01/10/2010
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -11,7 +11,7 @@
|
|||
RootModule = 'PartnerCenter.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '3.0.4'
|
||||
ModuleVersion = '3.0.5'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 01/08/2020
|
||||
# Generated on: 01/10/2020
|
||||
#
|
||||
|
||||
$PSDefaultParameterValues.Clear()
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>$(RepoArtifacts)$(Configuration)\</OutputPath>
|
||||
<PublishDir>$(OutputPath)</PublishDir>
|
||||
<Version>3.0.4</Version>
|
||||
<Version>3.0.5</Version>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче