From be7b38bb49ddc6a5aa0efba68521bbd8605d1f5e Mon Sep 17 00:00:00 2001 From: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:29:36 -0500 Subject: [PATCH 1/7] add authorizationprovider tests Add tests for API Management Authorizations feature. --- .../AuthorizationProviderTests.cs | 446 ++++++++++++++++++ 1 file changed, 446 insertions(+) create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs new file mode 100644 index 000000000000..2eed2a5af9c1 --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using System.IO; +using System.Net; +using System.Threading.Tasks; +using Xunit; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class AuthorizationProviderTests : TestBase + { + [Fact] + [Trait("owner", "loganzipkes")] + public async Task AuthorizationProviderCreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType())) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list all authorization provider + var listResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.Empty(listResponse.Body); + + // create authorization provider + string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); + try + { + var authorizationProviderContract = new AuthorizationProviderContract + { + DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), + IdentityProvider = TestUtilities.GenerateName("identityProvider"), + Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } + }; + + var createResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationProviderContract); + + Assert.NotNull(createResponse); + + // get authorization provider to check if it was created + var getResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(authorizationProviderId, getResponse.Body.Id); + Assert.Equal(authorizationProviderContract.DisplayName, getResponse.Body.DisplayName); + Assert.Equal(authorizationProviderContract.IdentityProvider, getResponse.Body.IdentityProvider); + Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getResponse.Body.Oauth2.RedirectUrl); + + // list authorization providers again + listResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(listResponse); + Assert.NotEmpty(listResponse.Body); + + var updateParameters = new AuthorizationProviderContract + { + DisplayName = TestUtilities.GenerateName("newAuthorizationProviderDisplayName"), + }; + + // update authorization provider + await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + updateParameters, + getResponse.Headers.ETag); + + // get authorization provider to validate that it was updated + getResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(authorizationProviderId, getResponse.Body.Id); + Assert.Equal(updateParameters.DisplayName, getResponse.Body.DisplayName); + Assert.Equal(authorizationProviderContract.IdentityProvider, getResponse.Body.IdentityProvider); + Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getResponse.Body.Oauth2.RedirectUrl); + + // delete authorization provider + await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + getResponse.Headers.ETag); + + // get authorization provider to check if it was deleted + try + { + await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + throw new System.Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + } + finally + { + // delete authorization provider to ensure clean up + await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + "*"); + } + } + } + + [Fact] + [Trait("owner", "loganzipkes")] + public async Task AuthorizationCreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType())) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // create parent authorization provider + string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); + try + { + var createAuthorizationProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + new AuthorizationProviderContract + { + DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), + IdentityProvider = TestUtilities.GenerateName("identityProvider"), + Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } + }); + + // list all authorizations + var listResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + null); + + // create authorization + string authorizationId = TestUtilities.GenerateName("authorizationId"); + var authorizationContract = new AuthorizationContract + { + AuthorizationType = AuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode + }; + + var createAuthorizationResponse = await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + authorizationContract); + + Assert.NotNull(createAuthorizationResponse); + + // get authorization to validate that it was created + var getResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(authorizationId, getResponse.Body.Id); + Assert.Equal(authorizationContract.AuthorizationType, getResponse.Body.AuthorizationType); + Assert.Equal(authorizationContract.OAuth2GrantType, getResponse.Body.OAuth2GrantType); + + // list authorizations again + listResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + null); + + Assert.NotNull(listResponse); + Assert.NotEmpty(listResponse.Body); + + // update authorization + var updateParameters = new AuthorizationContract + { + AuthorizationType = AuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.ClientCredentials + }; + + await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + updateParameters, + getResponse.Headers.ETag); + + // get authorization to validate that it was updated + getResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(authorizationId, getResponse.Body.Id); + Assert.Equal(updateParameters.AuthorizationType, getResponse.Body.AuthorizationType); + Assert.Equal(updateParameters.OAuth2GrantType, getResponse.Body.OAuth2GrantType); + + // delete authorization + await testBase.client.Authorization.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + getResponse.Headers.ETag); + + // get authorization to validate that it was deleted + try + { + await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + } + finally + { + // delete authorization provider to ensure cascade clean up + await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + "*"); + } + } + } + + [Fact] + [Trait("owner", "loganzipkes")] + public async Task AccessPolicyCreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType())) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // create parent authorization provider + string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); + + try + { + var createAuthorizationProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + new AuthorizationProviderContract + { + DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), + IdentityProvider = TestUtilities.GenerateName("identityProvider"), + Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } + }); + + var authorizationId = TestUtilities.GenerateName("authorizationId"); + var createAuthorizationResponse = await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + new AuthorizationContract + { + AuthorizationType = AuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode + }); + + // list all access policies + var listResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + null); + + Assert.NotNull(listResponse); + Assert.Empty(listResponse.Body); + + // create access policy + var accessPolicyId = TestUtilities.GenerateName("accessPolicyId"); + var accessPolicyContract = new AuthorizationAccessPolicyContract + { + TenantId = TestUtilities.GenerateName("tenantId"), + ObjectId = TestUtilities.GenerateName("objectId") + }; + + var createResponse = await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId, + accessPolicyContract); + + Assert.NotNull(createResponse); + + // get access policy to validate that it was created + var getResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(accessPolicyId, getResponse.Body.Id); + Assert.Equal(accessPolicyContract.TenantId, getResponse.Body.TenantId); + Assert.Equal(accessPolicyContract.ObjectId, getResponse.Body.ObjectId); + + // list access policies again + listResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + null); + + Assert.NotNull(listResponse); + Assert.NotEmpty(listResponse.Body); + + // update access policies + var updateParameters = new AuthorizationAccessPolicyContract + { + TenantId = TestUtilities.GenerateName("newTenantId"), + ObjectId = TestUtilities.GenerateName("objectId") + }; + + await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId, + updateParameters, + getResponse.Headers.ETag); + + // get access policy to validate that it was updated + getResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId); + + Assert.NotNull(getResponse); + Assert.NotNull(getResponse.Headers.ETag); + Assert.NotNull(getResponse.Body); + + Assert.Equal(accessPolicyId, getResponse.Body.Id); + Assert.Equal(updateParameters.TenantId, getResponse.Body.TenantId); + Assert.Equal(updateParameters.ObjectId, getResponse.Body.ObjectId); + + // delete access policy + await testBase.client.AuthorizationAccessPolicy.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId, + getResponse.Headers.ETag); + + // get access policy to validate that it was deleted + try + { + await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId); + + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + } + finally + { + // delete authorization provider to ensure cascade clean up + await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + "*"); + } + } + } + } +} \ No newline at end of file From 41ead84688e353b2813c75837b640a0998c0d8ff Mon Sep 17 00:00:00 2001 From: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:50:57 -0500 Subject: [PATCH 2/7] consolidate tests into one test --- .../AuthorizationProviderTests.cs | 413 +++++++----------- 1 file changed, 164 insertions(+), 249 deletions(-) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs index 2eed2a5af9c1..aa5d27e06034 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs @@ -25,16 +25,16 @@ public async Task AuthorizationProviderCreateListUpdateDelete() var testBase = new ApiManagementTestBase(context); testBase.TryCreateApiManagementService(); - // list all authorization provider - var listResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( + // list all authorization providers + var authProviderlistResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, null); - Assert.NotNull(listResponse); - Assert.Empty(listResponse.Body); + Assert.NotNull(authProviderlistResponse); + Assert.Empty(authProviderlistResponse.Body); - // create authorization provider + // create authorization providers string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); try { @@ -45,133 +45,48 @@ public async Task AuthorizationProviderCreateListUpdateDelete() Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } }; - var createResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + var createAuthProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, authorizationProviderContract); - Assert.NotNull(createResponse); + Assert.NotNull(createAuthProviderResponse); // get authorization provider to check if it was created - var getResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + var getAuthProviderResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId); - Assert.NotNull(getResponse); - Assert.NotNull(getResponse.Headers.ETag); - Assert.NotNull(getResponse.Body); + Assert.NotNull(getAuthProviderResponse); + Assert.NotNull(getAuthProviderResponse.Headers.ETag); + Assert.NotNull(getAuthProviderResponse.Body); - Assert.Equal(authorizationProviderId, getResponse.Body.Id); - Assert.Equal(authorizationProviderContract.DisplayName, getResponse.Body.DisplayName); - Assert.Equal(authorizationProviderContract.IdentityProvider, getResponse.Body.IdentityProvider); - Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getResponse.Body.Oauth2.RedirectUrl); + Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); + Assert.Equal(authorizationProviderContract.DisplayName, getAuthProviderResponse.Body.DisplayName); + Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); + Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); // list authorization providers again - listResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( + authProviderlistResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, null); - Assert.NotNull(listResponse); - Assert.NotEmpty(listResponse.Body); + Assert.NotNull(authProviderlistResponse); + Assert.NotEmpty(authProviderlistResponse.Body); - var updateParameters = new AuthorizationProviderContract - { - DisplayName = TestUtilities.GenerateName("newAuthorizationProviderDisplayName"), - }; - - // update authorization provider - await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - updateParameters, - getResponse.Headers.ETag); - - // get authorization provider to validate that it was updated - getResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId); - - Assert.NotNull(getResponse); - Assert.NotNull(getResponse.Headers.ETag); - Assert.NotNull(getResponse.Body); - - Assert.Equal(authorizationProviderId, getResponse.Body.Id); - Assert.Equal(updateParameters.DisplayName, getResponse.Body.DisplayName); - Assert.Equal(authorizationProviderContract.IdentityProvider, getResponse.Body.IdentityProvider); - Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getResponse.Body.Oauth2.RedirectUrl); - - // delete authorization provider - await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - getResponse.Headers.ETag); - - // get authorization provider to check if it was deleted - try - { - await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId); - - throw new System.Exception("This code should not have been executed."); - } - catch (ErrorResponseException ex) - { - Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); - } - } - finally - { - // delete authorization provider to ensure clean up - await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - "*"); - } - } - } - - [Fact] - [Trait("owner", "loganzipkes")] - public async Task AuthorizationCreateListUpdateDelete() - { - Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); - using (MockContext context = MockContext.Start(this.GetType())) - { - var testBase = new ApiManagementTestBase(context); - testBase.TryCreateApiManagementService(); - - // create parent authorization provider - string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); - try - { - var createAuthorizationProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - new AuthorizationProviderContract - { - DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), - IdentityProvider = TestUtilities.GenerateName("identityProvider"), - Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } - }); - // list all authorizations - var listResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( + var authorizationlistResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, null); - // create authorization + Assert.NotNull(authorizationlistResponse); + Assert.Empty(authorizationlistResponse.Body); + string authorizationId = TestUtilities.GenerateName("authorizationId"); var authorizationContract = new AuthorizationContract { @@ -189,144 +104,40 @@ public async Task AuthorizationCreateListUpdateDelete() Assert.NotNull(createAuthorizationResponse); // get authorization to validate that it was created - var getResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( + var getAuthorizationResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, authorizationId); - Assert.NotNull(getResponse); - Assert.NotNull(getResponse.Headers.ETag); - Assert.NotNull(getResponse.Body); + Assert.NotNull(getAuthorizationResponse); + Assert.NotNull(getAuthorizationResponse.Headers.ETag); + Assert.NotNull(getAuthorizationResponse.Body); - Assert.Equal(authorizationId, getResponse.Body.Id); - Assert.Equal(authorizationContract.AuthorizationType, getResponse.Body.AuthorizationType); - Assert.Equal(authorizationContract.OAuth2GrantType, getResponse.Body.OAuth2GrantType); + Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); + Assert.Equal(authorizationContract.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); + Assert.Equal(authorizationContract.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); // list authorizations again - listResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( + authorizationlistResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, null); - Assert.NotNull(listResponse); - Assert.NotEmpty(listResponse.Body); - - // update authorization - var updateParameters = new AuthorizationContract - { - AuthorizationType = AuthorizationType.OAuth2, - OAuth2GrantType = OAuth2GrantType.ClientCredentials - }; - - await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - updateParameters, - getResponse.Headers.ETag); - - // get authorization to validate that it was updated - getResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId); - - Assert.NotNull(getResponse); - Assert.NotNull(getResponse.Headers.ETag); - Assert.NotNull(getResponse.Body); - - Assert.Equal(authorizationId, getResponse.Body.Id); - Assert.Equal(updateParameters.AuthorizationType, getResponse.Body.AuthorizationType); - Assert.Equal(updateParameters.OAuth2GrantType, getResponse.Body.OAuth2GrantType); - - // delete authorization - await testBase.client.Authorization.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - getResponse.Headers.ETag); - - // get authorization to validate that it was deleted - try - { - await testBase.client.Authorization.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId); - - throw new Exception("This code should not have been executed."); - } - catch (ErrorResponseException ex) - { - Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); - } - } - finally - { - // delete authorization provider to ensure cascade clean up - await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - "*"); - } - } - } - - [Fact] - [Trait("owner", "loganzipkes")] - public async Task AccessPolicyCreateListUpdateDelete() - { - Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); - using (MockContext context = MockContext.Start(this.GetType())) - { - var testBase = new ApiManagementTestBase(context); - testBase.TryCreateApiManagementService(); - - // create parent authorization provider - string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); - - try - { - var createAuthorizationProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - new AuthorizationProviderContract - { - DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), - IdentityProvider = TestUtilities.GenerateName("identityProvider"), - Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } - }); - - var authorizationId = TestUtilities.GenerateName("authorizationId"); - var createAuthorizationResponse = await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - new AuthorizationContract - { - AuthorizationType = AuthorizationType.OAuth2, - OAuth2GrantType = OAuth2GrantType.AuthorizationCode - }); + Assert.NotNull(authorizationlistResponse); + Assert.NotEmpty(authorizationlistResponse.Body); // list all access policies - var listResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( + var listAccessPoliciesResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, authorizationId, null); - Assert.NotNull(listResponse); - Assert.Empty(listResponse.Body); + Assert.NotNull(listAccessPoliciesResponse); + Assert.Empty(listAccessPoliciesResponse.Body); // create access policy var accessPolicyId = TestUtilities.GenerateName("accessPolicyId"); @@ -336,7 +147,7 @@ public async Task AccessPolicyCreateListUpdateDelete() ObjectId = TestUtilities.GenerateName("objectId") }; - var createResponse = await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( + var createAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, @@ -344,37 +155,37 @@ public async Task AccessPolicyCreateListUpdateDelete() accessPolicyId, accessPolicyContract); - Assert.NotNull(createResponse); + Assert.NotNull(createAccessPolicyResponse); // get access policy to validate that it was created - var getResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + var getAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, authorizationId, accessPolicyId); - Assert.NotNull(getResponse); - Assert.NotNull(getResponse.Headers.ETag); - Assert.NotNull(getResponse.Body); + Assert.NotNull(getAccessPolicyResponse); + Assert.NotNull(getAccessPolicyResponse.Headers.ETag); + Assert.NotNull(getAccessPolicyResponse.Body); - Assert.Equal(accessPolicyId, getResponse.Body.Id); - Assert.Equal(accessPolicyContract.TenantId, getResponse.Body.TenantId); - Assert.Equal(accessPolicyContract.ObjectId, getResponse.Body.ObjectId); + Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); + Assert.Equal(accessPolicyContract.TenantId, getAccessPolicyResponse.Body.TenantId); + Assert.Equal(accessPolicyContract.ObjectId, getAccessPolicyResponse.Body.ObjectId); // list access policies again - listResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( + listAccessPoliciesResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, authorizationId, null); - Assert.NotNull(listResponse); - Assert.NotEmpty(listResponse.Body); + Assert.NotNull(listAccessPoliciesResponse); + Assert.NotEmpty(listAccessPoliciesResponse.Body); // update access policies - var updateParameters = new AuthorizationAccessPolicyContract + var updateAccessPolicyParameters = new AuthorizationAccessPolicyContract { TenantId = TestUtilities.GenerateName("newTenantId"), ObjectId = TestUtilities.GenerateName("objectId") @@ -386,24 +197,24 @@ await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAs authorizationProviderId, authorizationId, accessPolicyId, - updateParameters, - getResponse.Headers.ETag); + updateAccessPolicyParameters, + getAccessPolicyResponse.Headers.ETag); // get access policy to validate that it was updated - getResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + getAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, authorizationId, accessPolicyId); - Assert.NotNull(getResponse); - Assert.NotNull(getResponse.Headers.ETag); - Assert.NotNull(getResponse.Body); + Assert.NotNull(getAccessPolicyResponse); + Assert.NotNull(getAccessPolicyResponse.Headers.ETag); + Assert.NotNull(getAccessPolicyResponse.Body); - Assert.Equal(accessPolicyId, getResponse.Body.Id); - Assert.Equal(updateParameters.TenantId, getResponse.Body.TenantId); - Assert.Equal(updateParameters.ObjectId, getResponse.Body.ObjectId); + Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); + Assert.Equal(updateAccessPolicyParameters.TenantId, getAccessPolicyResponse.Body.TenantId); + Assert.Equal(updateAccessPolicyParameters.ObjectId, getAccessPolicyResponse.Body.ObjectId); // delete access policy await testBase.client.AuthorizationAccessPolicy.DeleteWithHttpMessagesAsync( @@ -412,7 +223,7 @@ await testBase.client.AuthorizationAccessPolicy.DeleteWithHttpMessagesAsync( authorizationProviderId, authorizationId, accessPolicyId, - getResponse.Headers.ETag); + getAccessPolicyResponse.Headers.ETag); // get access policy to validate that it was deleted try @@ -430,10 +241,114 @@ await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( { Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); } + + // update authorization + var updateAuthorizationParameters = new AuthorizationContract + { + AuthorizationType = AuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.ClientCredentials + }; + + await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + updateAuthorizationParameters, + getAuthorizationResponse.Headers.ETag); + + // get authorization to validate that it was updated + getAuthorizationResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + Assert.NotNull(getAuthorizationResponse); + Assert.NotNull(getAuthorizationResponse.Headers.ETag); + Assert.NotNull(getAuthorizationResponse.Body); + + Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); + Assert.Equal(updateAuthorizationParameters.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); + Assert.Equal(updateAuthorizationParameters.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); + + // delete authorization + await testBase.client.Authorization.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + getAuthorizationResponse.Headers.ETag); + + // get authorization to validate that it was deleted + try + { + await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + + var updateAuthProviderParameters = new AuthorizationProviderContract + { + DisplayName = TestUtilities.GenerateName("newAuthorizationProviderDisplayName"), + }; + + // update authorization provider + await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + updateAuthProviderParameters, + getAuthProviderResponse.Headers.ETag); + + // get authorization provider to validate that it was updated + getAuthProviderResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + Assert.NotNull(getAuthProviderResponse); + Assert.NotNull(getAuthProviderResponse.Headers.ETag); + Assert.NotNull(getAuthProviderResponse.Body); + + Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); + Assert.Equal(updateAuthProviderParameters.DisplayName, getAuthProviderResponse.Body.DisplayName); + Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); + Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); + + // delete authorization provider + await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + getAuthProviderResponse.Headers.ETag); + + // get authorization provider to check if it was deleted + try + { + await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + throw new System.Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } } finally { - // delete authorization provider to ensure cascade clean up + // delete authorization provider to ensure clean up await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, @@ -443,4 +358,4 @@ await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( } } } -} \ No newline at end of file +} From ea38b367d28bcc10296bd85faa3f7a895393d5db Mon Sep 17 00:00:00 2001 From: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Date: Wed, 19 Apr 2023 22:36:22 -0500 Subject: [PATCH 3/7] add initial json for authorizationprovidertests --- .../CreateListUpdateDelete.json | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..0c16c63a6eae --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json @@ -0,0 +1,23 @@ +{ + "Entries": [ + + ], + "Names": { + "CreateListUpdateDelete": [ + + ] + }, + "Variables": { + "SubscriptionId": "", + "TestCertificate": "", + "TestCertificatePassword": "", + "testKeyVaultSecretUrl": "", + "TestBackupStorageAccount": "", + "TestBackupUserMsiClientId": "", + "TestBackupUserMsiResourceId": "", + "SubId": "", + "ServiceName": "", + "Location": "", + "ResourceGroup": "" + } +} From 958ebcb5e57ae8194c1b1a728e023f2a740267c5 Mon Sep 17 00:00:00 2001 From: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Date: Wed, 19 Apr 2023 23:19:36 -0500 Subject: [PATCH 4/7] add loginlinks to test --- .../AuthorizationProviderTests.cs | 735 +++++++++--------- 1 file changed, 374 insertions(+), 361 deletions(-) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs index aa5d27e06034..b0e6f5685ec0 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs @@ -1,361 +1,374 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// using ApiManagement.Management.Tests; - -using Microsoft.Azure.Management.ApiManagement.Models; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using System; -using System.IO; -using System.Net; -using System.Threading.Tasks; -using Xunit; - -namespace ApiManagement.Tests.ManagementApiTests -{ - public class AuthorizationProviderTests : TestBase - { - [Fact] - [Trait("owner", "loganzipkes")] - public async Task AuthorizationProviderCreateListUpdateDelete() - { - Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); - using (MockContext context = MockContext.Start(this.GetType())) - { - var testBase = new ApiManagementTestBase(context); - testBase.TryCreateApiManagementService(); - - // list all authorization providers - var authProviderlistResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - null); - - Assert.NotNull(authProviderlistResponse); - Assert.Empty(authProviderlistResponse.Body); - - // create authorization providers - string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); - try - { - var authorizationProviderContract = new AuthorizationProviderContract - { - DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), - IdentityProvider = TestUtilities.GenerateName("identityProvider"), - Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } - }; - - var createAuthProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationProviderContract); - - Assert.NotNull(createAuthProviderResponse); - - // get authorization provider to check if it was created - var getAuthProviderResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId); - - Assert.NotNull(getAuthProviderResponse); - Assert.NotNull(getAuthProviderResponse.Headers.ETag); - Assert.NotNull(getAuthProviderResponse.Body); - - Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); - Assert.Equal(authorizationProviderContract.DisplayName, getAuthProviderResponse.Body.DisplayName); - Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); - Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); - - // list authorization providers again - authProviderlistResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - null); - - Assert.NotNull(authProviderlistResponse); - Assert.NotEmpty(authProviderlistResponse.Body); - - // list all authorizations - var authorizationlistResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - null); - - Assert.NotNull(authorizationlistResponse); - Assert.Empty(authorizationlistResponse.Body); - - string authorizationId = TestUtilities.GenerateName("authorizationId"); - var authorizationContract = new AuthorizationContract - { - AuthorizationType = AuthorizationType.OAuth2, - OAuth2GrantType = OAuth2GrantType.AuthorizationCode - }; - - var createAuthorizationResponse = await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - authorizationContract); - - Assert.NotNull(createAuthorizationResponse); - - // get authorization to validate that it was created - var getAuthorizationResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId); - - Assert.NotNull(getAuthorizationResponse); - Assert.NotNull(getAuthorizationResponse.Headers.ETag); - Assert.NotNull(getAuthorizationResponse.Body); - - Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); - Assert.Equal(authorizationContract.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); - Assert.Equal(authorizationContract.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); - - // list authorizations again - authorizationlistResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - null); - - Assert.NotNull(authorizationlistResponse); - Assert.NotEmpty(authorizationlistResponse.Body); - - // list all access policies - var listAccessPoliciesResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - null); - - Assert.NotNull(listAccessPoliciesResponse); - Assert.Empty(listAccessPoliciesResponse.Body); - - // create access policy - var accessPolicyId = TestUtilities.GenerateName("accessPolicyId"); - var accessPolicyContract = new AuthorizationAccessPolicyContract - { - TenantId = TestUtilities.GenerateName("tenantId"), - ObjectId = TestUtilities.GenerateName("objectId") - }; - - var createAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - accessPolicyId, - accessPolicyContract); - - Assert.NotNull(createAccessPolicyResponse); - - // get access policy to validate that it was created - var getAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - accessPolicyId); - - Assert.NotNull(getAccessPolicyResponse); - Assert.NotNull(getAccessPolicyResponse.Headers.ETag); - Assert.NotNull(getAccessPolicyResponse.Body); - - Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); - Assert.Equal(accessPolicyContract.TenantId, getAccessPolicyResponse.Body.TenantId); - Assert.Equal(accessPolicyContract.ObjectId, getAccessPolicyResponse.Body.ObjectId); - - // list access policies again - listAccessPoliciesResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - null); - - Assert.NotNull(listAccessPoliciesResponse); - Assert.NotEmpty(listAccessPoliciesResponse.Body); - - // update access policies - var updateAccessPolicyParameters = new AuthorizationAccessPolicyContract - { - TenantId = TestUtilities.GenerateName("newTenantId"), - ObjectId = TestUtilities.GenerateName("objectId") - }; - - await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - accessPolicyId, - updateAccessPolicyParameters, - getAccessPolicyResponse.Headers.ETag); - - // get access policy to validate that it was updated - getAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - accessPolicyId); - - Assert.NotNull(getAccessPolicyResponse); - Assert.NotNull(getAccessPolicyResponse.Headers.ETag); - Assert.NotNull(getAccessPolicyResponse.Body); - - Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); - Assert.Equal(updateAccessPolicyParameters.TenantId, getAccessPolicyResponse.Body.TenantId); - Assert.Equal(updateAccessPolicyParameters.ObjectId, getAccessPolicyResponse.Body.ObjectId); - - // delete access policy - await testBase.client.AuthorizationAccessPolicy.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - accessPolicyId, - getAccessPolicyResponse.Headers.ETag); - - // get access policy to validate that it was deleted - try - { - await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - accessPolicyId); - - throw new Exception("This code should not have been executed."); - } - catch (ErrorResponseException ex) - { - Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); - } - - // update authorization - var updateAuthorizationParameters = new AuthorizationContract - { - AuthorizationType = AuthorizationType.OAuth2, - OAuth2GrantType = OAuth2GrantType.ClientCredentials - }; - - await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - updateAuthorizationParameters, - getAuthorizationResponse.Headers.ETag); - - // get authorization to validate that it was updated - getAuthorizationResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId); - - Assert.NotNull(getAuthorizationResponse); - Assert.NotNull(getAuthorizationResponse.Headers.ETag); - Assert.NotNull(getAuthorizationResponse.Body); - - Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); - Assert.Equal(updateAuthorizationParameters.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); - Assert.Equal(updateAuthorizationParameters.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); - - // delete authorization - await testBase.client.Authorization.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId, - getAuthorizationResponse.Headers.ETag); - - // get authorization to validate that it was deleted - try - { - await testBase.client.Authorization.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - authorizationId); - - throw new Exception("This code should not have been executed."); - } - catch (ErrorResponseException ex) - { - Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); - } - - var updateAuthProviderParameters = new AuthorizationProviderContract - { - DisplayName = TestUtilities.GenerateName("newAuthorizationProviderDisplayName"), - }; - - // update authorization provider - await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - updateAuthProviderParameters, - getAuthProviderResponse.Headers.ETag); - - // get authorization provider to validate that it was updated - getAuthProviderResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId); - - Assert.NotNull(getAuthProviderResponse); - Assert.NotNull(getAuthProviderResponse.Headers.ETag); - Assert.NotNull(getAuthProviderResponse.Body); - - Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); - Assert.Equal(updateAuthProviderParameters.DisplayName, getAuthProviderResponse.Body.DisplayName); - Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); - Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); - - // delete authorization provider - await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - getAuthProviderResponse.Headers.ETag); - - // get authorization provider to check if it was deleted - try - { - await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId); - - throw new System.Exception("This code should not have been executed."); - } - catch (ErrorResponseException ex) - { - Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); - } - } - finally - { - // delete authorization provider to ensure clean up - await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( - testBase.rgName, - testBase.serviceName, - authorizationProviderId, - "*"); - } - } - } - } -} +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// using ApiManagement.Management.Tests; + +using Microsoft.Azure.Management.ApiManagement.Models; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using System.IO; +using System.Net; +using System.Threading.Tasks; +using Xunit; + +namespace ApiManagement.Tests.ManagementApiTests +{ + public class AuthorizationProviderTests : TestBase + { + [Fact] + [Trait("owner", "loganzipkes")] + public async Task CreateListUpdateDelete() + { + Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); + using (MockContext context = MockContext.Start(this.GetType())) + { + var testBase = new ApiManagementTestBase(context); + testBase.TryCreateApiManagementService(); + + // list all authorization providers + var authProviderlistResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(authProviderlistResponse); + Assert.Empty(authProviderlistResponse.Body); + + // create authorization providers + string authorizationProviderId = TestUtilities.GenerateName("authorizationProviderId"); + try + { + var authorizationProviderContract = new AuthorizationProviderContract + { + DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), + IdentityProvider = TestUtilities.GenerateName("identityProvider"), + Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } + }; + + var createAuthProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationProviderContract); + + Assert.NotNull(createAuthProviderResponse); + + // get authorization provider to check if it was created + var getAuthProviderResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + Assert.NotNull(getAuthProviderResponse); + Assert.NotNull(getAuthProviderResponse.Headers.ETag); + Assert.NotNull(getAuthProviderResponse.Body); + + Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); + Assert.Equal(authorizationProviderContract.DisplayName, getAuthProviderResponse.Body.DisplayName); + Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); + Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); + + // list authorization providers again + authProviderlistResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + null); + + Assert.NotNull(authProviderlistResponse); + Assert.NotEmpty(authProviderlistResponse.Body); + + // list all authorizations + var authorizationlistResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + null); + + Assert.NotNull(authorizationlistResponse); + Assert.Empty(authorizationlistResponse.Body); + + string authorizationId = TestUtilities.GenerateName("authorizationId"); + var authorizationContract = new AuthorizationContract + { + AuthorizationType = AuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode + }; + + var createAuthorizationResponse = await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + authorizationContract); + + Assert.NotNull(createAuthorizationResponse); + + // get authorization to validate that it was created + var getAuthorizationResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + Assert.NotNull(getAuthorizationResponse); + Assert.NotNull(getAuthorizationResponse.Headers.ETag); + Assert.NotNull(getAuthorizationResponse.Body); + + Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); + Assert.Equal(authorizationContract.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); + Assert.Equal(authorizationContract.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); + + // list authorizations again + authorizationlistResponse = await testBase.client.Authorization.ListByAuthorizationProviderWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + null); + + Assert.NotNull(authorizationlistResponse); + Assert.NotEmpty(authorizationlistResponse.Body); + + // get login link + var getLoginLinksResponse = await testBase.client.AuthorizationLoginLinks.PostWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + new AuthorizationLoginRequestContract + { + PostLoginRedirectUrl = "https://contoso.com" + }); + + Assert.NotNull(getLoginLinksResponse); + + // list all access policies + var listAccessPoliciesResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + null); + + Assert.NotNull(listAccessPoliciesResponse); + Assert.Empty(listAccessPoliciesResponse.Body); + + // create access policy + var accessPolicyId = TestUtilities.GenerateName("accessPolicyId"); + var accessPolicyContract = new AuthorizationAccessPolicyContract + { + TenantId = TestUtilities.GenerateName("tenantId"), + ObjectId = TestUtilities.GenerateName("objectId") + }; + + var createAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId, + accessPolicyContract); + + Assert.NotNull(createAccessPolicyResponse); + + // get access policy to validate that it was created + var getAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId); + + Assert.NotNull(getAccessPolicyResponse); + Assert.NotNull(getAccessPolicyResponse.Headers.ETag); + Assert.NotNull(getAccessPolicyResponse.Body); + + Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); + Assert.Equal(accessPolicyContract.TenantId, getAccessPolicyResponse.Body.TenantId); + Assert.Equal(accessPolicyContract.ObjectId, getAccessPolicyResponse.Body.ObjectId); + + // list access policies again + listAccessPoliciesResponse = await testBase.client.AuthorizationAccessPolicy.ListByAuthorizationWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + null); + + Assert.NotNull(listAccessPoliciesResponse); + Assert.NotEmpty(listAccessPoliciesResponse.Body); + + // update access policies + var updateAccessPolicyParameters = new AuthorizationAccessPolicyContract + { + TenantId = TestUtilities.GenerateName("newTenantId"), + ObjectId = TestUtilities.GenerateName("objectId") + }; + + await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId, + updateAccessPolicyParameters, + getAccessPolicyResponse.Headers.ETag); + + // get access policy to validate that it was updated + getAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId); + + Assert.NotNull(getAccessPolicyResponse); + Assert.NotNull(getAccessPolicyResponse.Headers.ETag); + Assert.NotNull(getAccessPolicyResponse.Body); + + Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); + Assert.Equal(updateAccessPolicyParameters.TenantId, getAccessPolicyResponse.Body.TenantId); + Assert.Equal(updateAccessPolicyParameters.ObjectId, getAccessPolicyResponse.Body.ObjectId); + + // delete access policy + await testBase.client.AuthorizationAccessPolicy.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId, + getAccessPolicyResponse.Headers.ETag); + + // get access policy to validate that it was deleted + try + { + await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + accessPolicyId); + + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + + // update authorization + var updateAuthorizationParameters = new AuthorizationContract + { + AuthorizationType = AuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.ClientCredentials + }; + + await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + updateAuthorizationParameters, + getAuthorizationResponse.Headers.ETag); + + // get authorization to validate that it was updated + getAuthorizationResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + Assert.NotNull(getAuthorizationResponse); + Assert.NotNull(getAuthorizationResponse.Headers.ETag); + Assert.NotNull(getAuthorizationResponse.Body); + + Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); + Assert.Equal(updateAuthorizationParameters.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); + Assert.Equal(updateAuthorizationParameters.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); + + // delete authorization + await testBase.client.Authorization.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId, + getAuthorizationResponse.Headers.ETag); + + // get authorization to validate that it was deleted + try + { + await testBase.client.Authorization.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + authorizationId); + + throw new Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + + var updateAuthProviderParameters = new AuthorizationProviderContract + { + DisplayName = TestUtilities.GenerateName("newAuthorizationProviderDisplayName"), + }; + + // update authorization provider + await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + updateAuthProviderParameters, + getAuthProviderResponse.Headers.ETag); + + // get authorization provider to validate that it was updated + getAuthProviderResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + Assert.NotNull(getAuthProviderResponse); + Assert.NotNull(getAuthProviderResponse.Headers.ETag); + Assert.NotNull(getAuthProviderResponse.Body); + + Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); + Assert.Equal(updateAuthProviderParameters.DisplayName, getAuthProviderResponse.Body.DisplayName); + Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); + Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); + + // delete authorization provider + await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + getAuthProviderResponse.Headers.ETag); + + // get authorization provider to check if it was deleted + try + { + await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId); + + throw new System.Exception("This code should not have been executed."); + } + catch (ErrorResponseException ex) + { + Assert.Equal((int)HttpStatusCode.NotFound, (int)ex.Response.StatusCode); + } + } + finally + { + // delete authorization provider to ensure clean up + await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( + testBase.rgName, + testBase.serviceName, + authorizationProviderId, + "*"); + } + } + } + } +} From 26ce038ecef75028e459af9795d4f1f9c799fa68 Mon Sep 17 00:00:00 2001 From: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Date: Thu, 20 Apr 2023 12:06:29 -0500 Subject: [PATCH 5/7] Update CreateListUpdateDelete.json add centraluseuap region details for tests --- .../CreateListUpdateDelete.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json index 0c16c63a6eae..affbbcefdeaa 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json @@ -8,16 +8,16 @@ ] }, "Variables": { - "SubscriptionId": "", - "TestCertificate": "", - "TestCertificatePassword": "", - "testKeyVaultSecretUrl": "", - "TestBackupStorageAccount": "", - "TestBackupUserMsiClientId": "", - "TestBackupUserMsiResourceId": "", - "SubId": "", - "ServiceName": "", - "Location": "", - "ResourceGroup": "" + "SubscriptionId": "dbdbebc3-1f15-4e74-9ef2-7db25483cb15", + "TestCertificate": "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", + "TestCertificatePassword": "Password", + "testKeyVaultSecretUrl": "https://jikangsdkkeyvault.vault.azure.net/secrets/sdkcert1", + "TestBackupStorageAccount": "apimbackupmsi", + "TestBackupUserMsiClientId": "a6270d0c-7d86-478b-8cbe-dc9047ba54f7", + "TestBackupUserMsiResourceId": "/subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/net-sdk-backup-restore/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apim-backup-restore-msi", + "SubId": "dbdbebc3-1f15-4e74-9ef2-7db25483cb15", + "ServiceName": "sdktest20220801service", + "Location": "centraluseuap", + "ResourceGroup": "Apim-NetSdk-20220801" } } From 1eda473cde09d544b4c2418fb7252d289a531c51 Mon Sep 17 00:00:00 2001 From: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:58:14 -0500 Subject: [PATCH 6/7] Delete CreateListUpdateDelete.json --- .../CreateListUpdateDelete.json | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json deleted file mode 100644 index affbbcefdeaa..000000000000 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Entries": [ - - ], - "Names": { - "CreateListUpdateDelete": [ - - ] - }, - "Variables": { - "SubscriptionId": "dbdbebc3-1f15-4e74-9ef2-7db25483cb15", - "TestCertificate": "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", - "TestCertificatePassword": "Password", - "testKeyVaultSecretUrl": "https://jikangsdkkeyvault.vault.azure.net/secrets/sdkcert1", - "TestBackupStorageAccount": "apimbackupmsi", - "TestBackupUserMsiClientId": "a6270d0c-7d86-478b-8cbe-dc9047ba54f7", - "TestBackupUserMsiResourceId": "/subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/net-sdk-backup-restore/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apim-backup-restore-msi", - "SubId": "dbdbebc3-1f15-4e74-9ef2-7db25483cb15", - "ServiceName": "sdktest20220801service", - "Location": "centraluseuap", - "ResourceGroup": "Apim-NetSdk-20220801" - } -} From 191f3ed54b835ba35463e56bdabbe901c8449467 Mon Sep 17 00:00:00 2001 From: Logan Zipkes <44794089+LFZ96@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:58:33 -0500 Subject: [PATCH 7/7] add session recordings for authorizationprovidertests --- .../AuthorizationProviderTests.cs | 72 +- .../CreateListUpdateDelete.json | 1903 +++++++++++++++++ 2 files changed, 1944 insertions(+), 31 deletions(-) create mode 100644 sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs index b0e6f5685ec0..86891e1b32ec 100644 --- a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/ManagementApiTests/AuthorizationProviderTests.cs @@ -6,6 +6,7 @@ using Microsoft.Azure.Management.ApiManagement.Models; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using System; +using System.Collections.Generic; using System.IO; using System.Net; using System.Threading.Tasks; @@ -41,8 +42,20 @@ public async Task CreateListUpdateDelete() var authorizationProviderContract = new AuthorizationProviderContract { DisplayName = TestUtilities.GenerateName("authorizationProviderDisplayName"), - IdentityProvider = TestUtilities.GenerateName("identityProvider"), - Oauth2 = new AuthorizationProviderOAuth2Settings { RedirectUrl = "https://contoso.com" } + IdentityProvider = "google", + Oauth2 = new AuthorizationProviderOAuth2Settings + { + RedirectUrl = "https://constoso.com", + GrantTypes = new AuthorizationProviderOAuth2GrantTypes + { + AuthorizationCode = new Dictionary() + { + { "clientId", "clientid" }, + { "clientSecret", "clientsecret" }, + { "scopes", "scopes" } + } + } + } }; var createAuthProviderResponse = await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( @@ -60,13 +73,10 @@ public async Task CreateListUpdateDelete() authorizationProviderId); Assert.NotNull(getAuthProviderResponse); - Assert.NotNull(getAuthProviderResponse.Headers.ETag); Assert.NotNull(getAuthProviderResponse.Body); - Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); Assert.Equal(authorizationProviderContract.DisplayName, getAuthProviderResponse.Body.DisplayName); Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); - Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); // list authorization providers again authProviderlistResponse = await testBase.client.AuthorizationProvider.ListByServiceWithHttpMessagesAsync( @@ -111,10 +121,8 @@ public async Task CreateListUpdateDelete() authorizationId); Assert.NotNull(getAuthorizationResponse); - Assert.NotNull(getAuthorizationResponse.Headers.ETag); Assert.NotNull(getAuthorizationResponse.Body); - Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); Assert.Equal(authorizationContract.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); Assert.Equal(authorizationContract.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); @@ -154,10 +162,10 @@ public async Task CreateListUpdateDelete() // create access policy var accessPolicyId = TestUtilities.GenerateName("accessPolicyId"); - var accessPolicyContract = new AuthorizationAccessPolicyContract + var accessPolicyContract = new AuthorizationAccessPolicyContract() { - TenantId = TestUtilities.GenerateName("tenantId"), - ObjectId = TestUtilities.GenerateName("objectId") + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + ObjectId = "a676137a-7ef9-49cd-a466-d87b143841da" }; var createAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( @@ -179,10 +187,8 @@ public async Task CreateListUpdateDelete() accessPolicyId); Assert.NotNull(getAccessPolicyResponse); - Assert.NotNull(getAccessPolicyResponse.Headers.ETag); Assert.NotNull(getAccessPolicyResponse.Body); - Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); Assert.Equal(accessPolicyContract.TenantId, getAccessPolicyResponse.Body.TenantId); Assert.Equal(accessPolicyContract.ObjectId, getAccessPolicyResponse.Body.ObjectId); @@ -200,8 +206,8 @@ public async Task CreateListUpdateDelete() // update access policies var updateAccessPolicyParameters = new AuthorizationAccessPolicyContract { - TenantId = TestUtilities.GenerateName("newTenantId"), - ObjectId = TestUtilities.GenerateName("objectId") + TenantId = "72f988bf-86f1-41af-91ab-2d7cd011db47", + ObjectId = "a676137a-7ef9-49cd-a466-d87b143841da" }; await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAsync( @@ -210,8 +216,7 @@ await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAs authorizationProviderId, authorizationId, accessPolicyId, - updateAccessPolicyParameters, - getAccessPolicyResponse.Headers.ETag); + updateAccessPolicyParameters); // get access policy to validate that it was updated getAccessPolicyResponse = await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( @@ -222,10 +227,8 @@ await testBase.client.AuthorizationAccessPolicy.CreateOrUpdateWithHttpMessagesAs accessPolicyId); Assert.NotNull(getAccessPolicyResponse); - Assert.NotNull(getAccessPolicyResponse.Headers.ETag); Assert.NotNull(getAccessPolicyResponse.Body); - Assert.Equal(accessPolicyId, getAccessPolicyResponse.Body.Id); Assert.Equal(updateAccessPolicyParameters.TenantId, getAccessPolicyResponse.Body.TenantId); Assert.Equal(updateAccessPolicyParameters.ObjectId, getAccessPolicyResponse.Body.ObjectId); @@ -236,7 +239,7 @@ await testBase.client.AuthorizationAccessPolicy.DeleteWithHttpMessagesAsync( authorizationProviderId, authorizationId, accessPolicyId, - getAccessPolicyResponse.Headers.ETag); + "*"); // get access policy to validate that it was deleted try @@ -259,7 +262,7 @@ await testBase.client.AuthorizationAccessPolicy.GetWithHttpMessagesAsync( var updateAuthorizationParameters = new AuthorizationContract { AuthorizationType = AuthorizationType.OAuth2, - OAuth2GrantType = OAuth2GrantType.ClientCredentials + OAuth2GrantType = OAuth2GrantType.AuthorizationCode }; await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( @@ -267,8 +270,7 @@ await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( testBase.serviceName, authorizationProviderId, authorizationId, - updateAuthorizationParameters, - getAuthorizationResponse.Headers.ETag); + updateAuthorizationParameters); // get authorization to validate that it was updated getAuthorizationResponse = await testBase.client.Authorization.GetWithHttpMessagesAsync( @@ -278,10 +280,8 @@ await testBase.client.Authorization.CreateOrUpdateWithHttpMessagesAsync( authorizationId); Assert.NotNull(getAuthorizationResponse); - Assert.NotNull(getAuthorizationResponse.Headers.ETag); Assert.NotNull(getAuthorizationResponse.Body); - Assert.Equal(authorizationId, getAuthorizationResponse.Body.Id); Assert.Equal(updateAuthorizationParameters.AuthorizationType, getAuthorizationResponse.Body.AuthorizationType); Assert.Equal(updateAuthorizationParameters.OAuth2GrantType, getAuthorizationResponse.Body.OAuth2GrantType); @@ -291,7 +291,7 @@ await testBase.client.Authorization.DeleteWithHttpMessagesAsync( testBase.serviceName, authorizationProviderId, authorizationId, - getAuthorizationResponse.Headers.ETag); + "*"); // get authorization to validate that it was deleted try @@ -312,6 +312,20 @@ await testBase.client.Authorization.GetWithHttpMessagesAsync( var updateAuthProviderParameters = new AuthorizationProviderContract { DisplayName = TestUtilities.GenerateName("newAuthorizationProviderDisplayName"), + IdentityProvider = "google", + Oauth2 = new AuthorizationProviderOAuth2Settings + { + RedirectUrl = "https://constoso.com", + GrantTypes = new AuthorizationProviderOAuth2GrantTypes + { + AuthorizationCode = new Dictionary() + { + { "clientId", "clientid" }, + { "clientSecret", "clientsecret" }, + { "scopes", "scopes" } + } + } + } }; // update authorization provider @@ -319,8 +333,7 @@ await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, - updateAuthProviderParameters, - getAuthProviderResponse.Headers.ETag); + updateAuthProviderParameters); // get authorization provider to validate that it was updated getAuthProviderResponse = await testBase.client.AuthorizationProvider.GetWithHttpMessagesAsync( @@ -329,20 +342,17 @@ await testBase.client.AuthorizationProvider.CreateOrUpdateWithHttpMessagesAsync( authorizationProviderId); Assert.NotNull(getAuthProviderResponse); - Assert.NotNull(getAuthProviderResponse.Headers.ETag); Assert.NotNull(getAuthProviderResponse.Body); - Assert.Equal(authorizationProviderId, getAuthProviderResponse.Body.Id); Assert.Equal(updateAuthProviderParameters.DisplayName, getAuthProviderResponse.Body.DisplayName); Assert.Equal(authorizationProviderContract.IdentityProvider, getAuthProviderResponse.Body.IdentityProvider); - Assert.Equal(authorizationProviderContract.Oauth2.RedirectUrl, getAuthProviderResponse.Body.Oauth2.RedirectUrl); // delete authorization provider await testBase.client.AuthorizationProvider.DeleteWithHttpMessagesAsync( testBase.rgName, testBase.serviceName, authorizationProviderId, - getAuthProviderResponse.Headers.ETag); + "*"); // get authorization provider to check if it was deleted try diff --git a/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json new file mode 100644 index 000000000000..9476b64637fa --- /dev/null +++ b/sdk/apimanagement/Microsoft.Azure.Management.ApiManagement/tests/SessionRecords/AuthorizationProviderTests/CreateListUpdateDelete.json @@ -0,0 +1,1903 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourcegroups/Apim-NetSdk-20220801?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlZ3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxP2FwaS12ZXJzaW9uPTIwMTctMDUtMTA=", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3bead19e-b764-43f6-a7dc-ff2d576c674d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "bf04a5fc-3def-429a-9ae9-f708cd7e31b4" + ], + "x-ms-correlation-request-id": [ + "bf04a5fc-3def-429a-9ae9-f708cd7e31b4" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152937Z:bf04a5fc-3def-429a-9ae9-f708cd7e31b4" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:37 GMT" + ], + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2U/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\"\r\n },\r\n \"location\": \"centraluseuap\",\r\n \"tags\": {\r\n \"DateCreated\": \"4/27/2023 3:29:38 PM\",\r\n \"apiversion\": \"2022-08-01\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c9f482a5-e8ce-462f-bf7d-a88d57098fcd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "354" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAsJCU=\"" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "90307d13-1764-4699-9595-8a02a30195b2", + "90307d13-1764-4699-9595-8a02a30195b2" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "90307d13-1764-4699-9595-8a02a30195b2" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152939Z:90307d13-1764-4699-9595-8a02a30195b2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:39 GMT" + ], + "Content-Length": [ + "2943" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service\",\r\n \"name\": \"sdktest20220801service\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"DateCreated\": \"4/27/2023 3:29:38 PM\",\r\n \"apiversion\": \"2022-08-01\"\r\n },\r\n \"location\": \"Central US EUAP\",\r\n \"etag\": \"AAAAAAAsJCU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2023-04-26T16:30:26.7911449Z\",\r\n \"gatewayUrl\": \"https://sdktest20220801service.azure-api.net\",\r\n \"gatewayRegionalUrl\": \"https://sdktest20220801service-centraluseuap-01.regional.azure-api.net\",\r\n \"portalUrl\": \"https://sdktest20220801service.portal.azure-api.net\",\r\n \"developerPortalUrl\": \"https://sdktest20220801service.developer.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktest20220801service.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktest20220801service.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"sdktest20220801service.azure-api.net\",\r\n \"encodedCertificate\": null,\r\n \"keyVaultId\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": null,\r\n \"defaultSslBinding\": true,\r\n \"identityClientId\": null,\r\n \"certificateSource\": \"BuiltIn\",\r\n \"certificateStatus\": null\r\n }\r\n ],\r\n \"publicIPAddresses\": [\r\n \"20.228.49.143\"\r\n ],\r\n \"privateIPAddresses\": null,\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": {\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2\": \"False\"\r\n },\r\n \"virtualNetworkType\": \"None\",\r\n \"certificates\": null,\r\n \"disableGateway\": false,\r\n \"natGatewayState\": \"Disabled\",\r\n \"outboundPublicIPAddresses\": [\r\n \"20.228.49.143\"\r\n ],\r\n \"apiVersionConstraint\": {\r\n \"minApiVersion\": null\r\n },\r\n \"publicIpAddressId\": null,\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": null,\r\n \"platformVersion\": \"stv2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": \"a676137a-7ef9-49cd-a466-d87b143841da\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"zones\": null,\r\n \"systemData\": {\r\n \"createdBy\": \"jikang@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2023-03-16T20:13:52.3752772Z\",\r\n \"lastModifiedBy\": \"c01e8df8-1cb8-47a9-9931-887b594b1332\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2023-04-26T16:30:26.1518098Z\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2U/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "436b94f3-a5f1-4bb1-a2b1-7e42a7f1a8d0" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "\"AAAAAAAsJCU=\"" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5438be02-1f16-478a-9ebe-28043a4c2986" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-correlation-request-id": [ + "5438be02-1f16-478a-9ebe-28043a4c2986" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152940Z:5438be02-1f16-478a-9ebe-28043a4c2986" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:39 GMT" + ], + "Content-Length": [ + "2943" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service\",\r\n \"name\": \"sdktest20220801service\",\r\n \"type\": \"Microsoft.ApiManagement/service\",\r\n \"tags\": {\r\n \"DateCreated\": \"4/27/2023 3:29:38 PM\",\r\n \"apiversion\": \"2022-08-01\"\r\n },\r\n \"location\": \"Central US EUAP\",\r\n \"etag\": \"AAAAAAAsJCU=\",\r\n \"properties\": {\r\n \"publisherEmail\": \"apim@autorestsdk.com\",\r\n \"publisherName\": \"autorestsdk\",\r\n \"notificationSenderEmail\": \"apimgmt-noreply@mail.windowsazure.com\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"targetProvisioningState\": \"\",\r\n \"createdAtUtc\": \"2023-04-26T16:30:26.7911449Z\",\r\n \"gatewayUrl\": \"https://sdktest20220801service.azure-api.net\",\r\n \"gatewayRegionalUrl\": \"https://sdktest20220801service-centraluseuap-01.regional.azure-api.net\",\r\n \"portalUrl\": \"https://sdktest20220801service.portal.azure-api.net\",\r\n \"developerPortalUrl\": \"https://sdktest20220801service.developer.azure-api.net\",\r\n \"managementApiUrl\": \"https://sdktest20220801service.management.azure-api.net\",\r\n \"scmUrl\": \"https://sdktest20220801service.scm.azure-api.net\",\r\n \"hostnameConfigurations\": [\r\n {\r\n \"type\": \"Proxy\",\r\n \"hostName\": \"sdktest20220801service.azure-api.net\",\r\n \"encodedCertificate\": null,\r\n \"keyVaultId\": null,\r\n \"certificatePassword\": null,\r\n \"negotiateClientCertificate\": false,\r\n \"certificate\": null,\r\n \"defaultSslBinding\": true,\r\n \"identityClientId\": null,\r\n \"certificateSource\": \"BuiltIn\",\r\n \"certificateStatus\": null\r\n }\r\n ],\r\n \"publicIPAddresses\": [\r\n \"20.228.49.143\"\r\n ],\r\n \"privateIPAddresses\": null,\r\n \"additionalLocations\": null,\r\n \"virtualNetworkConfiguration\": null,\r\n \"customProperties\": {\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30\": \"False\",\r\n \"Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2\": \"False\"\r\n },\r\n \"virtualNetworkType\": \"None\",\r\n \"certificates\": null,\r\n \"disableGateway\": false,\r\n \"natGatewayState\": \"Disabled\",\r\n \"outboundPublicIPAddresses\": [\r\n \"20.228.49.143\"\r\n ],\r\n \"apiVersionConstraint\": {\r\n \"minApiVersion\": null\r\n },\r\n \"publicIpAddressId\": null,\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"privateEndpointConnections\": null,\r\n \"platformVersion\": \"stv2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"Developer\",\r\n \"capacity\": 1\r\n },\r\n \"identity\": {\r\n \"type\": \"SystemAssigned\",\r\n \"principalId\": \"a676137a-7ef9-49cd-a466-d87b143841da\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n },\r\n \"zones\": null,\r\n \"systemData\": {\r\n \"createdBy\": \"jikang@microsoft.com\",\r\n \"createdByType\": \"User\",\r\n \"createdAt\": \"2023-03-16T20:13:52.3752772Z\",\r\n \"lastModifiedBy\": \"c01e8df8-1cb8-47a9-9931-887b594b1332\",\r\n \"lastModifiedByType\": \"Application\",\r\n \"lastModifiedAt\": \"2023-04-26T16:30:26.1518098Z\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycz9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c96a07f2-f677-43ec-8a88-80861d23d219" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a84eb502-8523-40b1-a5fd-3e6d18921b9a" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-correlation-request-id": [ + "a84eb502-8523-40b1-a5fd-3e6d18921b9a" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152940Z:a84eb502-8523-40b1-a5fd-3e6d18921b9a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:39 GMT" + ], + "Content-Length": [ + "322" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": \"https://management.azure.com/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders?api-version=2021-04-01-preview&%24skipToken=eyJIIjoiLS1jb21tb24tLSIsIlMiOiJOb3RTZXQifQ%3d%3d\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycz9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d387863f-cd9a-4e07-91d6-14a48490f7d9" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "99ebc583-1d97-4407-a436-54ace36de96a" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-correlation-request-id": [ + "99ebc583-1d97-4407-a436-54ace36de96a" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152942Z:99ebc583-1d97-4407-a436-54ace36de96a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:41 GMT" + ], + "Content-Length": [ + "954" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationproviderid1032\",\r\n \"name\": \"authorizationproviderid1032\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"displayName\": \"authorizationProviderDisplayName7893\",\r\n \"identityProvider\": \"google\",\r\n \"oauth2\": {\r\n \"redirectUrl\": \"https://authorization-manager.consent.azure-apim.net/redirect/apim/sdktest20220801service\",\r\n \"grantTypes\": {\r\n \"authorizationCode\": {\r\n \"clientId\": \"clientid\",\r\n \"scopes\": \"scopes\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": \"https://management.azure.com/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders?api-version=2021-04-01-preview&%24skipToken=eyJIIjoiLS1jb21tb24tLSIsIlMiOiJOb3RTZXQifQ%3d%3d\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzI/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"authorizationProviderDisplayName7893\",\r\n \"identityProvider\": \"google\",\r\n \"oauth2\": {\r\n \"redirectUrl\": \"https://constoso.com\",\r\n \"grantTypes\": {\r\n \"authorizationCode\": {\r\n \"clientId\": \"clientid\",\r\n \"clientSecret\": \"clientsecret\",\r\n \"scopes\": \"scopes\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8d8ef1b8-5c40-4404-95be-fc67e37ea6d3" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "376" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ed57d919-0220-47d8-bb4a-cf48d29138d5" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "ed57d919-0220-47d8-bb4a-cf48d29138d5" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152941Z:ed57d919-0220-47d8-bb4a-cf48d29138d5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:41 GMT" + ], + "Content-Length": [ + "632" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationproviderid1032\",\r\n \"name\": \"authorizationproviderid1032\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"displayName\": \"authorizationProviderDisplayName7893\",\r\n \"identityProvider\": \"google\",\r\n \"oauth2\": {\r\n \"redirectUrl\": \"https://authorization-manager.consent.azure-apim.net/redirect/apim/sdktest20220801service\",\r\n \"grantTypes\": {\r\n \"authorizationCode\": {\r\n \"clientId\": \"clientid\",\r\n \"scopes\": \"scopes\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzI/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"newAuthorizationProviderDisplayName943\",\r\n \"identityProvider\": \"google\",\r\n \"oauth2\": {\r\n \"redirectUrl\": \"https://constoso.com\",\r\n \"grantTypes\": {\r\n \"authorizationCode\": {\r\n \"clientId\": \"clientid\",\r\n \"clientSecret\": \"clientsecret\",\r\n \"scopes\": \"scopes\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4cf3d560-d1e4-4b76-bc52-f3785e65f45e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "378" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "0844e5b8-611b-4d97-971c-76d17950846e" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1193" + ], + "x-ms-correlation-request-id": [ + "0844e5b8-611b-4d97-971c-76d17950846e" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152949Z:0844e5b8-611b-4d97-971c-76d17950846e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:48 GMT" + ], + "Content-Length": [ + "634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationproviderid1032\",\r\n \"name\": \"authorizationproviderid1032\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"displayName\": \"newAuthorizationProviderDisplayName943\",\r\n \"identityProvider\": \"google\",\r\n \"oauth2\": {\r\n \"redirectUrl\": \"https://authorization-manager.consent.azure-apim.net/redirect/apim/sdktest20220801service\",\r\n \"grantTypes\": {\r\n \"authorizationCode\": {\r\n \"clientId\": \"clientid\",\r\n \"scopes\": \"scopes\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzI/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8b2d7451-fbc7-4959-8744-0f22e12bea56" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d87ba61b-d7f3-4be8-a345-c33490078369" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-correlation-request-id": [ + "d87ba61b-d7f3-4be8-a345-c33490078369" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152942Z:d87ba61b-d7f3-4be8-a345-c33490078369" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:41 GMT" + ], + "Content-Length": [ + "632" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationproviderid1032\",\r\n \"name\": \"authorizationproviderid1032\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"displayName\": \"authorizationProviderDisplayName7893\",\r\n \"identityProvider\": \"google\",\r\n \"oauth2\": {\r\n \"redirectUrl\": \"https://authorization-manager.consent.azure-apim.net/redirect/apim/sdktest20220801service\",\r\n \"grantTypes\": {\r\n \"authorizationCode\": {\r\n \"clientId\": \"clientid\",\r\n \"scopes\": \"scopes\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzI/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "295e5845-45f8-41e1-802a-40df8b3a6a91" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "5ce6fa20-2797-4794-b31e-4dd523e78ff9" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11985" + ], + "x-ms-correlation-request-id": [ + "5ce6fa20-2797-4794-b31e-4dd523e78ff9" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152949Z:5ce6fa20-2797-4794-b31e-4dd523e78ff9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:48 GMT" + ], + "Content-Length": [ + "634" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationproviderid1032\",\r\n \"name\": \"authorizationproviderid1032\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"displayName\": \"newAuthorizationProviderDisplayName943\",\r\n \"identityProvider\": \"google\",\r\n \"oauth2\": {\r\n \"redirectUrl\": \"https://authorization-manager.consent.azure-apim.net/redirect/apim/sdktest20220801service\",\r\n \"grantTypes\": {\r\n \"authorizationCode\": {\r\n \"clientId\": \"clientid\",\r\n \"scopes\": \"scopes\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzI/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "35a32cb6-b7e8-4c68-b7d1-e2af7ae52061" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11984" + ], + "x-ms-request-id": [ + "6215cb62-46ae-4618-b61c-199a13d7d039" + ], + "x-ms-correlation-request-id": [ + "6215cb62-46ae-4618-b61c-199a13d7d039" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152949Z:6215cb62-46ae-4618-b61c-199a13d7d039" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:48 GMT" + ], + "Content-Length": [ + "158" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AuthorizationGatewayNotFoundException\",\r\n \"message\": \"Cannot find api with name authorizationProviderId1032.\",\r\n \"details\": null,\r\n \"innerError\": null\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnM/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3912f495-f98a-4ad5-b046-bf330a96a69e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "434b0c16-533c-431b-8b49-55354592e8c3" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-correlation-request-id": [ + "434b0c16-533c-431b-8b49-55354592e8c3" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152942Z:434b0c16-533c-431b-8b49-55354592e8c3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:42 GMT" + ], + "Content-Length": [ + "28" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": null\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnM/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "61f1929f-aee7-406a-bc54-168a376b6ee5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "07f65fee-d7e0-47c8-837d-2cab242d34ca" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-correlation-request-id": [ + "07f65fee-d7e0-47c8-837d-2cab242d34ca" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152944Z:07f65fee-d7e0-47c8-837d-2cab242d34ca" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:43 GMT" + ], + "Content-Length": [ + "596" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationid3304\",\r\n \"name\": \"authorizationid3304\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"authorizationType\": \"OAuth2\",\r\n \"oauth2grantType\": \"AuthorizationCode\",\r\n \"status\": \"Error\",\r\n \"error\": {\r\n \"code\": \"Unauthenticated\",\r\n \"message\": \"This connection is not authenticated.\"\r\n }\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwND9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"authorizationType\": \"OAuth2\",\r\n \"oauth2grantType\": \"AuthorizationCode\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bb518eb6-d249-4791-a094-fcc64b11a00c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "108" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8d034dc8-e94b-48da-b41f-64714824eab5" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "8d034dc8-e94b-48da-b41f-64714824eab5" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152943Z:8d034dc8-e94b-48da-b41f-64714824eab5" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:43 GMT" + ], + "Content-Length": [ + "568" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304\",\r\n \"name\": \"authorizationId3304\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"authorizationType\": \"OAuth2\",\r\n \"oauth2grantType\": \"AuthorizationCode\",\r\n \"status\": \"Error\",\r\n \"error\": {\r\n \"code\": \"Unauthenticated\",\r\n \"message\": \"This connection is not authenticated.\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwND9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"authorizationType\": \"OAuth2\",\r\n \"oauth2grantType\": \"AuthorizationCode\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "df4d1653-4cc1-4941-a198-8284b0de5ea3" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "108" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b171de06-d266-4e7d-a481-25726a5d51c2" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "b171de06-d266-4e7d-a481-25726a5d51c2" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152947Z:b171de06-d266-4e7d-a481-25726a5d51c2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:47 GMT" + ], + "Content-Length": [ + "568" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304\",\r\n \"name\": \"authorizationId3304\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"authorizationType\": \"OAuth2\",\r\n \"oauth2grantType\": \"AuthorizationCode\",\r\n \"status\": \"Error\",\r\n \"error\": {\r\n \"code\": \"Unauthenticated\",\r\n \"message\": \"This connection is not authenticated.\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwND9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "04243413-5c97-4a99-85a7-1a94f19616f4" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "369b7228-ec9b-415d-8a2c-d37dd73c7357" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-correlation-request-id": [ + "369b7228-ec9b-415d-8a2c-d37dd73c7357" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152944Z:369b7228-ec9b-415d-8a2c-d37dd73c7357" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:43 GMT" + ], + "Content-Length": [ + "568" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationid3304\",\r\n \"name\": \"authorizationid3304\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"authorizationType\": \"OAuth2\",\r\n \"oauth2grantType\": \"AuthorizationCode\",\r\n \"status\": \"Error\",\r\n \"error\": {\r\n \"code\": \"Unauthenticated\",\r\n \"message\": \"This connection is not authenticated.\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwND9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b0c892b6-331b-42d7-b6f5-75ffe1ff992f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ef1cc4e4-5fc8-47e5-9c90-94b62bfb176b" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11987" + ], + "x-ms-correlation-request-id": [ + "ef1cc4e4-5fc8-47e5-9c90-94b62bfb176b" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152947Z:ef1cc4e4-5fc8-47e5-9c90-94b62bfb176b" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:47 GMT" + ], + "Content-Length": [ + "568" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationid3304\",\r\n \"name\": \"authorizationid3304\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"authorizationType\": \"OAuth2\",\r\n \"oauth2grantType\": \"AuthorizationCode\",\r\n \"status\": \"Error\",\r\n \"error\": {\r\n \"code\": \"Unauthenticated\",\r\n \"message\": \"This connection is not authenticated.\"\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwND9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "72e80af3-fcc3-42db-b291-8ad0b4987202" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11986" + ], + "x-ms-request-id": [ + "62eb0877-cc6d-42fd-825d-3bcb4a80ffff" + ], + "x-ms-correlation-request-id": [ + "62eb0877-cc6d-42fd-825d-3bcb4a80ffff" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152948Z:62eb0877-cc6d-42fd-825d-3bcb4a80ffff" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:47 GMT" + ], + "Content-Length": [ + "158" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AuthorizationGatewayNotFoundException\",\r\n \"message\": \"Cannot find connection with name authorizationid3304 .\",\r\n \"details\": null,\r\n \"innerError\": null\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/getLoginLinks?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9nZXRMb2dpbkxpbmtzP2FwaS12ZXJzaW9uPTIwMjItMDgtMDE=", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"postLoginRedirectUrl\": \"https://contoso.com\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "00de7e07-ca2f-415c-8e02-4fdc49066c68" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "53" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8bd8c91f-a362-478c-962f-c0c7e9191ad0" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "8bd8c91f-a362-478c-962f-c0c7e9191ad0" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152944Z:8bd8c91f-a362-478c-962f-c0c7e9191ad0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:44 GMT" + ], + "Content-Length": [ + "1594" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"loginLink\": \"https://logic-eastus2euap-001.consent.azure-apihub.net/login?data=eyJMb2dpbklkIjoiY2YtNGMyZjNjNWNjOGQxNGE0Mzg1ODM5OTk4MzYyZTk5ZTAtc2RrdGVzdDIwMjIwODAxc2VydmljZV9hdXRob3JpemF0aW9ucHJvdmlkZXJpZDEwMzJfb2F1dGgyLWNvZGVfdG9rZW4iLCJTZXNzaW9uSWQiOiIiLCJMb2dSdW50aW1lUG9saWN5SWQiOm51bGwsIkxvZ0Nvbm5lY3Rpb25JZCI6ImF1dGhvcml6YXRpb25pZDMzMDQiLCJMb2dDb25uZWN0b3JJZCI6ImF1dGhvcml6YXRpb25wcm92aWRlcmlkMTAzMiIsIkxvZ0Vudmlyb25tZW50SWQiOiJzZGt0ZXN0MjAyMjA4MDFzZXJ2aWNlIiwiTG9nQWNjb3VudE5hbWUiOiJjZi00YzJmM2M1Y2M4ZDE0YTQzODU4Mzk5OTgzNjJlOTllMC1zZGt0ZXN0MjAyMjA4MDFzZXJ2aWNlIiwiRXhwaXJhdGlvblRpbWUiOiIyMDIzLTA0LTI3VDE2OjI5OjQ0LjY1MzI4ODRaIiwiRGF0YSI6IkZOaGRJWTdSa1NYQzhPWlJTZk93SnQwbVZjd0VNYm8xQzhzMVJTS1ZNbW9RQUZUZkR4dGN6OEVzQ1EvbEtFajlaTkN2ZUZlaG80bHFOd011ckVOc25Obk5nY0tWUFVKTUw3S2UrbnJUU012T0tZVVF1b0RvaTlRb0VHVEdBZVB6cGtqMWJTQ3VVVnp0OWRoN29NSzFPNHpvbldWTUJjTW51Q3BhcXYybVBySGxIWWErZkV2NTdEdUhUMFdOeWEzT2JsOE8wUzBNYjI1TmVIUEMyaklmUG8rV05uYXA5c1Y4OHZKRWFyK2tkV1ZFcjhuSUtVYWVvbnRrRGNXTk9wMHcreG4rU2xScHdaMytlOHg3M1ByOFJMZlc4TU5SU2lramQzbm1GcFNEdDhsWEtvNkJBUjhlSko3NjV5QVl5cVBXQ1ByOWtxUWhWYWt0UTE4NWxEM1p2eWNPbWttekl1KzdhY1NzQkhTY1VqK0VXRFRxMEg0QmxOQ0pPTldTdEJVZnFmYXg2WXUrNkhET2ZiNDFnc05CVDhhY0JiM0lERkNHNXJ6dzRpeE93VTFvZytDbFoyTWtPSy9ua1ozQi96N3ZieWQ3cU4xQTl3SDNYQVVqQTRaMjRSM3lNa0ZTMEdSNGNYcUs5VytQOWR6amhDamU1QXdWWDlmSFQyUThzY09iVmh2MDRNeldHaTFOWElzZ3V0Rmt1VEhGYnNReURVcEtwM2ZHUkFEaE5vMy92dkcrKzA5KytCZXdCZGNnQzZQQ0tLaDdqMmxyN2p5U3YrSVNCTnU0K0xneG4wQUtoMjgzNGFySVBac05mMnpDQjBSLzF5bzh0dnZ4SkVTajhDbDl1RjRxN0xvQk1aNmVKYms2bFhyQnA3eXBNei8wQjZCZjQzQzFNRkFSZEhHNWFjQTJNZ2VEYnhlL3RxRGlydzFidjVrPSJ9\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcz9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ff63f499-a8f4-4ade-af87-2de224f9de08" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d32de1cc-479f-41aa-9134-dc9882745e59" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-correlation-request-id": [ + "d32de1cc-479f-41aa-9134-dc9882745e59" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152944Z:d32de1cc-479f-41aa-9134-dc9882745e59" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:44 GMT" + ], + "Content-Length": [ + "28" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": null\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcz9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ed4f0afc-73a4-4ce5-a68a-88ab0bfd12ee" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "51d81572-9826-4e4b-86fc-28e6aa7b8751" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11990" + ], + "x-ms-correlation-request-id": [ + "51d81572-9826-4e4b-86fc-28e6aa7b8751" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152945Z:51d81572-9826-4e4b-86fc-28e6aa7b8751" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:45 GMT" + ], + "Content-Length": [ + "576" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518\",\r\n \"name\": \"accessPolicyId6518\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies/\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"objectId\": \"a676137a-7ef9-49cd-a466-d87b143841da\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcy9hY2Nlc3NQb2xpY3lJZDY1MTg/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"objectId\": \"a676137a-7ef9-49cd-a466-d87b143841da\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "81b86d24-f327-4b5e-865d-91816135271f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "141" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "ec1c2125-8be1-4dc7-a75f-0b06a7d63b34" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-correlation-request-id": [ + "ec1c2125-8be1-4dc7-a75f-0b06a7d63b34" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152945Z:ec1c2125-8be1-4dc7-a75f-0b06a7d63b34" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:44 GMT" + ], + "Content-Length": [ + "548" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518\",\r\n \"name\": \"accessPolicyId6518\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies/\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"objectId\": \"a676137a-7ef9-49cd-a466-d87b143841da\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcy9hY2Nlc3NQb2xpY3lJZDY1MTg/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"objectId\": \"a676137a-7ef9-49cd-a466-d87b143841da\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0a4296a6-e060-4d9a-8736-72848ffe8f19" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "141" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8316615a-5fb2-454c-883c-6d32a484a07e" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-correlation-request-id": [ + "8316615a-5fb2-454c-883c-6d32a484a07e" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152946Z:8316615a-5fb2-454c-883c-6d32a484a07e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:45 GMT" + ], + "Content-Length": [ + "548" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518\",\r\n \"name\": \"accessPolicyId6518\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies/\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"objectId\": \"a676137a-7ef9-49cd-a466-d87b143841da\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcy9hY2Nlc3NQb2xpY3lJZDY1MTg/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "61800e1e-3d9b-4e13-85a8-7b057c0e7a01" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d929ee95-25cf-439b-8511-b66251342172" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11991" + ], + "x-ms-correlation-request-id": [ + "d929ee95-25cf-439b-8511-b66251342172" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152945Z:d929ee95-25cf-439b-8511-b66251342172" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:44 GMT" + ], + "Content-Length": [ + "548" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518\",\r\n \"name\": \"accessPolicyId6518\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies/\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"objectId\": \"a676137a-7ef9-49cd-a466-d87b143841da\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcy9hY2Nlc3NQb2xpY3lJZDY1MTg/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "23539fc1-5005-4aa3-b39a-c5482184bd39" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "cb48752d-f120-481b-91e9-103a9d23612d" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11989" + ], + "x-ms-correlation-request-id": [ + "cb48752d-f120-481b-91e9-103a9d23612d" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152946Z:cb48752d-f120-481b-91e9-103a9d23612d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:45 GMT" + ], + "Content-Length": [ + "548" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518\",\r\n \"name\": \"accessPolicyId6518\",\r\n \"type\": \"Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies/\",\r\n \"location\": \"Central US EUAP\",\r\n \"properties\": {\r\n \"objectId\": \"a676137a-7ef9-49cd-a466-d87b143841da\",\r\n \"tenantId\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\"\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcy9hY2Nlc3NQb2xpY3lJZDY1MTg/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "296d2e59-897c-4543-ac65-7345084170ec" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11988" + ], + "x-ms-request-id": [ + "a7946182-f758-4579-9125-a468ddce1f9e" + ], + "x-ms-correlation-request-id": [ + "a7946182-f758-4579-9125-a468ddce1f9e" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152946Z:a7946182-f758-4579-9125-a468ddce1f9e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:46 GMT" + ], + "Content-Length": [ + "160" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"AuthorizationGatewayNotFoundException\",\r\n \"message\": \"Cannot find connection acl with name accessPolicyId6518.\",\r\n \"details\": null,\r\n \"innerError\": null\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304/accessPolicies/accessPolicyId6518?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwNC9hY2Nlc3NQb2xpY2llcy9hY2Nlc3NQb2xpY3lJZDY1MTg/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8294d80a-43da-44d8-a0d9-6eccd90687c4" + ], + "If-Match": [ + "*" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6e0ee96b-5166-4a52-aa6b-b2abf2994191" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "6e0ee96b-5166-4a52-aa6b-b2abf2994191" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152946Z:6e0ee96b-5166-4a52-aa6b-b2abf2994191" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:45 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032/authorizations/authorizationId3304?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzIvYXV0aG9yaXphdGlvbnMvYXV0aG9yaXphdGlvbklkMzMwND9hcGktdmVyc2lvbj0yMDIyLTA4LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6a98fdb5-adf6-41b6-b5ca-bc7d53ee21bc" + ], + "If-Match": [ + "*" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "d4d3c7a0-dddf-4fb1-9000-70afa6072f7e" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-correlation-request-id": [ + "d4d3c7a0-dddf-4fb1-9000-70afa6072f7e" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152948Z:d4d3c7a0-dddf-4fb1-9000-70afa6072f7e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:47 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzI/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eb76e2aa-d06a-4bc6-bdba-a45466d2d00a" + ], + "If-Match": [ + "*" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8ad3f2be-1fb5-4e38-85e4-2889d3d86f47" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "8ad3f2be-1fb5-4e38-85e4-2889d3d86f47" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152949Z:8ad3f2be-1fb5-4e38-85e4-2889d3d86f47" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:48 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dbdbebc3-1f15-4e74-9ef2-7db25483cb15/resourceGroups/Apim-NetSdk-20220801/providers/Microsoft.ApiManagement/service/sdktest20220801service/authorizationProviders/authorizationProviderId1032?api-version=2022-08-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGJkYmViYzMtMWYxNS00ZTc0LTllZjItN2RiMjU0ODNjYjE1L3Jlc291cmNlR3JvdXBzL0FwaW0tTmV0U2RrLTIwMjIwODAxL3Byb3ZpZGVycy9NaWNyb3NvZnQuQXBpTWFuYWdlbWVudC9zZXJ2aWNlL3Nka3Rlc3QyMDIyMDgwMXNlcnZpY2UvYXV0aG9yaXphdGlvblByb3ZpZGVycy9hdXRob3JpemF0aW9uUHJvdmlkZXJJZDEwMzI/YXBpLXZlcnNpb249MjAyMi0wOC0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "04682447-3aa2-438b-8b19-1241a426b43e" + ], + "If-Match": [ + "*" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/6.0.1623.17311", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.22621", + "Microsoft.Azure.Management.ApiManagement.ApiManagementClient/9.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b8575420-0975-465a-88b4-a23844b16d91" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14996" + ], + "x-ms-correlation-request-id": [ + "b8575420-0975-465a-88b4-a23844b16d91" + ], + "x-ms-routing-request-id": [ + "SOUTHCENTRALUS:20230427T152950Z:b8575420-0975-465a-88b4-a23844b16d91" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Thu, 27 Apr 2023 15:29:49 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "CreateListUpdateDelete": [ + "authorizationProviderId1032", + "authorizationProviderDisplayName7893", + "authorizationId3304", + "accessPolicyId6518", + "newAuthorizationProviderDisplayName943" + ] + }, + "Variables": { + "SubscriptionId": "dbdbebc3-1f15-4e74-9ef2-7db25483cb15", + "TestCertificate": "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", + "TestCertificatePassword": "Password", + "testKeyVaultSecretUrl": "https://jikangsdkkeyvault.vault.azure.net/secrets/sdkcert1", + "TestBackupStorageAccount": "apimbackupmsi", + "TestBackupUserMsiClientId": "a6270d0c-7d86-478b-8cbe-dc9047ba54f7", + "TestBackupUserMsiResourceId": "/subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/net-sdk-backup-restore/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apim-backup-restore-msi", + "Environment": "Prod", + "SubId": "dbdbebc3-1f15-4e74-9ef2-7db25483cb15", + "ServiceName": "sdktest20220801service", + "Location": "centraluseuap", + "ResourceGroup": "Apim-NetSdk-20220801" + } +} \ No newline at end of file