Components serve as a vehicle to group 3rd-party contributions to allow easierextensibility of your Application, see Components for moredetails.

    Components can be added to your application using the app.component() method.

    The following is an example of installing and using a component.

    Install the following dependencies:

    1. npm install --save @loopback/authentication

    Load the component in your application:

    1. import {RestApplication} from '@loopback/rest';
    2. import {AuthenticationComponent} from '@loopback/authentication';
    3. const app = new RestApplication();
    4. // Add component to Application, which provides bindings used to resolve
    5. // authenticated requests in a Sequence.
    6. app.component(AuthenticationComponent);