Skip to main content

mockCredentials.user.header()

Home > @backstage/backend-test-utils > mockCredentials > user > header

Returns an authorization header with a mocked user token. If a payload is provided it will be encoded into the token and forwarded to the credentials object when authenticated by the mock auth service.

Signature:

function header(userEntityRef?: string): string;

Parameters

Parameter

Type

Description

userEntityRef

string

(Optional)

**Returns:**

string