MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / amBearerAuthenticated

Method amBearerAuthenticated

lib/helper/REST.js:179–181  ·  view source on GitHub ↗

* Adds a header for Bearer authentication * * ```js * // we use secret function to hide token from logs * I.amBearerAuthenticated(secret('heregoestoken')) * ``` * * @param {string | CodeceptJS.Secret} accessToken Bearer access token

(accessToken)

Source from the content-addressed store, hash-verified

177 * @param {string | CodeceptJS.Secret} accessToken Bearer access token
178 */
179 amBearerAuthenticated(accessToken) {
180 this.haveRequestHeaders({ Authorization: `Bearer ${accessToken}` })
181 }
182
183 /**
184 * Executes axios request

Callers 2

REST_test.jsFile · 0.45
GraphQL_test.jsFile · 0.45

Calls 1

haveRequestHeadersMethod · 0.95

Tested by

no test coverage detected