From e1c5503114deef954731904695cd40dccfcef555 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Apr 2020 11:36:50 +0200 Subject: Support logout and add id and pass tests --- shared/models/plugins/register-server-auth.model.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'shared/models') diff --git a/shared/models/plugins/register-server-auth.model.ts b/shared/models/plugins/register-server-auth.model.ts index 34ebbe712..dc46dcbc8 100644 --- a/shared/models/plugins/register-server-auth.model.ts +++ b/shared/models/plugins/register-server-auth.model.ts @@ -3,10 +3,12 @@ import { UserRole } from '@shared/models' export type RegisterServerAuthOptions = RegisterServerAuthPassOptions | RegisterServerAuthExternalOptions export interface RegisterServerAuthPassOptions { - type: 'id-and-pass' + // Authentication name (a plugin can register multiple auth strategies) + authName: string onLogout?: Function + // Weight of this authentication so PeerTube tries the auth methods in DESC weight order getWeight(): number // Used by PeerTube to login a user @@ -23,7 +25,8 @@ export interface RegisterServerAuthPassOptions { } export interface RegisterServerAuthExternalOptions { - type: 'external' + // Authentication name (a plugin can register multiple auth strategies) + authName: string onLogout?: Function } -- cgit v1.2.3