@nestjs/passport

  • Version 10.0.3
  • Published
  • 21.2 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,
    callbackArity?: true | number
    ) => 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) => DynamicModule;

                      method registerAsync

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

                        class PassportSerializer

                        abstract class PassportSerializer {}

                          constructor

                          constructor();

                            method deserializeUser

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

                              method getPassportInstance

                              getPassportInstance: () => passport.PassportStatic;

                                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: ExecutionContext,
                                                              status?: any
                                                              ): TUser;
                                                              getAuthenticateOptions(
                                                              context: ExecutionContext
                                                              ): IAuthModuleOptions | undefined;
                                                              getRequest(context: ExecutionContext): any;
                                                              };

                                                                Package Files (8)

                                                                Dependencies (0)

                                                                No dependencies.

                                                                Dev Dependencies (31)

                                                                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>