@fluidframework/azure-service-utils Package
A set of helper utilities for building backend APIs for use with Azure Fluid Relay.
Remarks
Note that this library's primary entry-point (generateToken(tenantId, key, scopes, documentId, user, lifetime, ver)) is only intended to be run in a browser context. It is **not** Node.js-compatible.
Functions
Function | Alerts | Return Type | Description |
---|---|---|---|
generateToken(tenantId, key, scopes, documentId, user, lifetime, ver) | Legacy |
string | Generates a JSON Web Token (JWT) to authorize access to a Routerlicious-based Fluid service. |
Function Details
generateToken
Generates a JSON Web Token (JWT) to authorize access to a Routerlicious-based Fluid service.
This API is provided for existing users, but is not recommended for new users.
To use, import via @fluidframework/azure-service-utils/legacy
.
For more information about our API support guarantees, see here.
Signature
export declare function generateToken(tenantId: string, key: string, scopes: ScopeType[], documentId?: string, user?: IUser, lifetime?: number, ver?: string): string;
Remarks
Note: this function uses a browser friendly auth library (jsrsasign) and may only be used in client (browser) context. It is **not** Node.js-compatible.