Skip to main content
Version: Next

AuthService.getPluginRequestToken()

Home > @backstage/backend-plugin-api > AuthService > getPluginRequestToken

Issue a token that can be used for authenticating calls towards other backend plugins.

Signature:

getPluginRequestToken(options: {
onBehalfOf: BackstageCredentials;
targetPluginId: string;
}): Promise<{
token: string;
}>;

Parameters

ParameterTypeDescription
options{ onBehalfOf: BackstageCredentials; targetPluginId: string; }

Returns:

Promise<{ token: string; }>

Remarks

This method should be called before each request. Do not hold on to the issued token and reuse it for future calls.