@broadcom/endevor-bridge-for-git-rest-api
Version:
Endevor Bridge for Git Rest client
24 lines (23 loc) • 851 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Logout = void 0;
const AuthAction_1 = require("./AuthAction");
const AbstractRequest_1 = require("../AbstractRequest");
class Logout extends AuthAction_1.AuthAction {
constructor(allSessions = false) {
super();
this.customPath = "/logout";
this.method = AbstractRequest_1.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---'
} });
}
}
}
exports.Logout = Logout;