Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Enabling IWA in Seamless SSO for hybrid scenarios (#1640)
Browse files Browse the repository at this point in the history
* Adding product info headers to user realm discovery request

* Refactor.
recreating expired certificate

* Fixing error
  • Loading branch information
trwalke authored Aug 27, 2019
1 parent e548649 commit 7521ae8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 32 deletions.
37 changes: 8 additions & 29 deletions devApps/XFormsApp.UWP/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,48 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>

<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">

<Identity
Name="764bc5cc-1643-4c0a-8d02-aec5a6c21049"
Publisher="CN=jeferrie"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="764bc5cc-1643-4c0a-8d02-aec5a6c21049" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="764bc5cc-1643-4c0a-8d02-aec5a6c21049" Publisher="CN=trwalke" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="764bc5cc-1643-4c0a-8d02-aec5a6c21049" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>XFormsApp.UWP</DisplayName>
<PublisherDisplayName>jeferrie</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
<Resource Language="x-generate" />
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="XFormsApp.UWP.App">
<uap:VisualElements
DisplayName="XFormsApp.UWP"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="XFormsApp.UWP"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="XFormsApp.UWP.App">
<uap:VisualElements DisplayName="XFormsApp.UWP" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="XFormsApp.UWP" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
Expand Down
1 change: 1 addition & 0 deletions devApps/XFormsApp.UWP/XFormsApp.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<PackageCertificateKeyFile>XFormsApp.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>1EFB4DF7AA1BBB0551E2F85738789E42B1845AD8</PackageCertificateThumbprint>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down
Binary file modified devApps/XFormsApp.UWP/XFormsApp.UWP_TemporaryKey.pfx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public async Task<HttpResponse> SendPostAsync(

public async Task<HttpResponse> SendGetAsync(
Uri endpoint,
Dictionary<string, string> headers,
IDictionary<string, string> headers,
RequestContext requestContext)
{
return await ExecuteWithRetryAsync(endpoint, headers, null, HttpMethod.Get, requestContext).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Task<HttpResponse> SendPostAsync(

Task<HttpResponse> SendGetAsync(
Uri endpoint,
Dictionary<string, string> headers,
IDictionary<string, string> headers,
RequestContext requestContext);

Task<IHttpWebResponse> SendPostForceResponseAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
using Microsoft.Identity.Core.Http;
using Microsoft.Identity.Core.Realm;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Helpers;

namespace Microsoft.Identity.Core.WsTrust
{
Expand Down Expand Up @@ -141,7 +142,7 @@ public async Task<UserRealmDiscoveryResponse> GetUserRealmAsync(

var uri = new UriBuilder(userRealmUriPrefix + userName + "?api-version=1.0").Uri;

var httpResponse = await _httpManager.SendGetAsync(uri, null, requestContext).ConfigureAwait(false);
var httpResponse = await _httpManager.SendGetAsync(uri, AdalIdHelper.GetAdalIdParameters(), requestContext).ConfigureAwait(false);
return httpResponse.StatusCode == System.Net.HttpStatusCode.OK
? JsonHelper.DeserializeFromJson<UserRealmDiscoveryResponse>(httpResponse.Body)
: null;
Expand Down

0 comments on commit 7521ae8

Please sign in to comment.