How to use the @loopback/authentication.AuthenticationBindings.AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME 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
async function setupBindings2() {
    addExtension(
      app,
      AuthenticationBindings.AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME,
      PassportBasicAuthProvider,
      {
        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
github strongloop / loopback-next / extensions / authentication-passport / src / __tests__ / acceptance / authentication-with-passport-strategy-adapter.acceptance.ts View on Github external
async function setupBindings2() {
    addExtension(
      app,
      AuthenticationBindings.AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME,
      PassportBasicAuthProvider,
      {
        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);
  }
github strongloop / loopback-next / extensions / authentication-passport / src / __tests__ / acceptance / authentication-with-passport-strategy-adapter.acceptance.ts View on Github external
async function setupBindings1() {
    app
      .bind(BASIC_STRATEGY_BINDING_KEY)
      .to(basicAuthStrategy)
      .tag({
        [CoreTags.EXTENSION_FOR]:
          AuthenticationBindings.AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME,
      });
  }
github strongloop / loopback-next / labs / authentication-passport / src / __tests__ / acceptance / authentication-with-passport-strategy-adapter.acceptance.ts View on Github external
async function givenAServer() {
    app = new Application();
    app.component(AuthenticationComponent);
    app.component(RestComponent);
    app
      .bind('authentication.strategies.basicAuthStrategy')
      .to(basicAuthStrategy)
      .tag({
        [CoreTags.EXTENSION_FOR]:
          AuthenticationBindings.AUTHENTICATION_STRATEGY_EXTENSION_POINT_NAME,
      });
    server = await app.getServer(RestServer);
  }