UNPKG

1.39 kBTypeScriptView Raw
1/**
2 * Represents an identity source.
3 *
4 * The source can be specified either as a literal value (e.g: `Auth`) which
5 * cannot be blank, or as an unresolved string token.
6 */
7export declare class IdentitySource {
8 /**
9 * Provides a properly formatted header identity source.
10 * @param headerName the name of the header the `IdentitySource` will represent.
11 *
12 * @returns a header identity source.
13 */
14 static header(headerName: string): string;
15 /**
16 * Provides a properly formatted query string identity source.
17 * @param queryString the name of the query string the `IdentitySource` will represent.
18 *
19 * @returns a query string identity source.
20 */
21 static queryString(queryString: string): string;
22 /**
23 * Provides a properly formatted API Gateway stage variable identity source.
24 * @param stageVariable the name of the stage variable the `IdentitySource` will represent.
25 *
26 * @returns an API Gateway stage variable identity source.
27 */
28 static stageVariable(stageVariable: string): string;
29 /**
30 * Provides a properly formatted request context identity source.
31 * @param context the name of the context variable the `IdentitySource` will represent.
32 *
33 * @returns a request context identity source.
34 */
35 static context(context: string): string;
36 private static toString;
37}