]>
git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/tests/fixtures/peertube-plugin-test-id-pass-auth-one/main.js
1 async
function register ({
5 unregisterIdAndPassAuth
7 registerIdAndPassAuth({
8 authName: 'spyro-auth',
11 peertubeHelpers
.logger
.info('On logout for auth 1 - 1')
17 if (body
.id
=== 'spyro' && body
.password
=== 'spyro password') {
18 return Promise
.resolve({
20 email: 'spyro@example.com',
22 displayName: 'Spyro the Dragon'
30 registerIdAndPassAuth({
31 authName: 'crash-auth',
34 peertubeHelpers
.logger
.info('On logout for auth 1 - 2')
40 if (body
.id
=== 'crash' && body
.password
=== 'crash password') {
41 return Promise
.resolve({
43 email: 'crash@example.com',
45 displayName: 'Crash Bandicoot'
53 settingsManager
.onSettingsChange(settings
=> {
54 if (settings
.disableSpyro
) {
55 unregisterIdAndPassAuth('spyro-auth')
60 async
function unregister () {
69 // ###########################################################################