Skip to content

1.0.0-prerelease3 release of PlatformSDK #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<version>1.0.0$version_suffix$</version>
<authors>Microsoft</authors>
<owners>microsoft,nugetsfbplatform</owners>
<projectUrl>https://github.com/OfficeDev/skype-docs/tree/master/Skype/Trusted-Application-API/SDK</projectUrl>
<licenseUrl>https://go.microsoft.com/fwlink/?linkid=841900</licenseUrl>
<iconUrl>https://secure.gravatar.com/avatar/92bd0991c2311c528ada0fa90fdd1719?s=64</iconUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand All @@ -16,5 +17,9 @@
<releaseNotes>Please visit https://go.microsoft.com/fwlink/?linkid=841901 to view the release notes.</releaseNotes>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<tags>Microsoft SfB SkypeforBusiness TrustedApplicationAPI</tags>
<dependencies>
<!-- 4.1.0 and 4.1.1 has a bug -->
<dependency id="System.Net.Http" version="(,4.1)" />
</dependencies>
</metadata>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,27 @@ public async Task InitializeApplicationAsync(LoggingContext loggingContext)
{
if (Application == null)
{
Uri discoverUri = ClientPlatform.DiscoverUri;
Uri baseUri = UriHelper.GetBaseUriFromAbsoluteUri(discoverUri.ToString());
IApplications ApplicationsResource = null;
if (!this.ClientPlatform.IsSandBoxEnv)
{
Uri discoverUri = ClientPlatform.DiscoverUri;
Uri baseUri = UriHelper.GetBaseUriFromAbsoluteUri(discoverUri.ToString());

var discover = new Discover(m_restfulClient, baseUri, discoverUri, this);
await discover.RefreshAndInitializeAsync(loggingContext, ApplicationEndpointId.ToString()).ConfigureAwait(false);
var discover = new Discover(m_restfulClient, baseUri, discoverUri, this);
await discover.RefreshAndInitializeAsync(loggingContext, ApplicationEndpointId.ToString()).ConfigureAwait(false);
ApplicationsResource = discover.Applications;
}
else
{
Uri applicationsUri = Constants.PlatformApplicationsUri_SandBox;
Uri baseUri = UriHelper.GetBaseUriFromAbsoluteUri(applicationsUri.ToString());
if (this.ApplicationEndpointId != null)
{
applicationsUri = UriHelper.AppendQueryParameterOnUrl(applicationsUri.ToString(), Constants.EndpointId, ApplicationEndpointId.ToString(), false);
}
ApplicationsResource = new Applications(m_restfulClient, null, baseUri, applicationsUri, this);
}

IApplications ApplicationsResource = discover.Applications;
await ApplicationsResource.RefreshAndInitializeAsync(loggingContext).ConfigureAwait(false);

Application = ApplicationsResource.Application;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,31 @@ public class ClientPlatformSettings

public bool IsInternalPartner { get; private set; }

public ClientPlatformSettings(Guid aadClientId, string appTokenCertThumbprint, bool isSandBoxEnv = false)
:this(null, aadClientId, appTokenCertThumbprint, isSandBoxEnv, null, false)
public ClientPlatformSettings(Guid aadClientId, string appTokenCertThumbprint)
:this(null, aadClientId, appTokenCertThumbprint, null, false)
{
ArgumentVerifier.ThrowOnNullOrEmptyString(appTokenCertThumbprint, "appTokenCertThumbprint");
}

public ClientPlatformSettings(string clientSecret, Guid aadClientId, bool isSandBoxEnv = false )
: this(null, aadClientId, null, isSandBoxEnv, clientSecret, false)
public ClientPlatformSettings(string clientSecret, Guid aadClientId )
: this(null, aadClientId, null, clientSecret, false)
{
ArgumentVerifier.ThrowOnNullOrEmptyString(clientSecret, "clientSecret");
}

public ClientPlatformSettings(Uri discoverUri, Guid aadClientId, string appTokenCertThumbprint, bool isSandBoxEnv = false, string clientSecret=null, bool isInternalPartner = false)
public ClientPlatformSettings(Uri discoverUri, Guid aadClientId, string appTokenCertThumbprint, string clientSecret=null, bool isInternalPartner = false)
{
DiscoverUri = discoverUri;
AADClientId = aadClientId;
AppTokenCertThumbprint = appTokenCertThumbprint;
AADClientSecret = clientSecret;
IsSandBoxEnv = isSandBoxEnv;
IsInternalPartner = isInternalPartner;
}

//TODO: Open this method once sandbox Env is ready
private void EnableSandboxFeatures(bool isSandBoxEnv)
{
IsSandBoxEnv = isSandBoxEnv;
}
}
}
4 changes: 0 additions & 4 deletions Skype/Trusted-Application-API/SDK/Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.10.305231913\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
Expand Down
1 change: 1 addition & 0 deletions Skype/Trusted-Application-API/SDK/Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public static class Constants
public const string SkypeForBusinessApplicationClientId = "00000004-0000-0ff1-ce00-000000000000";
public static readonly Uri PlatformDiscoverUri_Prod = new Uri("https://api.skypeforbusiness.com/platformservice/discover?deploymentpreference=Nightly&Region=northamerica");
public static readonly Uri PlatformDiscoverUri_SandBox = new Uri("https://NOAMmeetings.resources.lync.com/platformservice/discover"); //Todo: update to api.skypeforbusinessonline after prod ready
public static readonly Uri PlatformApplicationsUri_SandBox = new Uri("https://ring0NOAMfreemiummeetings.resources.lync.com/platformservice/v1/applications"); //TODO update to https://NOAMfreemiummeetings.resources.lync.com/platformservice/v1/applications
public const string PlatformAudienceUri = "https://NOAMmeetings.resources.lync.com"; //Todo: update to api.skypeforbusinessonline after prod ready

