@nestjs/passport

  • Version 8.0.1
  • Published
  • 37.3 kB
  • No dependencies
  • MIT license

Install

npm i @nestjs/passport
yarn add @nestjs/passport
pnpm add @nestjs/passport

Overview

Nest - modern, fast, powerful node.js web framework (@passport)

Index

Functions

function AuthGuard

AuthGuard: (type?: string | string[]) => Type<IAuthGuard>;

    function PassportStrategy

    PassportStrategy: <T extends Type<any> = any>(
    Strategy: T,
    name?: string | undefined
    ) => new (...args: any[]) => InstanceType<T>;

      Classes

      class AbstractStrategy

      abstract class AbstractStrategy {}

        method validate

        abstract validate: (...args: any[]) => any;

          class AuthModuleOptions

          class AuthModuleOptions implements IAuthModuleOptions {}

            property defaultStrategy

            defaultStrategy?: string | string[];

              property property

              property?: string;

                property session

                session?: boolean;

                  class PassportModule

                  class PassportModule {}

                    method register

                    static register: (options: IAuthModuleOptions) => any;

                      method registerAsync

                      static registerAsync: (options: AuthModuleAsyncOptions) => any;

                        class PassportSerializer

                        abstract class PassportSerializer {}

                          constructor

                          constructor();

                            method deserializeUser

                            abstract deserializeUser: (payload: any, done: Function) => any;

                              method getPassportInstance

                              getPassportInstance: () => any;

                                method serializeUser

                                abstract serializeUser: (user: any, done: Function) => any;

                                  Interfaces

                                  interface AuthModuleAsyncOptions

                                  interface AuthModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {}

                                    property inject

                                    inject?: any[];

                                      property useClass

                                      useClass?: Type<AuthOptionsFactory>;

                                        property useExisting

                                        useExisting?: Type<AuthOptionsFactory>;

                                          property useFactory

                                          useFactory?: (
                                          ...args: any[]
                                          ) => Promise<IAuthModuleOptions> | IAuthModuleOptions;

                                            interface AuthOptionsFactory

                                            interface AuthOptionsFactory {}

                                              method createAuthOptions

                                              createAuthOptions: () => Promise<IAuthModuleOptions> | IAuthModuleOptions;

                                                interface IAuthModuleOptions

                                                interface IAuthModuleOptions<T = any> {}

                                                  property defaultStrategy

                                                  defaultStrategy?: string | string[];

                                                    property property

                                                    property?: string;

                                                      property session

                                                      session?: boolean;

                                                        index signature

                                                        [key: string]: any;

                                                          interface Type

                                                          interface Type<T = any> extends Function {}

                                                            construct signature

                                                            new (...args: any[]): T;

                                                              Type Aliases

                                                              type IAuthGuard

                                                              type IAuthGuard = CanActivate & {
                                                              logIn<
                                                              TRequest extends {
                                                              logIn: Function;
                                                              } = any
                                                              >(
                                                              request: TRequest
                                                              ): Promise<void>;
                                                              handleRequest<TUser = any>(
                                                              err: any,
                                                              user: any,
                                                              info: any,
                                                              context: any,
                                                              status?: any
                                                              ): TUser;
                                                              getAuthenticateOptions(context: any): IAuthModuleOptions | undefined;
                                                              };

                                                                Package Files (8)

                                                                Dependencies (0)

                                                                No dependencies.

                                                                Dev Dependencies (19)

                                                                Peer Dependencies (2)

                                                                Badge

                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@nestjs/passport.

                                                                • Markdown
                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@nestjs/passport)
                                                                • HTML
                                                                  <a href="https://www.jsdocs.io/package/@nestjs/passport"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>