Skip to content

Commit c2c247f

Browse files
authored
docs(chore): add synk and sonar badges (#205)
badges will be visible on the package GH-203
1 parent 69212bc commit c2c247f

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
<a href="https://www.npmjs.com/package/loopback4-authentication">
77
<img src="https://img.shields.io/npm/v/loopback4-authentication.svg" alt="npm version" />
88
</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>
915
<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?">
1117
</a>
1218
<a href="https://www.npmjs.com/package/loopback4-authentication" target="_blank">
1319
<img alt="downloads" src="https://img.shields.io/npm/dw/loopback4-authentication.svg">
@@ -330,7 +336,7 @@ export class BearerTokenVerifyProvider
330336
) {}
331337

332338
value(): VerifyFunction.BearerFn {
333-
return async (token) => {
339+
return async token => {
334340
if (token && (await this.revokedTokenRepository.get(token))) {
335341
throw new HttpErrors.Unauthorized('Token Revoked');
336342
}
@@ -1182,13 +1188,13 @@ this.bind(Strategies.Passport.GOOGLE_OAUTH2_VERIFIER).toProvider(
11821188
Now, bind this provider to the application in application.ts.
11831189

11841190
```ts
1185-
import { GoogleAuthStrategyFactoryProvider } from 'loopback4-authentication/passport-google-oauth2';
1191+
import {GoogleAuthStrategyFactoryProvider} from 'loopback4-authentication/passport-google-oauth2';
11861192
```
11871193

11881194
```ts
11891195
this.bind(Strategies.Passport.GOOGLE_OAUTH2_STRATEGY_FACTORY.key).toProvider(
1190-
GoogleAuthStrategyFactoryProvider
1191-
);
1196+
GoogleAuthStrategyFactoryProvider,
1197+
);
11921198
```
11931199

11941200
Finally, add the authenticate function as a sequence action to sequence.ts.
@@ -2727,7 +2733,7 @@ export class SamlVerifyProvider implements Provider<VerifyFunction.SamlFn> {
27272733
public userCredsRepository: UserCredentialsRepository,
27282734
) {}
27292735
value(): VerifyFunction.SamlFn {
2730-
return async (profile) => {
2736+
return async profile => {
27312737
const user = await this.userRepository.findOne({
27322738
where: {
27332739
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */

0 commit comments

Comments
 (0)