From c75fd2e53d2acebf689f5fe9a786d048af3a9ef7 Mon Sep 17 00:00:00 2001 From: Isaiah Williams Date: Wed, 2 Oct 2019 22:53:53 -0500 Subject: [PATCH] Update the build and sample configuration --- README.md | 4 ++-- azure-pipelines.yml | 3 --- .../samples/context/ScenarioContext.java | 12 +++++++----- sdk/src/main/resources/SamplesConfiguration.json | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d7defb2..9a24eb0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Partner Center SDK for Java Samples -[![Build Status](https://dev.azure.com/isaiahwilliams/public/_apis/build/status/partner-center-java-samples?branchName=master)](https://dev.azure.com/isaiahwilliams/public/_build/latest?definitionId=27&branchName=master) +[![Build Status](https://dev.azure.com/isaiahwilliams/public/_apis/build/status/partner-center-java-samples?branchName=master)](https://dev.azure.com/isaiahwilliams/public/_build/latest?definitionId=41&branchName=master) This repository contains samples for the Partner Center SDK for Java. @@ -8,7 +8,7 @@ This repository contains samples for the Partner Center SDK for Java. | Sample Name | Description | |-------------|-------------| -| [SDK Samples](sdk/README.md) | Console application that demonstrates each scenario the Partner Center Java SDK is capable of performing.| +| [SDK Samples](sdk/README.md) | Console application that demonstrates each scenario the Partner Center SDK for Java is capable of performing.| | [Secure Application Model](secure-app-model/README.md) | A set of projects that demonstrate how a Control Panel Vendor (CPV) and a Cloud Solution Provider (CSP) should implement the Secure Application Model. | ## Reporting Security Issues diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 32e2712..c083345 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,9 +10,6 @@ strategy: pool: vmImage: $(imageName) -trigger: -- master - variables: LoggingOptions: '-Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' diff --git a/sdk/src/main/java/com/microsoft/store/partnercenter/samples/context/ScenarioContext.java b/sdk/src/main/java/com/microsoft/store/partnercenter/samples/context/ScenarioContext.java index 7fcdc12..e0fa4e2 100644 --- a/sdk/src/main/java/com/microsoft/store/partnercenter/samples/context/ScenarioContext.java +++ b/sdk/src/main/java/com/microsoft/store/partnercenter/samples/context/ScenarioContext.java @@ -47,12 +47,14 @@ public IAggregatePartner getAppPartnerOperations() if ( this.appPartnerOperations == null ) { System.out.println( "Authenticating application... " ); + IPartnerCredentials appCredentials = - PartnerCredentials.getInstance().generateByApplicationCredentials( ConfigurationHolder.getInstance().getConfiguration().getAppAuthentication().get( "ApplicationId" ), - ConfigurationHolder.getInstance().getConfiguration().getAppAuthentication().get( "ApplicationSecret" ), - ConfigurationHolder.getInstance().getConfiguration().getAppAuthentication().get( "Domain" ), - ConfigurationHolder.getInstance().getConfiguration().getPartnerServiceSettings().get( "AuthenticationAuthorityEndpoint" ), - ConfigurationHolder.getInstance().getConfiguration().getPartnerServiceSettings().get( "GraphEndpoint" ) ); + PartnerCredentials.getInstance().generateByApplicationCredentials( + ConfigurationHolder.getInstance().getConfiguration().getAppAuthentication().get("ApplicationId"), + ConfigurationHolder.getInstance().getConfiguration().getAppAuthentication().get("ApplicationSecret"), + ConfigurationHolder.getInstance().getConfiguration().getAppAuthentication().get("Domain"), + ConfigurationHolder.getInstance().getConfiguration().getPartnerServiceSettings().get("AuthenticationAuthorityEndpoint"), + ConfigurationHolder.getInstance().getConfiguration().getPartnerServiceSettings().get("GraphEndpoint")); System.out.println( "Authenticated!" ); this.appPartnerOperations = PartnerService.getInstance().createPartnerOperations( appCredentials ); diff --git a/sdk/src/main/resources/SamplesConfiguration.json b/sdk/src/main/resources/SamplesConfiguration.json index 6c2fee1..24a076f 100644 --- a/sdk/src/main/resources/SamplesConfiguration.json +++ b/sdk/src/main/resources/SamplesConfiguration.json @@ -2,7 +2,7 @@ "PartnerServiceSettings": { "PartnerServiceApiEndpoint": "https://api.partnercenter.microsoft.com", "AuthenticationAuthorityEndpoint": "https://login.microsoftonline.com/", - "GraphEndpoint": "https://graph.windows.net/.default", + "GraphEndpoint": "https://graph.windows.net/", "CommonDomain": "common" }, "UserAuthentication": {