UNPKG

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

Version:

Endevor Bridge for Git Rest client

14 lines (13 loc) 494 B
import { AuthAction } from "./AuthAction"; import { RequestMethod } from "../AbstractRequest"; export class PatLogin extends AuthAction { constructor(payload) { super(); this.customPath = "/login"; this.method = RequestMethod.GET; this.payload = payload; this.defaultRequestConfig = Object.assign(Object.assign({}, this.defaultRequestConfig), { headers: { Authorization: 'Basic ' + btoa(`:${payload.token}`) } }); } }