MCPcopy Create free account
hub / github.com/EvoMap/evolver / assertBearer

Function assertBearer

test/oauthLogin.test.js:83–87  ·  view source on GitHub ↗
(headers, token)

Source from the content-addressed store, hash-verified

81}
82
83function assertBearer(headers, token) {
84 if (!headers || headers.Authorization !== 'Bearer ' + token) {
85 throw new Error('unexpected Authorization bearer');
86 }
87}
88
89function assertNotBearer(headers, token) {
90 if (headers && headers.Authorization === 'Bearer ' + token) {

Callers 1

oauthLogin.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected