diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-23 11:36:50 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | e1c5503114deef954731904695cd40dccfcef555 (patch) | |
tree | 72cec4ee691a3362a7d024dc830d215a6b2c800a /server/lib/plugins/register-helpers-store.ts | |
parent | 8dc8a34ee8428e7657414115d1c137592efa174d (diff) | |
download | PeerTube-e1c5503114deef954731904695cd40dccfcef555.tar.gz PeerTube-e1c5503114deef954731904695cd40dccfcef555.tar.zst PeerTube-e1c5503114deef954731904695cd40dccfcef555.zip |
Support logout and add id and pass tests
Diffstat (limited to 'server/lib/plugins/register-helpers-store.ts')
-rw-r--r-- | server/lib/plugins/register-helpers-store.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/lib/plugins/register-helpers-store.ts b/server/lib/plugins/register-helpers-store.ts index 7e827401f..679ed3650 100644 --- a/server/lib/plugins/register-helpers-store.ts +++ b/server/lib/plugins/register-helpers-store.ts | |||
@@ -171,6 +171,11 @@ export class RegisterHelpersStore { | |||
171 | 171 | ||
172 | private buildRegisterIdAndPassAuth () { | 172 | private buildRegisterIdAndPassAuth () { |
173 | return (options: RegisterServerAuthPassOptions) => { | 173 | return (options: RegisterServerAuthPassOptions) => { |
174 | if (!options.authName || typeof options.getWeight !== 'function' || typeof options.login !== 'function') { | ||
175 | logger.error('Cannot register auth plugin %s: authName of getWeight or login are not valid.', this.npmName) | ||
176 | return | ||
177 | } | ||
178 | |||
174 | this.idAndPassAuths.push(options) | 179 | this.idAndPassAuths.push(options) |
175 | } | 180 | } |
176 | } | 181 | } |