1
- From d4a41bc0ebbb015e97e076e6040a3349ee0dab33 Mon Sep 17 00:00:00 2001
1
+ From 8b5a296990a67b35b5fcd9047d79418e31b37f60 Mon Sep 17 00:00:00 2001
2
2
From: Brecht Van Lommel <
[email protected] >
3
3
Date: Fri, 10 May 2024 13:28:51 +0200
4
- Subject: [PATCH] BLENDER: Blender ID goth provider
4
+ Subject: [PATCH 01/14 ] BLENDER: Blender ID goth provider
5
5
6
6
Provider authored by Matti Ranta and Arnd Marijnissen.
7
7
---
8
8
go.mod | 1 +
9
- go.sum | 2 +
9
+ go.sum | 3 +
10
10
public/assets/img/blenderid.png | 0
11
11
.../auth/source/oauth2/blenderid/blenderid.go | 181 ++++++++++++++++++
12
12
.../source/oauth2/blenderid/blenderid_test.go | 70 +++++++
@@ -15,7 +15,7 @@ Provider authored by Matti Ranta and Arnd Marijnissen.
15
15
.../auth/source/oauth2/blenderid/session.go | 66 +++++++
16
16
.../source/oauth2/blenderid/session_test.go | 51 +++++
17
17
.../auth/source/oauth2/providers_custom.go | 11 ++
18
- 10 files changed, 490 insertions(+)
18
+ 10 files changed, 491 insertions(+)
19
19
create mode 100644 public/assets/img/blenderid.png
20
20
create mode 100644 services/auth/source/oauth2/blenderid/blenderid.go
21
21
create mode 100644 services/auth/source/oauth2/blenderid/blenderid_test.go
@@ -25,36 +25,37 @@ Provider authored by Matti Ranta and Arnd Marijnissen.
25
25
create mode 100644 services/auth/source/oauth2/blenderid/session_test.go
26
26
27
27
diff --git a/go.mod b/go.mod
28
- index 8752e6d196a8b..0bfd9342c7fe8 100644
28
+ index d8e7e37152..af00e05199 100644
29
29
--- a/go.mod
30
30
+++ b/go.mod
31
- @@ -235 ,6 +235 ,7 @@ require (
32
- github.com/mitchellh/reflectwalk v1.0.2 // indirect
31
+ @@ -258 ,6 +258 ,7 @@ require (
32
+ github.com/mmcloughlin/avo v0.6.0 // indirect
33
33
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
34
34
github.com/modern-go/reflect2 v1.0.2 // indirect
35
35
+ github.com/mozillazg/go-unidecode v0.2.0 // indirect
36
36
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
37
37
github.com/mschoch/smat v0.2.0 // indirect
38
- github.com/nwaples/rardecode v1.1.3 // indirect
38
+ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
39
39
diff --git a/go.sum b/go.sum
40
- index 6a3e6dc7f645c..d59c282ce0411 100644
40
+ index 968001e7f9..bce9ba2fd7 100644
41
41
--- a/go.sum
42
42
+++ b/go.sum
43
- @@ -586,6 +586,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
43
+ @@ -590,6 +590,9 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
44
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
44
45
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
45
46
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
46
- github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
47
+ + github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
47
48
+ github.com/mozillazg/go-unidecode v0.2.0 h1:vFGEzAH9KSwyWmXCOblazEWDh7fOkpmy/Z4ArmamSUc=
48
49
+ github.com/mozillazg/go-unidecode v0.2.0/go.mod h1:zB48+/Z5toiRolOZy9ksLryJ976VIwmDmpQ2quyt1aA=
49
50
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 h1:j2kD3MT1z4PXCiUllUJF9mWUESr9TWKS7iEKsQ/IipM=
50
51
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM=
51
52
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
52
53
diff --git a/public/assets/img/blenderid.png b/public/assets/img/blenderid.png
53
54
new file mode 100644
54
- index 0000000000000..e69de29bb2d1d
55
+ index 0000000000..e69de29bb2
55
56
diff --git a/services/auth/source/oauth2/blenderid/blenderid.go b/services/auth/source/oauth2/blenderid/blenderid.go
56
57
new file mode 100644
57
- index 0000000000000..671e5e4f541a5
58
+ index 0000000000..671e5e4f54
58
59
--- /dev/null
59
60
+++ b/services/auth/source/oauth2/blenderid/blenderid.go
60
61
@@ -0,0 +1,181 @@
@@ -241,7 +242,7 @@ index 0000000000000..671e5e4f541a5
241
242
+ }
242
243
diff --git a/services/auth/source/oauth2/blenderid/blenderid_test.go b/services/auth/source/oauth2/blenderid/blenderid_test.go
243
244
new file mode 100644
244
- index 0000000000000..2bf4c443d86ff
245
+ index 0000000000..2bf4c443d8
245
246
--- /dev/null
246
247
+++ b/services/auth/source/oauth2/blenderid/blenderid_test.go
247
248
@@ -0,0 +1,70 @@
@@ -317,7 +318,7 @@ index 0000000000000..2bf4c443d86ff
317
318
+ }
318
319
diff --git a/services/auth/source/oauth2/blenderid/gitealize_usernames.go b/services/auth/source/oauth2/blenderid/gitealize_usernames.go
319
320
new file mode 100644
320
- index 0000000000000..880516c8e28f1
321
+ index 0000000000..880516c8e2
321
322
--- /dev/null
322
323
+++ b/services/auth/source/oauth2/blenderid/gitealize_usernames.go
323
324
@@ -0,0 +1,65 @@
@@ -388,7 +389,7 @@ index 0000000000000..880516c8e28f1
388
389
+ }
389
390
diff --git a/services/auth/source/oauth2/blenderid/gitealize_usernames_test.go b/services/auth/source/oauth2/blenderid/gitealize_usernames_test.go
390
391
new file mode 100644
391
- index 0000000000000..7d633198e8886
392
+ index 0000000000..7d633198e8
392
393
--- /dev/null
393
394
+++ b/services/auth/source/oauth2/blenderid/gitealize_usernames_test.go
394
395
@@ -0,0 +1,43 @@
@@ -437,7 +438,7 @@ index 0000000000000..7d633198e8886
437
438
+ }
438
439
diff --git a/services/auth/source/oauth2/blenderid/session.go b/services/auth/source/oauth2/blenderid/session.go
439
440
new file mode 100644
440
- index 0000000000000..52a2d2174584c
441
+ index 0000000000..52a2d21745
441
442
--- /dev/null
442
443
+++ b/services/auth/source/oauth2/blenderid/session.go
443
444
@@ -0,0 +1,66 @@
@@ -509,7 +510,7 @@ index 0000000000000..52a2d2174584c
509
510
+ }
510
511
diff --git a/services/auth/source/oauth2/blenderid/session_test.go b/services/auth/source/oauth2/blenderid/session_test.go
511
512
new file mode 100644
512
- index 0000000000000..ab7fb974a5772
513
+ index 0000000000..ab7fb974a5
513
514
--- /dev/null
514
515
+++ b/services/auth/source/oauth2/blenderid/session_test.go
515
516
@@ -0,0 +1,51 @@
@@ -565,15 +566,15 @@ index 0000000000000..ab7fb974a5772
565
566
+ a.Equal(s.String(), s.Marshal())
566
567
+ }
567
568
diff --git a/services/auth/source/oauth2/providers_custom.go b/services/auth/source/oauth2/providers_custom.go
568
- index 65cf538ad7386..f6f49ada048aa 100644
569
+ index 65cf538ad7..f6f49ada04 100644
569
570
--- a/services/auth/source/oauth2/providers_custom.go
570
571
+++ b/services/auth/source/oauth2/providers_custom.go
571
572
@@ -5,6 +5,7 @@ package oauth2
572
-
573
+
573
574
import (
574
575
"code.gitea.io/gitea/modules/setting"
575
576
+ "code.gitea.io/gitea/services/auth/source/oauth2/blenderid"
576
-
577
+
577
578
"github.com/markbates/goth"
578
579
"github.com/markbates/goth/providers/azureadv2"
579
580
@@ -120,4 +121,14 @@ func init() {
@@ -591,3 +592,6 @@ index 65cf538ad7386..f6f49ada048aa 100644
591
592
+ return blenderid.NewCustomisedURL(clientID, secret, callbackURL, custom.AuthURL, custom.TokenURL, custom.ProfileURL, scopes...), nil
592
593
+ }))
593
594
}
595
+ - -
596
+ 2.45.2
597
+
0 commit comments