@adonis-agora/authkit-client 0.13.0 → 0.14.0
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/build/services/main.d.ts +10 -0
- package/build/services/main.js +13 -0
- package/package.json +2 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuthkitClientManager } from "../providers/authkit_client_provider.js";
|
|
2
|
+
/**
|
|
3
|
+
* Singleton accessor for the {@link AuthkitClientManager}, following the Adonis `services/main`
|
|
4
|
+
* convention (like `db`, `mail`, `drive`). Lets an app write
|
|
5
|
+
* `import authkit from "@adonis-agora/authkit-client/services/main"` and read `authkit.clientConfig`
|
|
6
|
+
* / call `authkit.getIdToken(ctx)` etc., instead of resolving the string-keyed `"authkit.client"`
|
|
7
|
+
* binding through the container by hand.
|
|
8
|
+
*/
|
|
9
|
+
declare let manager: AuthkitClientManager;
|
|
10
|
+
export { manager as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import app from "@adonisjs/core/services/app";
|
|
2
|
+
/**
|
|
3
|
+
* Singleton accessor for the {@link AuthkitClientManager}, following the Adonis `services/main`
|
|
4
|
+
* convention (like `db`, `mail`, `drive`). Lets an app write
|
|
5
|
+
* `import authkit from "@adonis-agora/authkit-client/services/main"` and read `authkit.clientConfig`
|
|
6
|
+
* / call `authkit.getIdToken(ctx)` etc., instead of resolving the string-keyed `"authkit.client"`
|
|
7
|
+
* binding through the container by hand.
|
|
8
|
+
*/
|
|
9
|
+
let manager;
|
|
10
|
+
await app.booted(async () => {
|
|
11
|
+
manager = await app.container.make("authkit.client");
|
|
12
|
+
});
|
|
13
|
+
export { manager as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonis-agora/authkit-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "AdonisJS OIDC/OAuth2 relying-party (client) toolkit: session-based authentication against an OpenID Connect identity provider, with JWT/PAT user resolvers and OpenTelemetry metrics.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dudousxd",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"exports": {
|
|
37
37
|
".": "./build/index.js",
|
|
38
38
|
"./types": "./build/index.js",
|
|
39
|
+
"./services/main": "./build/services/main.js",
|
|
39
40
|
"./authkit_client_provider": "./build/providers/authkit_client_provider.js",
|
|
40
41
|
"./authkit_middleware": "./build/src/middleware/authkit_middleware.js",
|
|
41
42
|
"./backchannel_revocation_middleware": "./build/src/middleware/backchannel_revocation_middleware.js",
|