UNPKG

1.05 kBTypeScriptView Raw
1import { Resource, ResourceProps } from '@aws-cdk/core';
2import { Construct } from 'constructs';
3import { AuthorizationType } from './method';
4import { IRestApi } from './restapi';
5/**
6 * Base class for all custom authorizers
7 */
8export declare abstract class Authorizer extends Resource implements IAuthorizer {
9 /**
10 * Return whether the given object is an Authorizer.
11 */
12 static isAuthorizer(x: any): x is Authorizer;
13 abstract readonly authorizerId: string;
14 readonly authorizationType?: AuthorizationType;
15 constructor(scope: Construct, id: string, props?: ResourceProps);
16 /**
17 * Called when the authorizer is used from a specific REST API.
18 * @internal
19 */
20 abstract _attachToApi(restApi: IRestApi): void;
21}
22/**
23 * Represents an API Gateway authorizer.
24 */
25export interface IAuthorizer {
26 /**
27 * The authorizer ID.
28 * @attribute
29 */
30 readonly authorizerId: string;
31 /**
32 * The authorization type of this authorizer.
33 */
34 readonly authorizationType?: AuthorizationType;
35}