Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

Adding b2c #44

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="1.8.1" />
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="1.9.1" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.Face">
<Version>1.0.2-preview</Version>
</PackageReference>
<PackageReference Include="Microsoft.Identity.Client">
<Version>1.1.2-preview0008</Version>
</PackageReference>
<PackageReference Include="MonkeyCache">
<Version>0.1.0.10-beta</Version>
</PackageReference>
Expand All @@ -84,7 +81,7 @@
<PackageReference Include="Xamarin.Android.Support.Compat" Version="27.0.2.1" />
<PackageReference Include="Xamarin.Android.Support.CustomTabs" Version="27.0.2.1" />
<PackageReference Include="Microsoft.Azure.DocumentDB.Core">
<Version>1.8.1</Version>
<Version>1.9.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter">
<Version>1.7.0</Version>
Expand All @@ -110,6 +107,9 @@
<PackageReference Include="FormsToolkit">
<Version>2.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.Identity.Client">
<Version>1.1.4-preview0002</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Effects\ListViewSelectionOnTopEffect.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths">
</meta-data>
</provider>
<activity android:name="microsoft.identity.client.BrowserTabActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="msal8aea67fd-38da-49a1-8f68-ca0c9e9e2501" android:host="auth" />
</intent-filter>
</activity>
<activity android:name="microsoft.identity.client.BrowserTabActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down
113 changes: 113 additions & 0 deletions src/GeoContacts/GeoContacts.Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ echo "Arguments for updating:"
echo " - ACID: $AC_ANDROID"
echo " - ACLogin: $AC_SHOWLOGIN"
echo " - ACFace: $AC_FACE"
echo " - ACUseMSFT: $AC_USEMSFT"

# Updating manifest
sed -i '' "s/AC_ANDROID/$AC_ANDROID/g" $BUILD_REPOSITORY_LOCALPATH/src/GeoContacts/GeoContacts/Helpers/CommonConstants.cs

sed -i '' "s/AC_FACE/$AC_FACE/g" $BUILD_REPOSITORY_LOCALPATH/src/GeoContacts/GeoContacts/Helpers/CommonConstants.cs

sed -i '' "s/AC_USEMSFT_NO/$AC_USEMSFT/g" $BUILD_REPOSITORY_LOCALPATH/src/GeoContacts/GeoContacts/Helpers/CommonConstants.cs

if [ "$APPCENTER_BRANCH" == "appstore" ]; then
sed -i '' "s/AC_SHOWLOGIN/$AC_SHOWLOGIN/g" $BUILD_REPOSITORY_LOCALPATH/src/GeoContacts/GeoContacts/Helpers/CommonConstants.cs
Expand Down
10 changes: 6 additions & 4 deletions src/GeoContacts/GeoContacts.iOS/GeoContacts.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<DeviceSpecificBuild>false</DeviceSpecificBuild>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
<MtouchFloat32>true</MtouchFloat32>
<CodesignKey>iPhone Developer</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
Expand Down Expand Up @@ -151,9 +153,6 @@
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.Face">
<Version>1.0.2-preview</Version>
</PackageReference>
<PackageReference Include="Microsoft.Identity.Client">
<Version>1.1.2-preview0008</Version>
</PackageReference>
<PackageReference Include="MonkeyCache">
<Version>0.1.0.10-beta</Version>
</PackageReference>
Expand All @@ -170,7 +169,7 @@
<Version>3.0.0.5</Version>
</PackageReference>
<PackageReference Include="Microsoft.Azure.DocumentDB.Core">
<Version>1.8.1</Version>
<Version>1.9.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.AppCenter.Distribute">
<Version>1.7.0</Version>
Expand All @@ -193,6 +192,9 @@
<PackageReference Include="FormsToolkit">
<Version>2.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.Identity.Client">
<Version>1.1.4-preview0002</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/GeoContacts/GeoContacts.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
<string>com.microsoft.advocates</string>
<key>CFBundleURLSchemes</key>
<array>
<string>msal8f999c10-2a7f-403c-b20b-cbe07b319cf3</string>
<string>msal8aea67fd-38da-49a1-8f68-ca0c9e9e2501</string>
<string>appcenter-APP_SECRET</string>
<string>msal8f999c10-2a7f-403c-b20b-cbe07b319cf3</string>
</array>
</dict>
</array>
Expand Down
4 changes: 2 additions & 2 deletions src/GeoContacts/GeoContacts/GeoContacts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
<ItemGroup>
<PackageReference Include="Markdig" Version="0.15.0" />
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.Face" Version="1.0.2-preview" />
<PackageReference Include="Microsoft.Identity.Client" Version="1.1.2-preview0008" />
<PackageReference Include="MonkeyCache" Version="0.1.0.10-beta" />
<PackageReference Include="MonkeyCache.FileStore" Version="0.1.0.10-beta" />
<PackageReference Include="Refractored.MvvmHelpers" Version="1.3.0" />
<PackageReference Include="Xam.Plugin.Media" Version="4.0.1.1" />
<PackageReference Include="Xam.Plugins.Forms.ImageCircle" Version="3.0.0.5" />
<PackageReference Include="Plugin.Multilingual" Version="1.0.2" />
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="1.8.1" />
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="1.9.1" />
<PackageReference Include="Xamarin.Essentials" Version="0.8.0-preview" />
<PackageReference Include="Xamarin.Forms" Version="3.1.0.583944" />
<PackageReference Include="Microsoft.AppCenter" Version="1.7.0" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="1.7.0" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="1.7.0" />
<PackageReference Include="Microsoft.AppCenter.Distribute" Version="1.7.0" />
<PackageReference Include="FormsToolkit" Version="2.0.1" />
<PackageReference Include="Microsoft.Identity.Client" Version="1.1.4-preview0002" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 14 additions & 0 deletions src/GeoContacts/GeoContacts/Helpers/CommonConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ public class CommonConstants
public const string AppCenterUWP = "AC_UWP";
public const string ShowLogin = "AC_SHOWLOGIN";
public const string FaceApiKey = "AC_FACE";
public const string AppCenterUseMsft = "AC_USEMSFT_NO";
#endregion

#region AD
public const bool USE_MSFT = "AC_USE_MSFT" == AppCenterUseMsft;

public const string ADApplicationID = "8f999c10-2a7f-403c-b20b-cbe07b319cf3";
public const string ADRedirectID = "msal" + ADApplicationID + "://auth";
public static readonly string[] ADScopes = new string[] { "user.read" };
public const string ADAuthority = "https://login.microsoftonline.com/organizations/";

public const string B2CTenant = "geocontacts.onmicrosoft.com";
public const string B2CClientID = "8aea67fd-38da-49a1-8f68-ca0c9e9e2501";
public const string B2CPolicy = "B2C_1_SignInUp";

public const string B2CAuthorityBase = "https://login.microsoftonline.com/tfp/" + B2CTenant + "/";
public const string B2CAuthority = B2CAuthorityBase + B2CPolicy;

public const string B2CRedirectUrl = "msal" + B2CClientID + "://auth";
public static readonly string[] B2CScopes = new string[] { "https://geocontacts.onmicrosoft.com/geocontacts/login" };

#endregion

#region LocationFunction
Expand Down
Loading