aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test-external-auth-two
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-11 18:29:06 +0200
committerChocobozzz <me@florianbigard.com>2020-05-11 18:32:58 +0200
commitd253bfaaa5f42b1fba71dc70de2932fbfdca5421 (patch)
tree33fe01c5d19c8165219852566d3f9d0a6f1f6140 /server/tests/fixtures/peertube-plugin-test-external-auth-two
parent5ff523664fda3acf83e319a7c08cd14af0025e99 (diff)
downloadPeerTube-d253bfaaa5f42b1fba71dc70de2932fbfdca5421.tar.gz
PeerTube-d253bfaaa5f42b1fba71dc70de2932fbfdca5421.tar.zst
PeerTube-d253bfaaa5f42b1fba71dc70de2932fbfdca5421.zip
Add other tests to external auth
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test-external-auth-two')
-rw-r--r--server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js48
1 files changed, 48 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js b/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js
index 126905ffc..1604a7c41 100644
--- a/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js
+++ b/server/tests/fixtures/peertube-plugin-test-external-auth-two/main.js
@@ -17,6 +17,54 @@ async function register ({
17 } 17 }
18 }) 18 })
19 } 19 }
20
21 {
22 const result = registerExternalAuth({
23 authName: 'external-auth-4',
24 authDisplayName: () => 'External Auth 4',
25 onAuthRequest: (req, res) => {
26 result.userAuthenticated({
27 req,
28 res,
29 username: 'kefka2',
30 email: 'kefka@example.com',
31 displayName: 'Kefka duplication'
32 })
33 }
34 })
35 }
36
37 {
38 const result = registerExternalAuth({
39 authName: 'external-auth-5',
40 authDisplayName: () => 'External Auth 5',
41 onAuthRequest: (req, res) => {
42 result.userAuthenticated({
43 req,
44 res,
45 username: 'kefka',
46 email: 'kefka@example.com',
47 displayName: 'Kefka duplication'
48 })
49 }
50 })
51 }
52
53 {
54 const result = registerExternalAuth({
55 authName: 'external-auth-6',
56 authDisplayName: () => 'External Auth 6',
57 onAuthRequest: (req, res) => {
58 result.userAuthenticated({
59 req,
60 res,
61 username: 'existing_user',
62 email: 'existing_user@example.com',
63 displayName: 'Existing user'
64 })
65 }
66 })
67 }
20} 68}
21 69
22async function unregister () { 70async function unregister () {