@vercube/auth 0.0.34 → 0.0.36
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 +30 -24
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,34 +1,40 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<
|
|
2
|
+
<img src="https://raw.githubusercontent.com/vercube/vercube/refs/heads/main/.github/assets/cover.png" width="100%" alt="Vercube - Unleash your server development." />
|
|
3
3
|
<br>
|
|
4
4
|
<br>
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href="https://codecov.io/gh/vercube/vercube" target="_blank">
|
|
20
|
-
<img src="https://img.shields.io/codecov/c/github/vercube/vercube?style=for-the-badge&color=%23767eff" alt="Coverage"/>
|
|
21
|
-
</a>
|
|
22
|
-
<br/>
|
|
23
|
-
<br/>
|
|
6
|
+
# @vercube/auth
|
|
7
|
+
|
|
8
|
+
### Authentication for Vercube apps
|
|
9
|
+
|
|
10
|
+
[&labelColor=%23000&color=%232f2f2f>)](https://deepwiki.com/vercube/vercube)
|
|
11
|
+
&labelColor=%23000&color=%232e2e2e&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40vercube%2Fauth>)
|
|
12
|
+
&labelColor=%23000&color=%232f2f2f>)
|
|
13
|
+
&labelColor=%23000&color=%232f2f2f>)
|
|
14
|
+
|
|
15
|
+
**Flexible authentication module - protect your endpoints with `@Auth()`, inject users with `@User()`, and implement any auth strategy you need (JWT, sessions, API keys, whatever).**
|
|
16
|
+
|
|
17
|
+
[Website](https://vercube.dev) • [Documentation](https://vercube.dev/docs/getting-started)
|
|
18
|
+
|
|
24
19
|
</div>
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
## ✨ Features
|
|
22
|
+
|
|
23
|
+
- **Provider-based** - implement your own auth logic by extending `AuthProvider`
|
|
24
|
+
- **Simple decorators** - `@Auth()` protects routes, `@User()` gives you the current user
|
|
25
|
+
- **Role-based access** - `@Auth({ roles: ['admin'] })` restricts by role
|
|
26
|
+
- **Type-safe** - full TypeScript support with generic user types
|
|
27
|
+
|
|
28
|
+
## 📦 Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pnpm add @vercube/auth
|
|
32
|
+
```
|
|
27
33
|
|
|
28
|
-
##
|
|
34
|
+
## 📖 Usage
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
Check out the full [documentation](https://vercube.dev/docs/modules/auth/overview)
|
|
31
37
|
|
|
32
|
-
##
|
|
38
|
+
## 📜 License
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
[MIT](https://github.com/vercube/vercube/blob/main/LICENSE)
|
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { Logger } from "@vercube/logger";
|
|
|
6
6
|
var AuthProvider = class {};
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region \0@oxc-project+runtime@0.
|
|
9
|
+
//#region \0@oxc-project+runtime@0.110.0/helpers/decorate.js
|
|
10
10
|
function __decorate(decorators, target, key, desc) {
|
|
11
11
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
12
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercube/auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"description": "Auth module for Vercube framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@vercube/core": "0.0.
|
|
26
|
-
"@vercube/
|
|
27
|
-
"@vercube/
|
|
25
|
+
"@vercube/core": "0.0.36",
|
|
26
|
+
"@vercube/di": "0.0.36",
|
|
27
|
+
"@vercube/logger": "0.0.36"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|