Options
All
  • Public
  • Public/Protected
  • All
Menu

@raincatcher/auth-passport

Index

Functions

defaultDeserializeUser

  • defaultDeserializeUser(user: any, done: function): any
  • Default deserialize user function to be used by Passport. Attaches the user to req.user

    Parameters

    • user: any

      A user data retrieved from the session

    • done: function

      callback

        • (error: Error | null, user: any): any
        • Parameters

          • error: Error | null
          • user: any

          Returns any

    Returns any

defaultSerializeUser

  • defaultSerializeUser(user: any, done: function): any
  • Default serialize user function to be used by Passport. Stores the user to the session

    Parameters

    • user: any

      A user data to be stored in the session

    • done: function

      callback

        • (error: Error | null, user: any): any
        • Parameters

          • error: Error | null
          • user: any

          Returns any

    Returns any

jwtStrategy

  • Default strategy to be used by Passport's JWT strategy. This will verify and authenticate requests that are trying to access a resource.

    Parameters

    Returns (Anonymous function)

webStrategy

  • Default strategy to be used by Passport's local strategy. If user credentials are valid, proceed to login, otherwise, reject it.

    Parameters

    Returns (Anonymous function)

    • Returns the default strategy function to be used by passport

Generated using TypeDoc