Function createFirstPartyToken
- createFirstPartyToken<S extends SchemaTypeDefinition>(
wrdSchema: WRDSchemaType<S>,
type: "id",
userid: number,
options?: AuthTokenOptions,
): Promise<FirstPartyToken & { expires: Instant }>Type Parameters
- S extends SchemaTypeDefinition
Parameters
- wrdSchema: WRDSchemaType<S>
- type: "id"
Token type - "id" to identfy the user, "api" to allow access on behalf of the user
- userid: number
Entity associated with this token
Optionaloptions: AuthTokenOptions
Returns Promise<FirstPartyToken & { expires: Instant }>
- createFirstPartyToken<S extends SchemaTypeDefinition>(
wrdSchema: WRDSchemaType<S>,
type: "id" | "api",
userid: number,
options?: AuthTokenOptions,
): Promise<FirstPartyToken>Create a token for use with this server
Type Parameters
- S extends SchemaTypeDefinition
Parameters
- wrdSchema: WRDSchemaType<S>
- type: "id" | "api"
Token type - "id" to identfy the user, "api" to allow access on behalf of the user
- userid: number
Entity associated with this token
Optionaloptions: AuthTokenOptions
Returns Promise<FirstPartyToken>
Create a token for use with this server