Skip to content

Commit

Permalink
Bug fixes. Removing login hint
Browse files Browse the repository at this point in the history
  • Loading branch information
PramodKumarHK89 committed Sep 21, 2022
1 parent 1444e12 commit 0b45f83
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 94 deletions.
168 changes: 84 additions & 84 deletions IdAceCodeEditor/Config/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4090,91 +4090,91 @@
"DownloadLink": "https://visualstudio.microsoft.com/downloads/"
}
]
}
//{
// "Name": "Sign in users and display profile pic(Java Kotlin)",
// "Type": "JavaKotlinAndroid",
// "PlatformType": "PublicClient",
// "DisplayName": "Use MSAL in an Android app to sign-in users and call Microsoft Graph",
// "WorkingFolder": "",
// "Tags": [
// { "Name": "SignIn" },
// { "Name": "MSAL.Android" },
// { "Name": "Broker" },
// { "Name": "PKCE" }
// ],
// "GitHubRepoSettings": {
// "ReadMeLink": "https://github.com/idaceappdev/ms-identity-android-kotlin/blob/master/README.md",
// "TutorialLink": "https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-android",
// "ClonePath": "https://github.com/idaceappdev/ms-identity-android-kotlin.git",
// "LocalPath": "AndroidKotlin\\CallGraph"
// },
// "Projects": [
// {
// "Name": "Client Project",
// "ProjectPath": "",
// "Order": "0",
// "PortalSettings": {
// "DisplayName": "AndroidKotlinApp",
// "SignInAudience": "AzureADandPersonalMicrosoftAccount",
// "AppType": "Desktop",
// "RedirectUri": "msauth://com.azuresamples.msalandroidkotlinapp/1wIqXSqBj7w%2Bh11ZifsnqwgyKrY%3D",
// "IsHybridFlow": "",
// "IsDeviceCodeFlow": "",
// "SecretName": "",
},
{
"Name": "Sign in users and display profile pic(Java Kotlin)",
"Type": "JavaKotlinAndroid",
"PlatformType": "PublicClient",
"DisplayName": "Use MSAL in an Android app to sign-in users and call Microsoft Graph",
"WorkingFolder": "",
"Tags": [
{ "Name": "SignIn" },
{ "Name": "MSAL.Android" },
{ "Name": "Broker" },
{ "Name": "PKCE" }
],
"GitHubRepoSettings": {
"ReadMeLink": "https://github.com/idaceappdev/ms-identity-android-kotlin/blob/master/README.md",
"TutorialLink": "https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-android",
"ClonePath": "https://github.com/idaceappdev/ms-identity-android-kotlin.git",
"LocalPath": "AndroidKotlin\\CallGraph"
},
"Projects": [
{
"Name": "Client Project",
"ProjectPath": "",
"Order": "0",
"PortalSettings": {
"DisplayName": "AndroidKotlinApp",
"SignInAudience": "AzureADandPersonalMicrosoftAccount",
"AppType": "Desktop",
"RedirectUri": "msauth://com.azuresamples.msalandroidkotlinapp/1wIqXSqBj7w%2Bh11ZifsnqwgyKrY%3D",
"IsHybridFlow": "",
"IsDeviceCodeFlow": "",
"SecretName": "",

// "RequiredResourceAccesss": [
// {
// "ResourceAppId": "00000003-0000-0000-c000-000000000000",
// "ResourceAccesss": [
// {
// "id": "b340eb25-3456-403f-be2f-af7a0d370277",
// "Type": "Scope"
// }
// ]
// }
// ]
// },
// "ReplacementFields": [
// {
// "Name": "ClientId",
// "ReplacementType": "JSON",
// "Section": "",
// "Source": "persistdata:Projects[0].App.AppId",
// "Destination": "client_id",
// "FileName": "app\\src\\main\\res\\raw\\auth_config_single_account.json"
// },
// {
// "Name": "ClientId",
// "ReplacementType": "JSON",
// "Section": "",
// "Source": "persistdata:Projects[0].App.AppId",
// "Destination": "client_id",
// "FileName": "app\\src\\main\\res\\raw\\auth_config_multiple_account.json"
// }
// //{
// // "Name": "Authority",
// // "ReplacementType": "JSON",
// // "Section": "",
// // "Format": "https://login.microsoftonline.com/{0}",
// // "Source": "persistdata:Projects[0].TenantId",
// // "Destination": "authorities:0:authority_url",
// // "FileName": "app\\src\\main\\res\\raw\\auth_config_single_account.json"
// //}
// ]
// }
// ],
// "Prerequisites": [
// {
// "Name": "Java",
// "DownloadLink": "https://code.visualstudio.com/download"
// },
// {
// "Name": "Android Studio",
// "DownloadLink": "https://visualstudio.microsoft.com/downloads/"
// }
// ]
//}
"RequiredResourceAccesss": [
{
"ResourceAppId": "00000003-0000-0000-c000-000000000000",
"ResourceAccesss": [
{
"id": "b340eb25-3456-403f-be2f-af7a0d370277",
"Type": "Scope"
}
]
}
]
},
"ReplacementFields": [
{
"Name": "ClientId",
"ReplacementType": "JSON",
"Section": "",
"Source": "persistdata:Projects[0].App.AppId",
"Destination": "client_id",
"FileName": "app\\src\\main\\res\\raw\\auth_config_single_account.json"
},
{
"Name": "ClientId",
"ReplacementType": "JSON",
"Section": "",
"Source": "persistdata:Projects[0].App.AppId",
"Destination": "client_id",
"FileName": "app\\src\\main\\res\\raw\\auth_config_multiple_account.json"
}
//{
// "Name": "Authority",
// "ReplacementType": "JSON",
// "Section": "",
// "Format": "https://login.microsoftonline.com/{0}",
// "Source": "persistdata:Projects[0].TenantId",
// "Destination": "authorities:0:authority_url",
// "FileName": "app\\src\\main\\res\\raw\\auth_config_single_account.json"
//}
]
}
],
"Prerequisites": [
{
"Name": "Java",
"DownloadLink": "https://code.visualstudio.com/download"
},
{
"Name": "Android Studio",
"DownloadLink": "https://visualstudio.microsoft.com/downloads/"
}
]
}
]
},
{
Expand Down
7 changes: 6 additions & 1 deletion IdAceCodeEditor/Models/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ namespace IdAceCodeEditor
{
public class Tag
{
public string Name{ get; set; }
private string _name;
public string Name
{
get { return "#" + _name; } // get method
set { _name = value; } // set method
}
}
}
2 changes: 1 addition & 1 deletion IdAceCodeEditor/Services/ConfigureAzureAdApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task<AuthenticationResult> AuthenticateWithAzureAd(string[] scope,W
try
{
authResult = await app.AcquireTokenInteractive(scope)
.WithLoginHint("[email protected]")
// .WithLoginHint("[email protected]")
.WithAccount(firstAccount)
.WithParentActivityOrWindow(new WindowInteropHelper(window).Handle)
.WithPrompt(Microsoft.Identity.Client.Prompt.SelectAccount)
Expand Down
2 changes: 1 addition & 1 deletion IdAceCodeEditor/ViewModels/AppListViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private async Task<bool> CheckExistingAppRegistrationproperties(Window window)
bRet = !_project.PortalSettings.IsHybridFlow.Equals("true", StringComparison.InvariantCultureIgnoreCase);
if (!bRet)
{
bRet = (bool)SelectedApp.Web.ImplicitGrantSettings?.EnableAccessTokenIssuance;
bRet = (bool)SelectedApp.Web.ImplicitGrantSettings?.EnableIdTokenIssuance;
}
if (!bRet)
{
Expand Down
2 changes: 1 addition & 1 deletion IdAceCodeEditor/Views/AppList.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:IdAceCodeEditor"
mc:Ignorable="d"
Title="Configure Azure App regsitration" WindowStartupLocation="CenterOwner" Height="650" Width="800" Loaded="Window_Loaded">
Title="Configure Azure App regsitration" WindowStartupLocation="CenterOwner" Height="650" Width="850" Loaded="Window_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="90"></RowDefinition>
Expand Down
2 changes: 1 addition & 1 deletion IdAceCodeEditor/Views/GuideMeWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private void CheckBox_Checked(object sender, RoutedEventArgs e)
lstScenario.Items);
itemsViewOriginal2.Filter = ((o) =>
{
return ((Sample)o).Tags.Any(o=> o.Name.Equals("WithCertificate"));
return ((Sample)o).Tags.Any(o=> o.Name.Equals("#WithCertificate"));
});
itemsViewOriginal2.Refresh();
}
Expand Down
19 changes: 14 additions & 5 deletions IdAceCodeEditor/Views/IdAceCodeEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</Setter>
</Style>
<DataTemplate x:Key="tagContent">
<Border BorderBrush="Black" Background="Cornsilk" Margin="5" Padding="3" BorderThickness="1">
<Border BorderBrush="Black" Margin="5" Padding="3" BorderThickness="1">
<TextBlock Text="{Binding Name}" FontSize="10"
HorizontalAlignment="Center"
VerticalAlignment="Center">
Expand All @@ -84,12 +84,17 @@
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" Text="{Binding DisplayName}"
HorizontalAlignment="Center" FontSize="15"
HorizontalAlignment="Left" Margin="5 0 0 0" FontSize="15"
VerticalAlignment="Center">
</TextBlock>
<TextBlock Grid.Row="1" Text="Tags:"
HorizontalAlignment="Left" Margin="5 0 0 0" FontSize="15"
VerticalAlignment="Center">
</TextBlock>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<StackPanel Grid.Row="2" Orientation="Horizontal">
<ItemsControl ItemsSource="{Binding Tags}"
ItemTemplate="{StaticResource tagContent}">
<ItemsControl.ItemsPanel>
Expand Down Expand Up @@ -142,9 +147,13 @@
<DataTemplate x:Key="contentTemplate">
<ContentPresenter>
<ContentPresenter.Content>
<ItemsControl ItemsSource="{Binding Samples}"
<ScrollViewer HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Auto" >

<ItemsControl ItemsSource="{Binding Samples}"
ItemTemplate="{StaticResource sampleContent}">
</ItemsControl>
</ItemsControl>
</ScrollViewer>
</ContentPresenter.Content>
</ContentPresenter>
</DataTemplate>
Expand Down

0 comments on commit 0b45f83

Please sign in to comment.