How to use the @loopback/authentication.AuthenticationBindings.USER_PROFILE_FACTORY function in @loopback/authentication

To help you get started, we’ve selected a few @loopback/authentication examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strongloop / loopback-next / extensions / authentication-passport / src / __tests__ / acceptance / authentication-with-passport-strategy-adapter.acceptance.ts View on Github external
namespace:
          AuthenticationBindings.AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME,
      },
    );

    // used by VerifyFunctionProvider
    app.bind(USERS_REPOSITORY_BINDING_KEY).to(users);

    // the verify function for passport-http
    app
      .bind(VERIFY_FUNCTION_BASIC_AUTHENTICATION_BINDING_KEY)
      .toProvider(VerifyFunctionProvider);

    // used by the Strategy Adapter
    app
      .bind(AuthenticationBindings.USER_PROFILE_FACTORY)
      .to(myUserProfileFactory);
  }