UNPKG

@broadcom/endevor-bridge-for-git-rest-api

Version:

Endevor Bridge for Git Rest client

20 lines (19 loc) 692 B
import { AuthAction } from "./AuthAction"; import { RequestMethod } from "../AbstractRequest"; export class Logout extends AuthAction { constructor(allSessions = false) { super(); this.customPath = "/logout"; this.method = RequestMethod.GET; this.params = { allSessions: allSessions }; if (!allSessions) { //must be on public endpoint since the call looses the cookies this.customPath = '/setup'; this.defaultRequestConfig = Object.assign(Object.assign({}, this.defaultRequestConfig), { headers: { 'X-REQUEST-TOKEN': '---LOGOUT---' } }); } } }