Skip to main content

mockCredentials.user

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

Utilities related to user credentials.

Signature:

namespace user 

Functions

Function

Description

header(userEntityRef)

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.

invalidHeader()

invalidToken()

token(userEntityRef)

Creates 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.