From 835cbf51dfe70fc8f9ec35fa6d2a82fa3a37b1a3 Mon Sep 17 00:00:00 2001 From: devlooped-bot Date: Mon, 17 Aug 2026 00:13:01 +0000 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20files=20with=20dotn?= =?UTF-8?q?et-file=20sync=20=EF=BB=BF#=20git-ecosystem/git-credential-mana?= =?UTF-8?q?ger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - oauth: support non-query response modes https://github.com/git-ecosystem/git-credential-manager/commit/ea84a25 # devlooped/oss - Fix PackageId assumption for static web assets https://github.com/devlooped/oss/commit/3a758f4 - Disable warning on packing non-packable projects https://github.com/devlooped/oss/commit/320a5c5 - Update cron schedule in triage workflow https://github.com/devlooped/oss/commit/5ee8c91 - Update actions-includes version to v2 https://github.com/devlooped/oss/commit/d571412 --- .github/workflows/includes.yml | 2 +- .github/workflows/triage.yml | 4 +- .netconfig | 21 +++-- Directory.Build.rsp | 1 + readme.md | 1 - .../OAuth/OAuth2ResponseMode.cs | 90 +++++++++++++++++++ src/Directory.Build.targets | 9 +- 7 files changed, 115 insertions(+), 13 deletions(-) create mode 100644 src/Core/Authentication/OAuth/OAuth2ResponseMode.cs diff --git a/.github/workflows/includes.yml b/.github/workflows/includes.yml index 8fd6690..ee446be 100644 --- a/.github/workflows/includes.yml +++ b/.github/workflows/includes.yml @@ -32,7 +32,7 @@ jobs: token: ${{ env.PR_TOKEN || github.token }} - name: +Mᐁ includes - uses: devlooped/actions-includes@v1 + uses: devlooped/actions-includes@v2 - name: 📝 OSMF EULA shell: pwsh diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 99eec76..bd30f7c 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -1,7 +1,7 @@ name: 'triage' on: schedule: - - cron: '42 0 * * *' + - cron: '42 0 1,15 * *' workflow_dispatch: # Manual triggering through the GitHub UI, API, or CLI @@ -104,4 +104,4 @@ jobs: closeDays: ${{ fromJson(inputs.daysBeforeClose || 30) }} closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity.\n\nHappy Coding!" pingDays: 80 - pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information." \ No newline at end of file + pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information." diff --git a/.netconfig b/.netconfig index fd1561a..0a12908 100644 --- a/.netconfig +++ b/.netconfig @@ -78,8 +78,8 @@ weak [file "Directory.Build.rsp"] url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp - sha = 0f7f7f7e8a29de9b535676f75fe7c67e629a5e8c - etag = 0ccae83fc51f400bfd7058170bfec7aba11455e24a46a0d7e6a358da6486e255 + sha = 320a5c5710f269ccb038b5e74146fed8b5a114ae + etag = 9872addf980da78842d42e70e72f90fb10ba52c1c2ccddc8aa9a2b83e0005679 weak [file "_config.yml"] url = https://github.com/devlooped/oss/blob/main/_config.yml @@ -98,8 +98,8 @@ weak [file "src/Directory.Build.targets"] url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets - sha = c67952501337303eda0fb8b340cb7606666abd8f - etag = cb83faed0cc8b930a7b6bdc61bea03a54059858cf04353e55fee94d9e3ae0fad + sha = 3a758f47e8955c15a016b3db08f383781cbdee26 + etag = 22005ab28676aa6d790171003057c81fe4ceec01251626385a3dcef3417ae3cd weak [file "src/kzu.snk"] url = https://github.com/devlooped/oss/blob/main/src/kzu.snk @@ -116,8 +116,8 @@ weak [file ".github/workflows/includes.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml - sha = 7c1c6e615b5785e0ac9db33cb17343d6c1de16ff - etag = 5e6a10be141ee629201bfad01eae09b5c36a67f541ec7ab411ae400b5d73de1d + sha = d571412f07b0fb3c40023dc906f64906d7ed2b46 + etag = ab627107749577bb619b024aff93027359b66b4c3f5a85a36b235e428387cd17 weak [file ".github/workflows/combine-prs.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/combine-prs.yml @@ -388,8 +388,8 @@ weak [file ".github/workflows/triage.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/triage.yml - sha = 61a602fc61eedbdae235f01e93657a6219ac2427 - etag = 152cd3a559c08da14d1da12a5262ba1d2e0ed6bed6d2eabf5bd209b0c35d8a75 + sha = 5ee8c91c8d9e8c0ee739fe1ec877f36c15a4aff0 + etag = b19dc36058fc7d385cb5795c9e0860c11b9d027c57cb2a5e6a112e692c6884c1 weak [file "src/Core/Authentication/OAuth/HttpListenerExtensions.cs"] url = https://github.com/git-ecosystem/git-credential-manager/blob/v2.7.0/src/shared/Core/Authentication/OAuth/HttpListenerExtensions.cs @@ -770,3 +770,8 @@ sha = e616d89d9537c4b8ccf1c20dd277ab82104167c4 etag = 6ee650d118a57494d3545d54718ccaa5257b09d54504e9c21514fe596edd9678 weak +[file "src/Core/Authentication/OAuth/OAuth2ResponseMode.cs"] + url = https://github.com/git-ecosystem/git-credential-manager/blob/main/src/shared/Core/Authentication/OAuth/OAuth2ResponseMode.cs + sha = ea84a2534c1721c052a42e81c12e6c7f0a504abb + etag = cc6ea13f7dc3c5a1374d99420004fcdb337d3baa67bc8bfffd1362ecc75cf9ae + weak diff --git a/Directory.Build.rsp b/Directory.Build.rsp index 509cc66..a67e054 100644 --- a/Directory.Build.rsp +++ b/Directory.Build.rsp @@ -3,3 +3,4 @@ -m:1 -v:m -clp:Summary;ForceNoAlign +-p:WarnOnPackingNonPackableProject=false diff --git a/readme.md b/readme.md index b4b2848..c6ba421 100644 --- a/readme.md +++ b/readme.md @@ -83,7 +83,6 @@ To create a new release: [![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4&s=39 "DRIVE.NET, Inc.")](https://github.com/drivenet) [![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598&v=4&s=39 "Keith Pickford")](https://github.com/Keflon) [![Thomas Bolon](https://avatars.githubusercontent.com/u/127185?u=7f50babfc888675e37feb80851a4e9708f573386&v=4&s=39 "Thomas Bolon")](https://github.com/tbolon) -[![Kori Francis](https://avatars.githubusercontent.com/u/67574?u=3991fb983e1c399edf39aebc00a9f9cd425703bd&v=4&s=39 "Kori Francis")](https://github.com/kfrancis) [![Reuben Swartz](https://avatars.githubusercontent.com/u/724704?u=2076fe336f9f6ad678009f1595cbea434b0c5a41&v=4&s=39 "Reuben Swartz")](https://github.com/rbnswartz) [![Jacob Foshee](https://avatars.githubusercontent.com/u/480334?v=4&s=39 "Jacob Foshee")](https://github.com/jfoshee) [![](https://avatars.githubusercontent.com/u/33566379?u=bf62e2b46435a267fa246a64537870fd2449410f&v=4&s=39 "")](https://github.com/Mrxx99) diff --git a/src/Core/Authentication/OAuth/OAuth2ResponseMode.cs b/src/Core/Authentication/OAuth/OAuth2ResponseMode.cs new file mode 100644 index 0000000..2f5ef0f --- /dev/null +++ b/src/Core/Authentication/OAuth/OAuth2ResponseMode.cs @@ -0,0 +1,90 @@ +using System; + +namespace GitCredentialManager.Authentication.OAuth; + +/// +/// The mechanism the authorization server uses to return authorization response +/// parameters to the redirect URI. +/// +public enum OAuth2ResponseMode +{ + /// + /// Use the default response mode as determined by the authorization server. + /// + Default = 0, + + /// + /// Parameters are encoded in the query component of the redirect URI. + /// + Query, + + /// + /// Parameters are encoded in the fragment component of the redirect URI. + /// + Fragment, + + /// + /// Parameters are returned as an HTML form that is auto-submitted as an + /// application/x-www-form-urlencoded POST to the redirect URI, as + /// described by the OAuth 2.0 Form Post Response Mode specification. + /// + FormPost, +} + +public static class OAuth2ResponseModeExtensions +{ + /// + /// Get the wire value for the response_mode authorization request parameter. + /// + public static string GetParameterValue(this OAuth2ResponseMode mode) + { + switch (mode) + { + case OAuth2ResponseMode.Default: + return null; + case OAuth2ResponseMode.Query: + return OAuth2Constants.AuthorizationEndpoint.QueryResponseMode; + case OAuth2ResponseMode.Fragment: + return OAuth2Constants.AuthorizationEndpoint.FragmentResponseMode; + case OAuth2ResponseMode.FormPost: + return OAuth2Constants.AuthorizationEndpoint.FormPostResponseMode; + default: + throw new ArgumentOutOfRangeException(nameof(mode), mode, "Unknown OAuth2 response mode."); + } + } + + /// + /// Try to parse a response_mode wire value into an . + /// + public static bool TryParse(string value, out OAuth2ResponseMode mode) + { + mode = OAuth2ResponseMode.Default; + + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + if (StringComparer.OrdinalIgnoreCase.Equals(value, OAuth2Constants.AuthorizationEndpoint.QueryResponseMode)) + { + mode = OAuth2ResponseMode.Query; + return true; + } + + if (StringComparer.OrdinalIgnoreCase.Equals(value, OAuth2Constants.AuthorizationEndpoint.FragmentResponseMode)) + { + mode = OAuth2ResponseMode.Fragment; + return true; + } + + // Accept both "form_post" (wire value) and "formpost" for convenience. + if (StringComparer.OrdinalIgnoreCase.Equals(value, OAuth2Constants.AuthorizationEndpoint.FormPostResponseMode) || + StringComparer.OrdinalIgnoreCase.Equals(value, "formpost")) + { + mode = OAuth2ResponseMode.FormPost; + return true; + } + + return false; + } +} diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 20a680d..4a6ef38 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -39,7 +39,14 @@ $(MSBuildSDKsPath)\..\NuGet.Build.Tasks.Pack.targets - + + + + + + $(MSBuildProjectName) + +