Page Contents

Home > @loopback/authentication > AuthenticationBindings > STRATEGY

AuthenticationBindings.STRATEGY variable

Key used to bind an authentication strategy to the context for the authentication function to use.

Signature:

STRATEGY: BindingKey<AuthenticationStrategy | undefined>

Example

server
  .bind(AuthenticationBindings.STRATEGY)
  .toProvider(MyAuthenticationStrategy);