@dudousxd/adonis-authkit-server 0.1.0 → 0.1.1
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
}}}
|
|
4
4
|
import env from '#start/env'
|
|
5
5
|
import AuthUser from '#models/auth_user'
|
|
6
|
-
import { defineConfig, adapters } from '@authkit
|
|
6
|
+
import { defineConfig, adapters } from '@dudousxd/adonis-authkit-server'
|
|
7
7
|
|
|
8
8
|
const authServerConfig = defineConfig({
|
|
9
9
|
issuer: env.get('AUTHKIT_ISSUER'),
|
|
@@ -3,11 +3,20 @@
|
|
|
3
3
|
}}}
|
|
4
4
|
import { BaseModel, column } from '@adonisjs/lucid/orm'
|
|
5
5
|
import { compose } from '@adonisjs/core/helpers'
|
|
6
|
-
import { withAuthUser, withCredentials } from '@authkit
|
|
6
|
+
import { withAuthUser, withCredentials } from '@dudousxd/adonis-authkit-server'
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Por padrão o AuthKit cria/usa as tabelas na conexão DEFAULT da aplicação
|
|
10
|
+
* (config/database.ts) — não força nenhum banco/schema próprio.
|
|
11
|
+
*
|
|
12
|
+
* Se você quiser isolar o AuthKit num schema ou banco dedicado, defina uma
|
|
13
|
+
* conexão no config/database.ts do app e referencie aqui, ex.:
|
|
14
|
+
*
|
|
15
|
+
* static connection = 'auth'
|
|
16
|
+
*
|
|
17
|
+
* (e aponte as migrations correspondentes para essa conexão).
|
|
18
|
+
*/
|
|
8
19
|
export default class AuthUser extends compose(BaseModel, withAuthUser(), withCredentials()) {
|
|
9
|
-
static connection = 'auth'
|
|
10
|
-
|
|
11
20
|
@column({ isPrimary: true })
|
|
12
21
|
declare id: string
|
|
13
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/adonis-authkit-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "AdonisJS OIDC/OAuth2 provider (Identity Provider) toolkit: ejectable auth server with sessions, rate-limiting, MFA/TOTP, audit log, federated logout and OpenTelemetry metrics.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dudousxd",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
}}}
|
|
4
4
|
import env from '#start/env'
|
|
5
5
|
import AuthUser from '#models/auth_user'
|
|
6
|
-
import { defineConfig, adapters } from '@authkit
|
|
6
|
+
import { defineConfig, adapters } from '@dudousxd/adonis-authkit-server'
|
|
7
7
|
|
|
8
8
|
const authServerConfig = defineConfig({
|
|
9
9
|
issuer: env.get('AUTHKIT_ISSUER'),
|
|
@@ -3,11 +3,20 @@
|
|
|
3
3
|
}}}
|
|
4
4
|
import { BaseModel, column } from '@adonisjs/lucid/orm'
|
|
5
5
|
import { compose } from '@adonisjs/core/helpers'
|
|
6
|
-
import { withAuthUser, withCredentials } from '@authkit
|
|
6
|
+
import { withAuthUser, withCredentials } from '@dudousxd/adonis-authkit-server'
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Por padrão o AuthKit cria/usa as tabelas na conexão DEFAULT da aplicação
|
|
10
|
+
* (config/database.ts) — não força nenhum banco/schema próprio.
|
|
11
|
+
*
|
|
12
|
+
* Se você quiser isolar o AuthKit num schema ou banco dedicado, defina uma
|
|
13
|
+
* conexão no config/database.ts do app e referencie aqui, ex.:
|
|
14
|
+
*
|
|
15
|
+
* static connection = 'auth'
|
|
16
|
+
*
|
|
17
|
+
* (e aponte as migrations correspondentes para essa conexão).
|
|
18
|
+
*/
|
|
8
19
|
export default class AuthUser extends compose(BaseModel, withAuthUser(), withCredentials()) {
|
|
9
|
-
static connection = 'auth'
|
|
10
|
-
|
|
11
20
|
@column({ isPrimary: true })
|
|
12
21
|
declare id: string
|
|
13
22
|
}
|