1 | import { Protocol } from "./Contracts";
|
2 | import { IdentityProviderChain } from "./index";
|
3 | /**
|
4 | * A gate to determine of in the given context, the given Credential is
|
5 | * authenticated or not
|
6 | *
|
7 | */
|
8 | export 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 | }
|