@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 CHANGED
@@ -1,34 +1,40 @@
1
1
  <div align="center">
2
- <a href="https://vercube.dev/"><img src="https://github.com/OskarLebuda/vue-lazy-hydration/raw/main/.github/assets/logo.png?raw=true" alt="Vite logo" width="200"></a>
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
- # Vercube
7
-
8
- Next generation HTTP framework
9
-
10
- <a href="https://www.npmjs.com/package/@vercube/auth">
11
- <img src="https://img.shields.io/npm/v/%40vercube%2Fauth?style=for-the-badge&logo=npm&color=%23767eff" alt="npm"/>
12
- </a>
13
- <a href="https://www.npmjs.com/package/@vercube/auth">
14
- <img src="https://img.shields.io/npm/dm/%40vercube%2Fauth?style=for-the-badge&logo=npm&color=%23767eff" alt="npm"/>
15
- </a>
16
- <a href="https://github.com/vercube/vercube/blob/main/LICENSE" target="_blank">
17
- <img src="https://img.shields.io/npm/l/%40vercube%2Fauth?style=for-the-badge&color=%23767eff" alt="License"/>
18
- </a>
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
+ [![Ask DeepWiki](<https://img.shields.io/badge/ask-deepwiki-%20blue?style=for-the-badge&logo=bookstack&logoColor=rgba(255%2C%20255%2C%20255%2C%200.6)&labelColor=%23000&color=%232f2f2f>)](https://deepwiki.com/vercube/vercube)
11
+ ![NPM Version](<https://img.shields.io/npm/v/%40vercube%2Fauth?style=for-the-badge&logo=npm&logoColor=rgba(255%2C%20255%2C%20255%2C%200.6)&labelColor=%23000&color=%232e2e2e&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40vercube%2Fauth>)
12
+ ![GitHub License](<https://img.shields.io/github/license/vercube/vercube?style=for-the-badge&logo=gitbook&logoColor=rgba(255%2C%20255%2C%20255%2C%200.6)&labelColor=%23000&color=%232f2f2f>)
13
+ ![Codecov](<https://img.shields.io/codecov/c/github/vercube/vercube?style=for-the-badge&logo=vitest&logoColor=rgba(255%2C%20255%2C%20255%2C%200.6)&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
- An ultra-efficient JavaScript server framework that runs anywhere - Node.js, Bun, or Deno - with unmatched flexibility and complete configurability for developers who refuse to sacrifice speed or control.
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
- ## <a name="module">Auth module</a>
34
+ ## 📖 Usage
29
35
 
30
- The Auth module provides a flexible and extensible authentication and authorization system for Vercube applications. It offers a unified interface for different authentication implementations through a dependency injection-based architecture.
36
+ Check out the full [documentation](https://vercube.dev/docs/modules/auth/overview)
31
37
 
32
- ## <a name="documentation">📖 Documentation</a>
38
+ ## 📜 License
33
39
 
34
- Comprehensive documentation is available at [vercube.dev](https://vercube.dev). There you'll find detailed module descriptions, project information, guides, and everything else you need to know about Vercube.
40
+ [MIT](https://github.com/vercube/vercube/blob/main/LICENSE)
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { BaseMiddleware, MiddlewareOptions } from "@vercube/core";
2
2
 
3
3
  //#region src/Services/AuthProvider.d.ts
4
-
5
4
  declare abstract class AuthProvider<U = unknown> {
6
5
  /**
7
6
  * Validate authentication
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.99.0/helpers/decorate.js
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.34",
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.34",
26
- "@vercube/logger": "0.0.34",
27
- "@vercube/di": "0.0.34"
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"