UNPKG

604 BTypeScriptView Raw
1import { Protocol } from "./Contracts";
2import { IdentityProviderChain } from "./index";
3/**
4 * A gate to determine of in the given context, the given Credential is
5 * authenticated or not
6 *
7 */
8export default class Gateway {
9 protocol: Protocol;
10 /**
11 * The Gateway always holds an IdentityProviderChain
12 * as default IDP
13 */
14 provider: IdentityProviderChain;
15 /**
16 *
17 * @param protocol
18 */
19 constructor(protocol: Protocol);
20 /**
21 * Perform the authentication process with a given context.
22 *
23 */
24 authenticate(context: Object): Promise<any>;
25}