1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import {
|
10 | HttpApplicationService,
|
11 | PreExecuteResultHandler,
|
12 | AuthenticateRequestHandler,
|
13 | PreExecuteResultArgs
|
14 | } from "../types";
|
15 | import {HttpContext} from "../context";
|
16 |
|
17 | export declare abstract class AuthStrategy extends HttpApplicationService {
|
18 |
|
19 | abstract setAuthCookie(thisContext: HttpContext, userName: string, options: any);
|
20 |
|
21 | abstract getAuthCookie(thisContext: HttpContext): any;
|
22 |
|
23 | abstract login(thisContext: HttpContext, userName: string, userPassword: string);
|
24 |
|
25 | abstract logout(thisContext: HttpContext);
|
26 |
|
27 | abstract getUnattendedExecutionAccount(): string;
|
28 |
|
29 | abstract getOptions(): any;
|
30 | }
|
31 |
|
32 | export declare class DefaultAuthStrategy extends AuthStrategy {
|
33 |
|
34 | getAuthCookie(thisContext: HttpContext): any;
|
35 |
|
36 | getOptions(): any;
|
37 |
|
38 | getUnattendedExecutionAccount(): string;
|
39 |
|
40 | login(thisContext: HttpContext, userName: string, userPassword: string);
|
41 |
|
42 | logout(thisContext: HttpContext);
|
43 |
|
44 | setAuthCookie(thisContext: HttpContext, userName: string, options: any);
|
45 |
|
46 | }
|
47 |
|
48 | export declare abstract class EncryptionStrategy extends HttpApplicationService {
|
49 | abstract encrypt(data: any);
|
50 | abstract decrypt(data: string);
|
51 | }
|
52 |
|
53 | export declare class DefaultEncryptionStrategy extends EncryptionStrategy {
|
54 | encrypt(data: any);
|
55 | decrypt(data: string);
|
56 | }
|
57 |
|
58 | export declare class AuthHandler implements AuthenticateRequestHandler, PreExecuteResultHandler {
|
59 |
|
60 | authenticateRequest(context: HttpContext, callback: (err?: Error) => void);
|
61 |
|
62 | preExecuteResult(args: PreExecuteResultArgs, callback: (err?: Error) => void);
|
63 |
|
64 | }
|
65 |
|
66 | export declare function createInstance(): AuthHandler; |
\ | No newline at end of file |