@zuplo/runtime 5.2292.0 → 5.2293.0

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.
@@ -604,6 +604,23 @@ declare abstract class BaseKeyValueStore {
604
604
  abstract delete(key: string): Promise<void>;
605
605
  }
606
606
 
607
+ declare class BaseOpenFGAAuthZInboundPolicy extends InboundPolicy<OpenFGAAuthZInboundPolicyOptions> {
608
+ private client;
609
+ private authorizer;
610
+ private cache;
611
+ static setContextChecks(context: ZuploContext, checks: OpenFGACheck | OpenFGACheck[]): void;
612
+ constructor(options: OpenFGAAuthZInboundPolicyOptions, policyName: string);
613
+ /**
614
+ * The handler that is called each time this policy is invoked
615
+ *
616
+ * @param request - The incoming Request
617
+ * @param context - The current context of the Request
618
+ * @returns A Response or Request object
619
+ */
620
+ handler(request: ZuploRequest, context: ZuploContext): Promise<ZuploRequest | Response>;
621
+ private getAuthorizer;
622
+ }
623
+
607
624
  /**
608
625
  * An account object.
609
626
  */
@@ -3179,6 +3196,59 @@ declare interface NotFoundOptions {
3179
3196
  routesMatchedByPathOnly: RouteConfiguration[];
3180
3197
  }
3181
3198
 
3199
+ /**
3200
+ * Authorize requests using Okta FGA.
3201
+ *
3202
+ * @remarks
3203
+ * This policy will authorize requests using Okta FGA. If the
3204
+ * request is not authorized, a 403 response will be returned.
3205
+ *
3206
+ *
3207
+ * @title Okta FGA Authorization Inbound
3208
+ * @beta
3209
+ * @param request - The ZuploRequest
3210
+ * @param context - The ZuploContext
3211
+ * @param options - The policy options set in policies.json
3212
+ * @param policyName - The name of the policy as set in policies.json
3213
+ * @returns A Request or a Response
3214
+ */
3215
+ export declare class OktaFGAAuthZInboundPolicy extends BaseOpenFGAAuthZInboundPolicy {
3216
+ constructor(options: OktaFGAAuthZInboundPolicyOptions, policyName: string);
3217
+ }
3218
+
3219
+ /**
3220
+ * The options for this policy.
3221
+ */
3222
+ export declare interface OktaFGAAuthZInboundPolicyOptions {
3223
+ /**
3224
+ * The region your store is deployed.
3225
+ */
3226
+ region: "us1" | "eu1" | "au1";
3227
+ /**
3228
+ * The ID of the store.
3229
+ */
3230
+ storeId: string;
3231
+ /**
3232
+ * The ID of the authorization model.
3233
+ */
3234
+ authorizationModelId: string;
3235
+ /**
3236
+ * Indicates whether the request should continue if authorization fails. Default is `false` which means unauthorized users will automatically receive a 403 response.
3237
+ */
3238
+ allowUnauthorizedRequests?: boolean;
3239
+ credentials: {
3240
+ /**
3241
+ * The client ID.
3242
+ */
3243
+ clientId: string;
3244
+ /**
3245
+ * The client secret.
3246
+ */
3247
+ clientSecret: string;
3248
+ [k: string]: unknown;
3249
+ };
3250
+ }
3251
+
3182
3252
  /**
3183
3253
  * Authenticate users using Okta issued JWT tokens.
3184
3254
  *
@@ -3729,21 +3799,8 @@ declare namespace OpenAPIV3_1 {
3729
3799
  * @param policyName - The name of the policy as set in policies.json
3730
3800
  * @returns A Request or a Response
3731
3801
  */
3732
- export declare class OpenFGAAuthZInboundPolicy extends InboundPolicy<OpenFGAAuthZInboundPolicyOptions> {
3733
- private client;
3734
- private authorizer;
3735
- private cache;
3736
- static setContextChecks(context: ZuploContext, checks: OpenFGACheck | OpenFGACheck[]): void;
3802
+ export declare class OpenFGAAuthZInboundPolicy extends BaseOpenFGAAuthZInboundPolicy {
3737
3803
  constructor(options: OpenFGAAuthZInboundPolicyOptions, policyName: string);
3738
- /**
3739
- * The handler that is called each time this policy is invoked
3740
- *
3741
- * @param request - The incoming Request
3742
- * @param context - The current context of the Request
3743
- * @returns A Response or Request object
3744
- */
3745
- handler(request: ZuploRequest, context: ZuploContext): Promise<ZuploRequest | Response>;
3746
- private getAuthorizer;
3747
3804
  }
3748
3805
 
3749
3806
  /**
@@ -3757,16 +3814,16 @@ export declare interface OpenFGAAuthZInboundPolicyOptions {
3757
3814
  /**
3758
3815
  * The ID of the store.
3759
3816
  */
3760
- storeId?: string;
3817
+ storeId: string;
3761
3818
  /**
3762
3819
  * The ID of the authorization model.
3763
3820
  */
3764
- authorizationModelId?: string;
3821
+ authorizationModelId: string;
3765
3822
  /**
3766
3823
  * Indicates whether the request should continue if authorization fails. Default is `false` which means unauthorized users will automatically receive a 403 response.
3767
3824
  */
3768
3825
  allowUnauthorizedRequests?: boolean;
3769
- credentials?: UnauthenticatedCredentialConfig | APITokenCredentialConfig | HeaderCredentialsConfig | ClientCredentialsConfig;
3826
+ credentials: UnauthenticatedCredentialConfig | APITokenCredentialConfig | HeaderCredentialsConfig | ClientCredentialsConfig;
3770
3827
  }
3771
3828
 
3772
3829
  declare interface OpenFGACheck {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
- "version": "5.2292.0",
3
+ "version": "5.2293.0",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "exports": {