はじまりの大地
このコミットが含まれているのは:
@@ -0,0 +1,95 @@
|
||||
async function register ({
|
||||
registerExternalAuth,
|
||||
peertubeHelpers
|
||||
}) {
|
||||
{
|
||||
const result = registerExternalAuth({
|
||||
authName: 'external-auth-3',
|
||||
authDisplayName: () => 'External Auth 3',
|
||||
onAuthRequest: (req, res) => {
|
||||
result.userAuthenticated({
|
||||
req,
|
||||
res,
|
||||
username: 'cid',
|
||||
email: 'cid@example.com',
|
||||
displayName: 'Cid Marquez'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
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'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
const result = registerExternalAuth({
|
||||
authName: 'external-auth-7',
|
||||
authDisplayName: () => 'External Auth 7',
|
||||
onAuthRequest: (req, res) => {
|
||||
result.userAuthenticated({
|
||||
req,
|
||||
res,
|
||||
username: 'existing_user2',
|
||||
email: 'custom_email_existing_user2@example.com',
|
||||
displayName: 'Existing user 2'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async function unregister () {
|
||||
return
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
register,
|
||||
unregister
|
||||
}
|
||||
|
||||
// ###########################################################################
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "peertube-plugin-test-external-auth-two",
|
||||
"version": "0.0.1",
|
||||
"description": "External auth two",
|
||||
"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": {}
|
||||
}
|
||||
新しい課題から参照
ユーザをブロックする