Skip to content

Commit aa5b1dc

Browse files
docs(chore): add arc branding (#100)
add arc branding GH-99
1 parent 05d2fed commit aa5b1dc

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
# loopback4-authorization
2-
3-
[![LoopBack](<https://github.com/strongloop/loopback-next/raw/master/docs/site/imgs/branding/Powered-by-LoopBack-Badge-(blue)-@2x.png>)](http://loopback.io/)
4-
5-
[![Node version](https://img.shields.io/node/v/loopback4-authorization.svg?style=flat-square)](https://nodejs.org/en/download/)
6-
[![Loopback Core Version](https://img.shields.io/npm/dependency-version/loopback4-authorization/@loopback/core.svg?color=dark%20green&style=flat-square)](https://github.com/strongloop/loopback-next)
7-
[![Loopback Build Version](https://img.shields.io/npm/dependency-version/loopback4-authorization/dev/@loopback/build.svg?color=dark%20green&style=flat-square)](https://github.com/strongloop/loopback-next/tree/master/packages/build)
8-
[![npm vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/loopback4-authorization.svg?style=flat-square)](https://www.npmjs.com/package/loopback4-authorization)
9-
10-
[![Latest version](https://img.shields.io/npm/v/loopback4-authorization.svg?style=flat-square)](https://www.npmjs.com/package/loopback4-authorization)
11-
[![License](https://img.shields.io/github/license/sourcefuse/loopback4-authorization.svg?color=blue&label=License&style=flat-square)](https://github.com/sourcefuse/loopback4-authorization/blob/master/LICENSE)
12-
[![Downloads](https://img.shields.io/npm/dw/loopback4-authorization.svg?label=Downloads&style=flat-square&color=blue)](https://www.npmjs.com/package/loopback4-authorization)
13-
[![Total Downloads](https://img.shields.io/npm/dt/loopback4-authorization.svg?label=Total%20Downloads&style=flat-square&color=blue)](https://www.npmjs.com/package/loopback4-authorization)
1+
<a href="https://sourcefuse.github.io/arc-docs/arc-api-docs" target="_blank"><img src="https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/docs/assets/logo-dark-bg.png?raw=true" alt="ARC By SourceFuse logo" title="ARC By SourceFuse" align="right" width="150" /></a>
2+
3+
# [loopback4-authorization](https://github.com/sourcefuse/loopback4-authorization)
4+
5+
<p align="left">
6+
<a href="https://www.npmjs.com/package/loopback4-authorization">
7+
<img src="https://img.shields.io/npm/v/loopback4-authorization.svg?style=flat-square" alt="npm version" />
8+
</a>
9+
<a href="https://github.com/sourcefuse/loopback4-authorization/graphs/contributors" target="_blank">
10+
<img alt="GitHub contributors" src="https://img.shields.io/github/contributors/sourcefuse/loopback4-authorization">
11+
</a>
12+
<a href="https://www.npmjs.com/package/loopback4-authorization" target="_blank">
13+
<img alt="downloads" src="https://img.shields.io/npm/dw/loopback4-authorization.svg">
14+
</a>
15+
<a href="./LICENSE">
16+
<img src="https://img.shields.io/github/license/sourcefuse/loopback4-authorization.svg" alt="License" />
17+
</a>
18+
<a href="https://loopback.io/" target="_blank">
19+
<img alt="Powered By LoopBack 4" src="https://img.shields.io/badge/Powered%20by-LoopBack 4-brightgreen" />
20+
</a>
21+
</p>
22+
23+
## Overview
1424

1525
A loopback-next extension for authorization in loopback applications. Its a very simplistic yet powerful and effective implementation using simple string based permissions.
1626

@@ -267,6 +277,7 @@ export const enum PermissionKey {
267277
DeleteAudit = 'DeleteAudit',
268278
}
269279
```
280+
270281
- To Override the permissions provided in enum `permissionKey` file:
271282

272283
If the userPermission object is provided,it overrides the default permissions in the authorizationMetadata object.
@@ -290,27 +301,29 @@ this.bind(AuthorizationBindings.PERMISSION).to({
290301
291302
# Serving the static files:
292303
293-
Authorization configuration binding sets up paths that can be accessed without any authorization checks, allowing static files to be served directly from the root URL of the application.The allowAlwaysPaths property is used to define these paths for the files in public directory i.e for a test.html file in public directory ,one can provide its path as follows:
304+
Authorization configuration binding sets up paths that can be accessed without any authorization checks, allowing static files to be served directly from the root URL of the application.The allowAlwaysPaths property is used to define these paths for the files in public directory i.e for a test.html file in public directory ,one can provide its path as follows:
294305
295306
```
296307
this.bind(AuthorizationBindings.CONFIG).to({
297308
allowAlwaysPaths: ['/explorer','/test.html'],
298309
});
299310
```
300311
301-
To set up the public directory as a static,one can add the following in application.ts file.
312+
To set up the public directory as a static,one can add the following in application.ts file.
302313
303314
```
304315
this.static('/', path.join(__dirname, '../public'));
305316

306317
```
307-
If ,in case the file is in some other folder then `app.static()` can be called multiple times to configure the app to serve static assets from different directories.
318+
319+
If ,in case the file is in some other folder then `app.static()` can be called multiple times to configure the app to serve static assets from different directories.
308320
309321
```
310322
this.static('/', path.join(__dirname, '../public'));
311323
this.static('/downloads', path.join(__dirname, '../downloads'));
312324

313325
```
326+
314327
For more details,refer [here](https://loopback.io/doc/en/lb4/Serving-static-files.html#:~:text=One%20of%20the%20basic%20requirements,the%20API%20are%20explained%20below.)
315328
316329
# Extension enhancement using CASBIN authorisation
@@ -572,7 +585,6 @@ async create(@requestBody() role: Role): Promise<Role> {
572585
}
573586
```
574587
575-
576588
## Feedback
577589
578590
If you've noticed a bug or have a question or have a feature request, [search the issue tracker](https://github.com/sourcefuse/loopback4-authorization/issues) to see if someone else in the community has already created a ticket.

0 commit comments

Comments
 (0)