Page Contents

Home > @loopback/authentication > AuthenticationBindings > STRATEGY

AuthenticationBindings.STRATEGY variable

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

Signature:

STRATEGY: BindingKey<AuthenticationStrategy | AuthenticationStrategy[] | undefined>

Example

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