From 813d62c297e48ce026d660e5d2f18612b205b0c1 Mon Sep 17 00:00:00 2001 From: Jenny Ferries Date: Fri, 23 Oct 2020 18:42:36 -0700 Subject: [PATCH] update to msal4.22 --- iwa-console/AuthenticationConfig.cs | 27 ++--------------- iwa-console/MyInformation.cs | 25 ++-------------- iwa-console/Program.cs | 25 ++-------------- iwa-console/ProtectedApiCallHelper.cs | 25 ++-------------- ...AppUsingIntegratedWindowsAuthentication.cs | 29 +++---------------- iwa-console/iwa-console.csproj | 2 +- 6 files changed, 13 insertions(+), 120 deletions(-) diff --git a/iwa-console/AuthenticationConfig.cs b/iwa-console/AuthenticationConfig.cs index eb09f79..b833bab 100644 --- a/iwa-console/AuthenticationConfig.cs +++ b/iwa-console/AuthenticationConfig.cs @@ -1,31 +1,8 @@ -/* - The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - */ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. using Microsoft.Extensions.Configuration; using Microsoft.Identity.Client; -using System; -using System.Globalization; using System.IO; using System.Reflection; diff --git a/iwa-console/MyInformation.cs b/iwa-console/MyInformation.cs index 8c189a5..6edea34 100644 --- a/iwa-console/MyInformation.cs +++ b/iwa-console/MyInformation.cs @@ -1,26 +1,5 @@ -/* - The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. using Microsoft.Identity.Client; using Newtonsoft.Json.Linq; diff --git a/iwa-console/Program.cs b/iwa-console/Program.cs index e4677f0..6feff75 100644 --- a/iwa-console/Program.cs +++ b/iwa-console/Program.cs @@ -1,26 +1,5 @@ -/* - The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. using Microsoft.Identity.Client; using System; diff --git a/iwa-console/ProtectedApiCallHelper.cs b/iwa-console/ProtectedApiCallHelper.cs index 879d6b8..ffd754b 100644 --- a/iwa-console/ProtectedApiCallHelper.cs +++ b/iwa-console/ProtectedApiCallHelper.cs @@ -1,26 +1,5 @@ -/* - The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. using Newtonsoft.Json; using Newtonsoft.Json.Linq; diff --git a/iwa-console/PublicAppUsingIntegratedWindowsAuthentication.cs b/iwa-console/PublicAppUsingIntegratedWindowsAuthentication.cs index 722aa9f..5599e8d 100644 --- a/iwa-console/PublicAppUsingIntegratedWindowsAuthentication.cs +++ b/iwa-console/PublicAppUsingIntegratedWindowsAuthentication.cs @@ -1,26 +1,5 @@ -/* - The MIT License (MIT) - -Copyright (c) 2015 Microsoft Corporation - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. using Microsoft.Identity.Client; using System; @@ -82,7 +61,7 @@ public async Task AcquireATokenFromCacheOrIntegratedWindow /// /// Gets an access token so that the application accesses the web api in the name of the user - /// who is signed-in in Windows (for a domain joined or AAD joined machine) + /// who is signed-in with Windows (for a domain joined or AAD joined machine) /// /// An authentication result, or null if the user canceled sign-in private async Task GetTokenForWebApiUsingIntegratedWindowsAuthenticationAsync(IEnumerable scopes) @@ -111,7 +90,7 @@ private async Task GetTokenForWebApiUsingIntegratedWindows // MsalServiceException: AADSTS90010: The grant type is not supported over the /common or /consumers endpoints. Please use the /organizations or tenant-specific endpoint. // you used common. - // Mitigation: as explained in the message from Azure AD, the authoriy needs to be tenanted or otherwise organizations + // Mitigation: as explained in the message from Azure AD, the authority needs to be tenanted or otherwise organizations // MsalServiceException: AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'. // Explanation: this can happen if your application was not registered as a public client application in Azure AD diff --git a/iwa-console/iwa-console.csproj b/iwa-console/iwa-console.csproj index 13b16e6..a11cfcd 100644 --- a/iwa-console/iwa-console.csproj +++ b/iwa-console/iwa-console.csproj @@ -8,7 +8,7 @@ - +