#endregion
Expand Down
1 change: 0 additions & 1 deletion Skype/Trusted-Application-API/SDK/Common/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net452" />
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.10.305231913" targetFramework="net462" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net462" />
<package id="System.Net.Http" version="4.0.0" targetFramework="net462" />
Expand Down
1 change: 0 additions & 1 deletion Skype/Trusted-Application-API/SDK/Tests/TestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public static MockApplicationEndpointData CreateApplicationEndpoint()
DiscoverUri,
AADClientId,
AppTokenCertThumbprint,
false,
null,
TestHelper.IsInternalApp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.SfB.PlatformService.SDK.ClientModel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease2\lib\net462\Microsoft.SfB.PlatformService.SDK.ClientModel.dll</HintPath>
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease3\lib\net462\Microsoft.SfB.PlatformService.SDK.ClientModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.SfB.PlatformService.SDK.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease2\lib\net462\Microsoft.SfB.PlatformService.SDK.Common.dll</HintPath>
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease3\lib\net462\Microsoft.SfB.PlatformService.SDK.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,11 @@ public async Task InitializeApplicationEndpointAsync(
ClientPlatformSettings platformSettings = null;
if (!string.IsNullOrEmpty(appTokenCertThumbprint))
{
platformSettings = new ClientPlatformSettings(
Guid.Parse(aadClientId),
appTokenCertThumbprint,
isSandBoxEnvionment
);
platformSettings = new ClientPlatformSettings(Guid.Parse(aadClientId), appTokenCertThumbprint);
}
else if (!string.IsNullOrEmpty(aadClientSecret))
{
platformSettings = new ClientPlatformSettings(
aadClientSecret,
Guid.Parse(aadClientId),
isSandBoxEnvionment
);

platformSettings = new ClientPlatformSettings(aadClientSecret, Guid.Parse(aadClientId));
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<package id="Microsoft.Data.Services.Client" version="5.7.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.10.305231913" targetFramework="net462" />
<package id="Microsoft.SkypeforBusiness.TrustedApplicationAPI.ResourceContract" version="7.0.1539.0" targetFramework="net462" />
<package id="Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK" version="1.0.0-prerelease2" targetFramework="net462" />
<package id="Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK" version="1.0.0-prerelease3" targetFramework="net462" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net462" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net462" />
<package id="System.Net.Http" version="2.0.20126.16343" targetFramework="net462" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.SfB.PlatformService.SDK.ClientModel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease2\lib\net462\Microsoft.SfB.PlatformService.SDK.ClientModel.dll</HintPath>
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease3\lib\net462\Microsoft.SfB.PlatformService.SDK.ClientModel.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.SfB.PlatformService.SDK.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease2\lib\net462\Microsoft.SfB.PlatformService.SDK.Common.dll</HintPath>
<HintPath>..\packages\Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK.1.0.0-prerelease3\lib\net462\Microsoft.SfB.PlatformService.SDK.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<package id="Microsoft.Owin.Security.Jwt" version="3.0.1" targetFramework="net462" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net462" />
<package id="Microsoft.SkypeforBusiness.TrustedApplicationAPI.ResourceContract" version="7.0.1539.0" targetFramework="net462" />
<package id="Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK" version="1.0.0-prerelease2" targetFramework="net462" />
<package id="Microsoft.SkypeforBusiness.TrustedApplicationAPI.SDK" version="1.0.0-prerelease3" targetFramework="net462" />
<package id="Microsoft.Web.Administration" version="7.0.0.0" targetFramework="net462" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net462" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net462" />
Expand Down
Loading