Skip to main content
Version: Next

mockCredentials

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

Signature:

namespace mockCredentials 

Functions

Function

Description

limitedUser(userEntityRef)

Creates a mocked credentials object for a user principal with limited access.

The default user entity reference is 'user:default/mock'.

none()

Creates a mocked credentials object for a unauthenticated principal.

service(subject, accessRestrictions)

Creates a mocked credentials object for a service principal.

The default subject is 'external:test-service', and no access restrictions.

user(userEntityRef)

Creates a mocked credentials object for a user principal.

The default user entity reference is 'user:default/mock'.

Namespaces

Namespace

Description

limitedUser

Utilities related to limited user credentials.

none

Utilities related to none credentials.

service

Utilities related to service credentials.

user

Utilities related to user credentials.