summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2021-03-04 07:25:16 +0100
committergregor herrmann <gregoa@debian.org>2021-03-28 00:36:43 +0100
commit904c8c3ad2ec2781138bade805547dafe4b59e6d (patch)
treecd5b3784a94ef3421ff43ada3af4cba18a7816d2
parentd1b73130fed7446c2ee679fdba63d9f1400e8eae (diff)
add 'debian_salsa' as an OAuth2 id provider
-rw-r--r--debian/patches/0001-add-salsa-as-an-OAuth2-id-provider.patch32
-rw-r--r--debian/patches/series1
2 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0001-add-salsa-as-an-OAuth2-id-provider.patch b/debian/patches/0001-add-salsa-as-an-OAuth2-id-provider.patch
new file mode 100644
index 0000000..bf9184c
--- /dev/null
+++ b/debian/patches/0001-add-salsa-as-an-OAuth2-id-provider.patch
@@ -0,0 +1,32 @@
+From: Philip Hands <phil@hands.com>
+Date: Thu, 4 Mar 2021 06:36:09 +0100
+Subject: add 'salsa' as an OAuth2 id provider
+
+Perhaps this should be called 'debian' instead?
+
+I suppose that decision depends upon whether (if we replace salsa at
+some point) the user id's in whatever replaces it will match those in
+salsa, since if one is user id '123' on salsa, but user id '456' on
+new-salsa it would be good to have them as separate things so that
+consumers of those ids don't suddenly have a lot of breakage.
+
+'debian-salsa' might be another option.
+---
+ lib/Mojolicious/Plugin/OAuth2.pm | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/lib/Mojolicious/Plugin/OAuth2.pm b/lib/Mojolicious/Plugin/OAuth2.pm
+index 5f5e06d..395555f 100644
+--- a/lib/Mojolicious/Plugin/OAuth2.pm
++++ b/lib/Mojolicious/Plugin/OAuth2.pm
+@@ -34,6 +34,10 @@ has providers => sub {
+ authorize_url => "https://accounts.google.com/o/oauth2/v2/auth?response_type=code",
+ token_url => "https://www.googleapis.com/oauth2/v4/token",
+ },
++ debian_salsa => {
++ authorize_url => 'https://salsa.debian.org/oauth/authorize?response_type=code',
++ token_url => 'https://salsa.debian.org/oauth/token',
++ },
+ vkontakte => {authorize_url => "https://oauth.vk.com/authorize", token_url => "https://oauth.vk.com/access_token",},
+ mocked => {authorize_url => '/mocked/oauth/authorize', token_url => '/mocked/oauth/token', secret => 'fake_secret'},
+ };
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e71ba90
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-add-salsa-as-an-OAuth2-id-provider.patch