HttpAuthService.issueUserCookie()
Home > @backstage/backend-plugin-api
> HttpAuthService
> issueUserCookie
Issues a limited access token as a cookie on the given response object. This is only possible for requests that were originally made with user credentials (such as a Backstage token).
This must be called before sending any payload data.
Signature:
issueUserCookie(
res: Response,
options?: {
credentials?: BackstageCredentials;
}): Promise<{
expiresAt: Date;
}>;
Parameters
Parameter |
Type |
Description |
---|---|---|
res |
Response | |
options |
{ credentials?: BackstageCredentials; } |
(Optional) |
Promise<{ expiresAt: Date; }>