mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 01:31:45 +00:00
Add express and service to @feathersjs/authentication
This commit is contained in:
+25
-1
@@ -1,11 +1,15 @@
|
||||
// Type definitions for @feathersjs/authentication 2.1
|
||||
// Project: http://feathersjs.com/
|
||||
// Definitions by: Abraao Alves <https://github.com/AbraaoAlves>, Jan Lohage <https://github.com/j2L4e>
|
||||
// Definitions by: Abraao Alves <https://github.com/AbraaoAlves>
|
||||
// Jan Lohage <https://github.com/j2L4e>
|
||||
// Nick Bolles <https://github.com/NickBolles>
|
||||
// Definitions: https://github.com/feathersjs-ecosystem/feathers-typescript
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { Hook } from '@feathersjs/feathers';
|
||||
import * as self from '@feathersjs/authentication';
|
||||
import { RequestHandler, Application } from 'express';
|
||||
import { create } from 'domain';
|
||||
|
||||
declare const feathersAuthentication: ((config?: FeathersAuthenticationOptions) => () => void) & typeof self;
|
||||
export default feathersAuthentication;
|
||||
@@ -52,6 +56,26 @@ export interface FeathersAuthenticationOptions {
|
||||
};
|
||||
}
|
||||
|
||||
export namespace express {
|
||||
function exposeHeaders(): RequestHandler;
|
||||
function exposeCookies(): RequestHandler;
|
||||
function authenticate(strategy: string | string[], options?: FeathersAuthenticationOptions): RequestHandler;
|
||||
function setCookie(options?: FeathersAuthenticationOptions): RequestHandler;
|
||||
function successRedirect(): RequestHandler;
|
||||
function failureRedirect(options?: FeathersAuthenticationOptions): RequestHandler;
|
||||
function emitEvents(): RequestHandler;
|
||||
}
|
||||
|
||||
export function service(options: FeathersAuthenticationOptions): (app?: Application) => void;
|
||||
|
||||
export namespace service {
|
||||
class Service {
|
||||
constructor(app: Application)
|
||||
create(data: any, params: any): Promise<{ accessToken: string }>;
|
||||
remove(id: null | string, params: any): Promise<{ accessToken: string }>;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace AuthHooks {
|
||||
interface HashPassOptions {
|
||||
passwordField: string;
|
||||
|
||||
Reference in New Issue
Block a user