Skip to content

Commit 4fb9f39

Browse files
committed
docs: update authentication tutorial
Update the authentication tutorial with OpenAPI specification security scheme/requirement object declarations in order to enable the 'Authorize' button/dialog functionality in the API Explorer.
1 parent 8853034 commit 4fb9f39

7 files changed

Lines changed: 366 additions & 42 deletions

docs/site/Loopback-component-authentication.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -715,12 +715,8 @@ option value for the `/whoami` endpoint.
715715

716716
```ts
717717
import {inject} from '@loopback/context';
718-
import {
719-
AuthenticationBindings,
720-
UserProfile,
721-
securityId,
722-
authenticate,
723-
} from '@loopback/authentication';
718+
import {AuthenticationBindings, authenticate} from '@loopback/authentication';
719+
import {UserProfile, securityId} from '@loopback/security';
724720
import {get} from '@loopback/rest';
725721

726722
export class WhoAmIController {
@@ -754,11 +750,11 @@ Here is the updated `BasicAuthenticationStrategy`:
754750
```ts
755751
import {
756752
AuthenticationStrategy,
757-
UserProfile,
758753
TokenService,
759754
AuthenticationMetadata,
760755
AuthenticationBindings,
761756
} from '@loopback/authentication';
757+
import {UserProfile} from '@loopback/security';
762758
import {Getter} from '@loopback/core';
763759

764760
export interface Credentials {
81.4 KB
Loading
22.5 KB
Loading
24.4 KB
Loading
20.1 KB
Loading
33.5 KB
Loading

0 commit comments

Comments
 (0)