UNPKG

@fanoutio/grip

Version:
16 lines (15 loc) 425 B
// Bearer authentication class used for building auth headers containing a literal token. export class Bearer { _token; constructor(token) { // Initialize with the specified literal token. this._token = token; } getToken() { return this._token; } // Returns the auth header containing the Bearer token. async buildHeader() { return `Bearer ${this._token}`; } }