authcascade 1.5.25 → 1.5.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -77
- package/package.json +1 -6
package/README.md
CHANGED
|
@@ -1,85 +1,32 @@
|
|
|
1
|
+
# AuthCascade
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/pino)
|
|
4
|
-
[](https://github.com/pinojs/pino/actions)
|
|
5
|
-
[](https://standardjs.com/)
|
|
3
|
+
AuthCascade is a lightweight, flexible, and secure authentication module for Node.js applications. It provides easy-to-use methods for user authentication, session management, and integration with various authentication strategies.
|
|
6
4
|
|
|
7
|
-
##
|
|
5
|
+
## Features
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
- Simple API for user authentication
|
|
8
|
+
- Supports JWT, OAuth, and local strategies
|
|
9
|
+
- Secure password hashing
|
|
10
|
+
- Session management
|
|
11
|
+
- Middleware for easy integration with Express.js
|
|
12
|
+
- Extensible for custom authentication workflows
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
$ yarn add modustack
|
|
17
|
-
```
|
|
14
|
+
## Installation
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
```bash
|
|
17
|
+
npm install authcascade
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
const authCascade = require('authcascade');
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const auth = new authCascade({
|
|
22
|
+
secret: 'your-secret-key', // used for JWT signing
|
|
23
|
+
});
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
format logs during development:
|
|
36
|
-
|
|
37
|
-
### Transports & Log Processing
|
|
38
|
-
|
|
39
|
-
Due to Node's single-threaded event-loop, it's highly recommended that sending,
|
|
40
|
-
alert triggering, reformatting, and all forms of log processing
|
|
41
|
-
are conducted in a separate process or thread.
|
|
42
|
-
|
|
43
|
-
In Pino terminology, we call all log processors "transports" and recommend that the
|
|
44
|
-
transports be run in a worker thread using our `pino.transport` API.
|
|
45
|
-
|
|
46
|
-
For more details see our [Transports⇗](docs/transports.md) document.
|
|
47
|
-
|
|
48
|
-
### Low overhead
|
|
49
|
-
|
|
50
|
-
Using minimum resources for logging is very important. Log messages
|
|
51
|
-
tend to get added over time and this can lead to a throttling effect
|
|
52
|
-
on applications – such as reduced requests per second.
|
|
53
|
-
|
|
54
|
-
In many cases, Pino is over 5x faster than alternatives.
|
|
55
|
-
|
|
56
|
-
See the [Benchmarks](docs/benchmarks.md) document for comparisons.
|
|
57
|
-
|
|
58
|
-
### Bundling support
|
|
59
|
-
|
|
60
|
-
Pino supports being bundled using tools like webpack or esbuild.
|
|
61
|
-
|
|
62
|
-
See [Bundling](docs/bundling.md) document for more information.
|
|
63
|
-
|
|
64
|
-
## Contributing
|
|
65
|
-
|
|
66
|
-
Pino is an **OPEN Open Source Project**. This means that:
|
|
67
|
-
|
|
68
|
-
> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
|
|
69
|
-
|
|
70
|
-
See the [CONTRIBUTING.md](https://github.com/pinojs/pino/blob/main/CONTRIBUTING.md) file for more details.
|
|
71
|
-
|
|
72
|
-
<a name="acknowledgments"></a>
|
|
73
|
-
## Acknowledgments
|
|
74
|
-
|
|
75
|
-
This project was kindly sponsored by [nearForm](https://nearform.com).
|
|
76
|
-
This project is kindly sponsored by [Platformatic](https://platformatic.dev).
|
|
77
|
-
|
|
78
|
-
Logo and identity designed by Cosmic Fox Design: https://www.behance.net/cosmicfox.
|
|
79
|
-
|
|
80
|
-
## License
|
|
81
|
-
|
|
82
|
-
Licensed under [MIT](./LICENSE).
|
|
83
|
-
|
|
84
|
-
[elasticsearch]: https://www.elastic.co/products/elasticsearch
|
|
85
|
-
[kibana]: https://www.elastic.co/products/kibana
|
|
25
|
+
// Authenticate user
|
|
26
|
+
auth.login(username, password)
|
|
27
|
+
.then(user => {
|
|
28
|
+
console.log('Authenticated user:', user);
|
|
29
|
+
})
|
|
30
|
+
.catch(err => {
|
|
31
|
+
console.error('Authentication failed:', err);
|
|
32
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authcascade",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.26",
|
|
4
4
|
"description": "managing authentication tokens, including generation, validation, and refresh workflows.",
|
|
5
5
|
"main": "pino.js",
|
|
6
6
|
"subModuleVersion": "4",
|
|
@@ -14,13 +14,8 @@
|
|
|
14
14
|
"stream",
|
|
15
15
|
"json"
|
|
16
16
|
],
|
|
17
|
-
"author": "Robert King <hello@modustack.com>",
|
|
18
17
|
"contributors": [],
|
|
19
18
|
"license": "MIT",
|
|
20
|
-
"bugs": {
|
|
21
|
-
"url": "https://modustack.com/issues"
|
|
22
|
-
},
|
|
23
|
-
"homepage": "https://getpino.io",
|
|
24
19
|
"tsd": {
|
|
25
20
|
"directory": "test/types"
|
|
26
21
|
},
|