1 | import '@feathersjs/transport-commons';
|
2 | import { ServiceMethods } from '@feathersjs/feathers';
|
3 | import { AuthenticationBase, AuthenticationResult, AuthenticationRequest, AuthenticationParams } from './core';
|
4 | declare module '@feathersjs/feathers/lib/declarations' {
|
5 | interface FeathersApplication<Services, Settings> {
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | defaultAuthentication?(location?: string): AuthenticationService;
|
13 | }
|
14 | interface Params {
|
15 | authenticated?: boolean;
|
16 | authentication?: AuthenticationRequest;
|
17 | }
|
18 | }
|
19 | export declare class AuthenticationService extends AuthenticationBase implements Partial<ServiceMethods<AuthenticationResult, AuthenticationRequest, AuthenticationParams>> {
|
20 | constructor(app: any, configKey?: string, options?: {});
|
21 | /**
|
22 | * Return the payload for a JWT based on the authentication result.
|
23 | * Called internally by the `create` method.
|
24 | *
|
25 | * @param _authResult The current authentication result
|
26 | * @param params The service call parameters
|
27 | */
|
28 | getPayload(_authResult: AuthenticationResult, params: AuthenticationParams): Promise<{
|
29 | [key: string]: any;
|
30 | }>;
|
31 | |
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | getTokenOptions(authResult: AuthenticationResult, params: AuthenticationParams): Promise<any>;
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | create(data: AuthenticationRequest, params?: AuthenticationParams): Promise<AuthenticationResult>;
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | remove(id: string | null, params?: AuthenticationParams): Promise<AuthenticationResult>;
|
55 | |
56 |
|
57 |
|
58 | setup(): Promise<void>;
|
59 | }
|