Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net i…
Browse files Browse the repository at this point in the history
…nto feature/mgmt-track2
  • Loading branch information
m-nash committed May 5, 2021
2 parents fa267f0 + 459e239 commit 72930a1
Show file tree
Hide file tree
Showing 35 changed files with 1,134 additions and 1,904 deletions.
2 changes: 1 addition & 1 deletion eng/Directory.Build.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Setup project type properties -->
<PropertyGroup>
<IsMgmtLibrary Condition="'$(IsMgmtLibrary)' == '' and $(MSBuildProjectName.StartsWith('Azure.ResourceManager.'))">true</IsMgmtLibrary>
<MgmtAutorestVersion>3.0.0-beta.20210319.1</MgmtAutorestVersion>
<MgmtAutorestVersion>3.0.0-beta.20210504.1</MgmtAutorestVersion>

<!-- Client in this context is any library that is following the new Azure SDK guidelines -->
<IsClientLibrary Condition="'$(IsClientLibrary)' == '' and $(MSBuildProjectName.StartsWith('Azure.'))">true</IsClientLibrary>
Expand Down
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
All should have PrivateAssets="All" set so they don't become pacakge dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210503.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20210504.2" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20210322.2" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1890,10 +1890,28 @@ public ContainerServiceLinuxProfile(string adminUsername, Azure.ResourceManager.
public partial class ContainerServiceMasterProfile
{
public ContainerServiceMasterProfile(string dnsPrefix) { }
public Azure.ResourceManager.Compute.Models.Enum31? Count { get { throw null; } set { } }
public Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount? Count { get { throw null; } set { } }
public string DnsPrefix { get { throw null; } set { } }
public string Fqdn { get { throw null; } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct ContainerServiceMasterProfileCount : System.IEquatable<Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount>
{
private readonly int _dummyPrimitive;
public ContainerServiceMasterProfileCount(int value) { throw null; }
public static Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount Five { get { throw null; } }
public static Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount One { get { throw null; } }
public static Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount Three { get { throw null; } }
public bool Equals(Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object obj) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
public static bool operator ==(Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount left, Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount right) { throw null; }
public static implicit operator Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount (int value) { throw null; }
public static bool operator !=(Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount left, Azure.ResourceManager.Compute.Models.ContainerServiceMasterProfileCount right) { throw null; }
public override string ToString() { throw null; }
}
public partial class ContainerServiceOrchestratorProfile
{
public ContainerServiceOrchestratorProfile(Azure.ResourceManager.Compute.Models.ContainerServiceOrchestratorTypes orchestratorType) { }
Expand Down Expand Up @@ -2383,24 +2401,6 @@ public EncryptionSettingsElement() { }
public static bool operator !=(Azure.ResourceManager.Compute.Models.EncryptionType left, Azure.ResourceManager.Compute.Models.EncryptionType right) { throw null; }
public override string ToString() { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct Enum31 : System.IEquatable<Azure.ResourceManager.Compute.Models.Enum31>
{
private readonly int _dummyPrimitive;
public Enum31(int value) { throw null; }
public static Azure.ResourceManager.Compute.Models.Enum31 Five { get { throw null; } }
public static Azure.ResourceManager.Compute.Models.Enum31 One { get { throw null; } }
public static Azure.ResourceManager.Compute.Models.Enum31 Three { get { throw null; } }
public bool Equals(Azure.ResourceManager.Compute.Models.Enum31 other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object obj) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override int GetHashCode() { throw null; }
public static bool operator ==(Azure.ResourceManager.Compute.Models.Enum31 left, Azure.ResourceManager.Compute.Models.Enum31 right) { throw null; }
public static implicit operator Azure.ResourceManager.Compute.Models.Enum31 (int value) { throw null; }
public static bool operator !=(Azure.ResourceManager.Compute.Models.Enum31 left, Azure.ResourceManager.Compute.Models.Enum31 right) { throw null; }
public override string ToString() { throw null; }
}
public partial class Gallery : Azure.ResourceManager.Compute.Models.Resource
{
public Gallery(string location) : base (default(string)) { }
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Azure.Containers.ContainerRegistry
/// Step 5: GET /api/v1/acr/repositories
/// Request Header: { Bearer acrTokenAccess }
/// </summary>
internal class ContainerRegistryChallengeAuthenticationPolicy : BearerTokenChallengeAuthenticationPolicy
internal class ContainerRegistryChallengeAuthenticationPolicy : BearerTokenAuthenticationPolicy
{
private readonly IContainerRegistryAuthenticationClient _authenticationClient;

Expand All @@ -44,7 +44,13 @@ public ContainerRegistryChallengeAuthenticationPolicy(TokenCredential credential
_authenticationClient = authenticationClient;
}

protected override async ValueTask<bool> AuthorizeRequestOnChallengeAsync(HttpMessage message, bool async)
protected override ValueTask<bool> AuthorizeRequestOnChallengeAsync(HttpMessage message)
=> AuthorizeRequestOnChallengeAsyncInternal(message, true);

protected override bool AuthorizeRequestOnChallenge(HttpMessage message)
=> AuthorizeRequestOnChallengeAsyncInternal(message, false).EnsureCompleted();

private async ValueTask<bool> AuthorizeRequestOnChallengeAsyncInternal(HttpMessage message, bool async)
{
// Once we're here, we've completed Step 1.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<Compile Include="$(AzureCoreSharedSources)ArrayBufferWriter.cs" LinkBase="Shared" />
<Compile Include="$(AzureCoreSharedSources)AuthorizationChallengeParser.cs" LinkBase="Shared" />
<Compile Include="$(AzureCoreSharedSources)AzureResourceProviderNamespaceAttribute.cs" LinkBase="Shared" />
<Compile Include="$(AzureCoreSharedSources)BearerTokenChallengeAuthenticationPolicy.cs" LinkBase="Shared" />
<Compile Include="$(AzureCoreSharedSources)ClientDiagnostics.cs" LinkBase="Shared" />
<Compile Include="$(AzureCoreSharedSources)ContentTypeUtilities.cs" LinkBase="Shared" />
<Compile Include="$(AzureCoreSharedSources)DiagnosticScope.cs" LinkBase="Shared" />
Expand All @@ -28,6 +27,12 @@
<Compile Include="$(AzureCoreSharedSources)PageResponseEnumerator.cs" LinkBase="Shared" />
</ItemGroup>

<!-- TODO: revert when Azure.Core ships -->
<ItemGroup>
<ProjectReference Include="..\..\..\core\Azure.Core\src\Azure.Core.csproj" />
</ItemGroup>
<!-- end TODO-->

<Import Project="$(MSBuildThisFileDirectory)..\..\..\core\Azure.Core\src\Azure.Core.props" />

</Project>
3 changes: 3 additions & 0 deletions sdk/core/Azure.Core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## 1.14.0-beta.1 (Unreleased)

### Added

- Added additional methods to `BearerTokenAuthenticationPolicy`, which enables creation of authentication policies that can handle challenges.

## 1.13.0 (2021-04-07)

Expand Down
6 changes: 6 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net461.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,12 @@ public partial class BearerTokenAuthenticationPolicy : Azure.Core.Pipeline.HttpP
{
public BearerTokenAuthenticationPolicy(Azure.Core.TokenCredential credential, System.Collections.Generic.IEnumerable<string> scopes) { }
public BearerTokenAuthenticationPolicy(Azure.Core.TokenCredential credential, string scope) { }
protected virtual void AuthorizeRequest(Azure.Core.HttpMessage message) { }
protected void AuthorizeRequest(Azure.Core.HttpMessage message, Azure.Core.TokenRequestContext context) { }
protected virtual System.Threading.Tasks.ValueTask AuthorizeRequestAsync(Azure.Core.HttpMessage message) { throw null; }
protected System.Threading.Tasks.ValueTask AuthorizeRequestAsync(Azure.Core.HttpMessage message, Azure.Core.TokenRequestContext context) { throw null; }
protected virtual bool AuthorizeRequestOnChallenge(Azure.Core.HttpMessage message) { throw null; }
protected virtual System.Threading.Tasks.ValueTask<bool> AuthorizeRequestOnChallengeAsync(Azure.Core.HttpMessage message) { throw null; }
public override void Process(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { }
public override System.Threading.Tasks.ValueTask ProcessAsync(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { throw null; }
}
Expand Down
6 changes: 6 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.net5.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,12 @@ public partial class BearerTokenAuthenticationPolicy : Azure.Core.Pipeline.HttpP
{
public BearerTokenAuthenticationPolicy(Azure.Core.TokenCredential credential, System.Collections.Generic.IEnumerable<string> scopes) { }
public BearerTokenAuthenticationPolicy(Azure.Core.TokenCredential credential, string scope) { }
protected virtual void AuthorizeRequest(Azure.Core.HttpMessage message) { }
protected void AuthorizeRequest(Azure.Core.HttpMessage message, Azure.Core.TokenRequestContext context) { }
protected virtual System.Threading.Tasks.ValueTask AuthorizeRequestAsync(Azure.Core.HttpMessage message) { throw null; }
protected System.Threading.Tasks.ValueTask AuthorizeRequestAsync(Azure.Core.HttpMessage message, Azure.Core.TokenRequestContext context) { throw null; }
protected virtual bool AuthorizeRequestOnChallenge(Azure.Core.HttpMessage message) { throw null; }
protected virtual System.Threading.Tasks.ValueTask<bool> AuthorizeRequestOnChallengeAsync(Azure.Core.HttpMessage message) { throw null; }
public override void Process(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { }
public override System.Threading.Tasks.ValueTask ProcessAsync(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { throw null; }
}
Expand Down
6 changes: 6 additions & 0 deletions sdk/core/Azure.Core/api/Azure.Core.netcoreapp2.1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,12 @@ public partial class BearerTokenAuthenticationPolicy : Azure.Core.Pipeline.HttpP
{
public BearerTokenAuthenticationPolicy(Azure.Core.TokenCredential credential, System.Collections.Generic.IEnumerable<string> scopes) { }
public BearerTokenAuthenticationPolicy(Azure.Core.TokenCredential credential, string scope) { }
protected virtual void AuthorizeRequest(Azure.Core.HttpMessage message) { }
protected void AuthorizeRequest(Azure.Core.HttpMessage message, Azure.Core.TokenRequestContext context) { }
protected virtual System.Threading.Tasks.ValueTask AuthorizeRequestAsync(Azure.Core.HttpMessage message) { throw null; }
protected System.Threading.Tasks.ValueTask AuthorizeRequestAsync(Azure.Core.HttpMessage message, Azure.Core.TokenRequestContext context) { throw null; }
protected virtual bool AuthorizeRequestOnChallenge(Azure.Core.HttpMessage message) { throw null; }
protected virtual System.Threading.Tasks.ValueTask<bool> AuthorizeRequestOnChallengeAsync(Azure.Core.HttpMessage message) { throw null; }
public override void Process(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { }
public override System.Threading.Tasks.ValueTask ProcessAsync(Azure.Core.HttpMessage message, System.ReadOnlyMemory<Azure.Core.Pipeline.HttpPipelinePolicy> pipeline) { throw null; }
}
Expand Down
Loading

0 comments on commit 72930a1

Please sign in to comment.