You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ahref="https://sourcefuse.github.io/arc-docs/arc-api-docs"target="_blank"><imgsrc="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>
<imgalt="Powered By LoopBack 4"src="https://img.shields.io/badge/Powered%20by-LoopBack 4-brightgreen" />
20
+
</a>
21
+
</p>
22
+
23
+
## Overview
14
24
15
25
A loopback-next extension for authorization in loopback applications. Its a very simplistic yet powerful and effective implementation using simple string based permissions.
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:
294
305
295
306
```
296
307
this.bind(AuthorizationBindings.CONFIG).to({
297
308
allowAlwaysPaths: ['/explorer','/test.html'],
298
309
});
299
310
```
300
311
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.
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.
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.)
315
328
316
329
# Extension enhancement using CASBIN authorisation
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