BackstageClient.embedSessions
BackstageClient.embedSessions in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / embedSessions
embedSessions: {
create: (request: {
accountId: string;
scopes?: string[];
ttlSeconds?: number;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string;
expiresAt: string;
organisation: {
id: string;
slug: string;
};
token: string;
}>;
current: (requestOptions?: RequestOptions) => Promise<{
accountId: string;
expiresAt: string;
organisation: {
id: string;
slug: string;
};
scopes: string[];
}>;
};Defined in: client.ts:1991
Embed Sessions methods
create()#
create: (request: {
accountId: string;
scopes?: string[];
ttlSeconds?: number;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string;
expiresAt: string;
organisation: {
id: string;
slug: string;
};
token: string;
}>;Mint an embed session For a partner server authenticated with an organisation API key (tlak_). Mints a short-lived token pinned to one account of the key's organisation, carrying a subset of the key's scopes, for an embedded Backstage widget. User tokens and embed tokens are refused.
Parameters#
| Parameter | Type |
|---|---|
request | { accountId: string; scopes?: string[]; ttlSeconds?: number; } |
request.accountId | string |
request.scopes? | string[] |
request.ttlSeconds? | number |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string;
expiresAt: string;
organisation: {
id: string;
slug: string;
};
token: string;
}>
Operation Id#
createEmbedSession
current()#
current: (requestOptions?: RequestOptions) => Promise<{
accountId: string;
expiresAt: string;
organisation: {
id: string;
slug: string;
};
scopes: string[];
}>;Describe the current embed session For an embedded widget authenticated with an embed session token: the organisation, account, scopes and expiry of the session, so the widget can bootstrap without decoding the token.
Parameters#
| Parameter | Type |
|---|---|
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string;
expiresAt: string;
organisation: {
id: string;
slug: string;
};
scopes: string[];
}>
Operation Id#
getCurrentEmbedSession