Init commit

This commit is contained in:
ShreejitPanchal
2026-05-19 19:56:02 +08:00
commit 6601501eff
4047 changed files with 2185372 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
async function register ({
registerExternalAuth,
peertubeHelpers
}) {
{
const result = registerExternalAuth({
authName: 'external-auth-7',
authDisplayName: () => 'External Auth 7',
onAuthRequest: (req, res) => {
result.userAuthenticated({
req,
res,
username: 'cid',
email: 'cid@example.com',
displayName: 'Cid Marquez'
})
},
onLogout: (user, req) => {
return 'https://example.com/redirectUrl'
}
})
}
{
const result = registerExternalAuth({
authName: 'external-auth-8',
authDisplayName: () => 'External Auth 8',
onAuthRequest: (req, res) => {
result.userAuthenticated({
req,
res,
username: 'cid',
email: 'cid@example.com',
displayName: 'Cid Marquez'
})
},
onLogout: (user, req) => {
return 'https://example.com/redirectUrl?access_token=' + req.headers['authorization'].split(' ')[1]
}
})
}
const result = registerExternalAuth({
authName: 'external-auth-9',
authDisplayName: () => 'External Auth 9',
onAuthRequest: (req, res) => {
result.userAuthenticated({
req,
res,
username: 'cid',
email: 'cid@example.com',
displayName: 'Cid Marquez',
externalRedirectUri: 'https://external.com/some/redirect/path'
})
},
onLogout: (user, req) => {
return 'https://example.com/redirectUrl'
}
})
}
async function unregister () {
}
module.exports = {
register,
unregister
}
// ###########################################################################

View File

@@ -0,0 +1,20 @@
{
"name": "peertube-plugin-test-external-auth-three",
"version": "0.0.1",
"description": "External auth three",
"engine": {
"peertube": ">=1.3.0"
},
"keywords": [
"peertube",
"plugin"
],
"homepage": "https://github.com/Chocobozzz/PeerTube",
"author": "Chocobozzz",
"bugs": "https://github.com/Chocobozzz/PeerTube/issues",
"library": "./main.js",
"staticDirs": {},
"css": [],
"clientScripts": [],
"translations": {}
}