npm install --save @types/feathersjs__authentication-client
This package contains type definitions for @feathersjs/authentication-client (https://feathersjs.com).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/feathersjs__authentication-client.
// eslint-disable-next-line @definitelytyped/no-self-import
import * as self from "@feathersjs/authentication-client";
declare const feathersAuthClient: ((config?: FeathersAuthClientConfig) => () => void) & typeof self;
export default feathersAuthClient;
export interface FeathersAuthClientConfig {
storage?: Storage | undefined;
header?: string | undefined;
cookie?: string | undefined;
storageKey?: string | undefined;
jwtStrategy?: string | undefined;
path?: string | undefined;
entity?: string | undefined;
service?: string | undefined;
timeout?: number | undefined;
}
export interface FeathersAuthCredentials {
strategy: string;
[index: string]: any;
}
export const defaults: {
header: string;
cookie: string;
storageKey: string;
jwtStrategy: string;
path: string;
entity: string;
service: string;
timeout: number;
};
export interface Passport {
setupSocketListeners(): void;
connected(): Promise<any>;
authenticate(credentials?: FeathersAuthCredentials): any;
authenticateSocket(credentials: FeathersAuthCredentials, socket: any, emit: any): any;
logoutSocket(socket: any, emit: any): Promise<any>;
logout(): Promise<any>;
setJWT(data: any): Promise<any>;
getJWT(): Promise<any>;
verifyJWT(token: string): Promise<any>;
payloadIsValid(payload: string): boolean;
getCookie(name: string): string;
clearCookie(name: string): null;
getStorage(storage: any): any;
}
declare module "@feathersjs/feathers" {
interface Application<ServiceTypes> {
authenticate(options?: FeathersAuthCredentials): Promise<any>;
logout(): Promise<void>;
passport: Passport;
}
}
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
These definitions were written by Abraao Alves, and Jan Lohage.