|
6 | 6 | <a href="https://www.npmjs.com/package/loopback4-authentication">
|
7 | 7 | <img src="https://img.shields.io/npm/v/loopback4-authentication.svg" alt="npm version" />
|
8 | 8 | </a>
|
| 9 | +<a href="https://sonarcloud.io/summary/new_code?id=sourcefuse_loopback4-authentication" target="_blank"> |
| 10 | +<img alt="Sonar Quality Gate" src="https://img.shields.io/sonar/quality_gate/sourcefuse_loopback4-authentication?server=https%3A%2F%2Fsonarcloud.io"> |
| 11 | +</a> |
| 12 | +<a href="https://app.snyk.io/org/ashishkaushik/reporting?context[page]=issues-detail&project_target=%255B%2522sourcefuse%252Floopback4-authentication%2522%255D&project_origin=%255B%2522github%2522%255D&issue_status=%255B%2522Open%2522%255D&issue_by=Severity&table_issues_detail_cols=SCORE%257CCVE%257CCWE%257CPROJECT%257CEXPLOIT%2520MATURITY%257CAUTO%2520FIXABLE%257CINTRODUCED%257CSNYK%2520PRODUCT&v=1"> |
| 13 | +<img alt="Synk Status" src="https://img.shields.io/badge/SYNK_SECURITY-MONITORED-GREEN"> |
| 14 | +</a> |
9 | 15 | <a href="https://github.com/sourcefuse/loopback4-authentication/graphs/contributors" target="_blank">
|
10 |
| -<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/sourcefuse/loopback4-authentication"> |
| 16 | +<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/sourcefuse/loopback4-authentication?"> |
11 | 17 | </a>
|
12 | 18 | <a href="https://www.npmjs.com/package/loopback4-authentication" target="_blank">
|
13 | 19 | <img alt="downloads" src="https://img.shields.io/npm/dw/loopback4-authentication.svg">
|
@@ -330,7 +336,7 @@ export class BearerTokenVerifyProvider
|
330 | 336 | ) {}
|
331 | 337 |
|
332 | 338 | value(): VerifyFunction.BearerFn {
|
333 |
| - return async (token) => { |
| 339 | + return async token => { |
334 | 340 | if (token && (await this.revokedTokenRepository.get(token))) {
|
335 | 341 | throw new HttpErrors.Unauthorized('Token Revoked');
|
336 | 342 | }
|
@@ -1182,13 +1188,13 @@ this.bind(Strategies.Passport.GOOGLE_OAUTH2_VERIFIER).toProvider(
|
1182 | 1188 | Now, bind this provider to the application in application.ts.
|
1183 | 1189 |
|
1184 | 1190 | ```ts
|
1185 |
| -import { GoogleAuthStrategyFactoryProvider } from 'loopback4-authentication/passport-google-oauth2'; |
| 1191 | +import {GoogleAuthStrategyFactoryProvider} from 'loopback4-authentication/passport-google-oauth2'; |
1186 | 1192 | ```
|
1187 | 1193 |
|
1188 | 1194 | ```ts
|
1189 | 1195 | this.bind(Strategies.Passport.GOOGLE_OAUTH2_STRATEGY_FACTORY.key).toProvider(
|
1190 |
| - GoogleAuthStrategyFactoryProvider |
1191 |
| - ); |
| 1196 | + GoogleAuthStrategyFactoryProvider, |
| 1197 | +); |
1192 | 1198 | ```
|
1193 | 1199 |
|
1194 | 1200 | Finally, add the authenticate function as a sequence action to sequence.ts.
|
@@ -2727,7 +2733,7 @@ export class SamlVerifyProvider implements Provider<VerifyFunction.SamlFn> {
|
2727 | 2733 | public userCredsRepository: UserCredentialsRepository,
|
2728 | 2734 | ) {}
|
2729 | 2735 | value(): VerifyFunction.SamlFn {
|
2730 |
| - return async (profile) => { |
| 2736 | + return async profile => { |
2731 | 2737 | const user = await this.userRepository.findOne({
|
2732 | 2738 | where: {
|
2733 | 2739 | /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
0 commit comments