37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import type { Construct } from 'constructs';
|
|
import { AuthorizationType } from './method';
|
|
import type { IRestApi } from './restapi';
|
|
import type { ResourceProps } from '../../core';
|
|
import { Resource } from '../../core';
|
|
/**
|
|
* Base class for all custom authorizers
|
|
*/
|
|
export declare abstract class Authorizer extends Resource implements IAuthorizer {
|
|
/**
|
|
* Return whether the given object is an Authorizer.
|
|
*/
|
|
static isAuthorizer(x: any): x is Authorizer;
|
|
abstract readonly authorizerId: string;
|
|
readonly authorizationType?: AuthorizationType;
|
|
constructor(scope: Construct, id: string, props?: ResourceProps);
|
|
/**
|
|
* Called when the authorizer is used from a specific REST API.
|
|
* @internal
|
|
*/
|
|
abstract _attachToApi(restApi: IRestApi): void;
|
|
}
|
|
/**
|
|
* Represents an API Gateway authorizer.
|
|
*/
|
|
export interface IAuthorizer {
|
|
/**
|
|
* The authorizer ID.
|
|
* @attribute
|
|
*/
|
|
readonly authorizerId: string;
|
|
/**
|
|
* The authorization type of this authorizer.
|
|
*/
|
|
readonly authorizationType?: AuthorizationType;
|
|
}
|