1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Support logout and add id and pass tests

This commit is contained in:
Chocobozzz 2020-04-23 11:36:50 +02:00 committed by Chocobozzz
parent 8dc8a34ee8
commit e1c5503114
25 changed files with 273 additions and 101 deletions

View file

@ -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
}