X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Ffixtures%2Fpeertube-plugin-test-external-auth-two%2Fmain.js;h=1604a7c41524a4a2f75feae2fc910792fe1ddf07;hb=d253bfaaa5f42b1fba71dc70de2932fbfdca5421;hp=126905ffcb06c374206cbaa9db6d1a426982ffac;hpb=a5896799f169d3313b63165fe6a79d4149fa6df1;p=github%2FChocobozzz%2FPeerTube.git 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 ({ } }) } + + { + const result = registerExternalAuth({ + authName: 'external-auth-4', + authDisplayName: () => 'External Auth 4', + onAuthRequest: (req, res) => { + result.userAuthenticated({ + req, + res, + username: 'kefka2', + email: 'kefka@example.com', + displayName: 'Kefka duplication' + }) + } + }) + } + + { + const result = registerExternalAuth({ + authName: 'external-auth-5', + authDisplayName: () => 'External Auth 5', + onAuthRequest: (req, res) => { + result.userAuthenticated({ + req, + res, + username: 'kefka', + email: 'kefka@example.com', + displayName: 'Kefka duplication' + }) + } + }) + } + + { + const result = registerExternalAuth({ + authName: 'external-auth-6', + authDisplayName: () => 'External Auth 6', + onAuthRequest: (req, res) => { + result.userAuthenticated({ + req, + res, + username: 'existing_user', + email: 'existing_user@example.com', + displayName: 'Existing user' + }) + } + }) + } } async function unregister () {