@zuplo/runtime 6.54.13 → 6.54.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4421,6 +4421,51 @@ export declare interface JWTScopeValidationInboundPolicyOptions {
4421
4421
  scopes: string[];
4422
4422
  }
4423
4423
 
4424
+ export declare class JwtServicePlugin extends SystemRuntimePlugin {
4425
+ #private;
4426
+ static signJwt({
4427
+ payload,
4428
+ audience,
4429
+ subject,
4430
+ }: {
4431
+ payload?: Record<string, unknown>;
4432
+ audience?: string;
4433
+ subject?: string;
4434
+ }): Promise<string>;
4435
+ constructor(options?: JwtServicePluginOptions);
4436
+ registerRoutes({
4437
+ runtimeSettings,
4438
+ router,
4439
+ }: {
4440
+ runtimeSettings: RuntimeSettings;
4441
+ router: Router;
4442
+ }): void;
4443
+ }
4444
+
4445
+ declare interface JwtServicePluginOptions {
4446
+ basePath?: string;
4447
+ /**
4448
+ * Sets time for the "exp" (Expiration Time) Claim in the JWT.
4449
+ *
4450
+ * - If a `number` is passed as an argument it is used as the claim directly.
4451
+ * - If a `string` is passed as an argument it is resolved to a time span, and then added to the
4452
+ * current unix timestamp and used as the claim.
4453
+ *
4454
+ * Format used for time span should be a number followed by a unit, such as "5 minutes" or "1
4455
+ * day".
4456
+ *
4457
+ * Valid units are: "sec", "secs", "second", "seconds", "s", "minute", "minutes", "min", "mins",
4458
+ * "m", "hour", "hours", "hr", "hrs", "h", "day", "days", "d", "week", "weeks", "w", "year",
4459
+ * "years", "yr", "yrs", and "y". It is not possible to specify months. 365.25 days is used as an
4460
+ * alias for a year.
4461
+ *
4462
+ * If the string is suffixed with "ago", or prefixed with a "-", the resulting time span gets
4463
+ * subtracted from the current unix timestamp. A "from now" suffix can also be used for
4464
+ * readability when adding to the current unix timestamp.
4465
+ */
4466
+ tokenExpiration?: number | string;
4467
+ }
4468
+
4424
4469
  /**
4425
4470
  * @beta
4426
4471
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.54.13",
4
+ "version": "6.54.14",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {