strapi-oauth-mcp-manager 0.1.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/README.md +143 -0
- package/dist/_chunks/App-CjW3NftW.mjs +23 -0
- package/dist/_chunks/App-DsMhfKkM.js +23 -0
- package/dist/_chunks/en-B4KWt_jN.js +4 -0
- package/dist/_chunks/en-Byx4XI2L.mjs +4 -0
- package/dist/_chunks/index-B2ShbPnj.js +65 -0
- package/dist/_chunks/index-DzBaU9Fw.mjs +66 -0
- package/dist/admin/index.js +3 -0
- package/dist/admin/index.mjs +4 -0
- package/dist/admin/src/components/Initializer.d.ts +5 -0
- package/dist/admin/src/components/PluginIcon.d.ts +2 -0
- package/dist/admin/src/index.d.ts +10 -0
- package/dist/admin/src/pages/App.d.ts +2 -0
- package/dist/admin/src/pages/HomePage.d.ts +2 -0
- package/dist/admin/src/pluginId.d.ts +1 -0
- package/dist/admin/src/utils/getTranslation.d.ts +2 -0
- package/dist/server/index.js +800 -0
- package/dist/server/index.mjs +801 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/index.d.ts +5 -0
- package/dist/server/src/content-types/index.d.ts +208 -0
- package/dist/server/src/controllers/index.d.ts +11 -0
- package/dist/server/src/controllers/oauth.d.ts +31 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/index.d.ts +278 -0
- package/dist/server/src/middlewares/index.d.ts +6 -0
- package/dist/server/src/middlewares/mcp-oauth.d.ts +19 -0
- package/dist/server/src/pluginId.d.ts +1 -0
- package/dist/server/src/policies/index.d.ts +2 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/admin/index.d.ts +2 -0
- package/dist/server/src/routes/content-api/index.d.ts +10 -0
- package/dist/server/src/routes/index.d.ts +19 -0
- package/dist/server/src/services/endpoint.d.ts +37 -0
- package/dist/server/src/services/index.d.ts +22 -0
- package/dist/server/src/services/oauth.d.ts +32 -0
- package/package.json +88 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth Service
|
|
3
|
+
*
|
|
4
|
+
* Provides OAuth token validation and management for MCP plugins.
|
|
5
|
+
*/
|
|
6
|
+
import type { Core } from '@strapi/strapi';
|
|
7
|
+
export interface TokenValidationResult {
|
|
8
|
+
valid: boolean;
|
|
9
|
+
strapiApiToken?: string;
|
|
10
|
+
clientId?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const oauthService: ({ strapi }: {
|
|
14
|
+
strapi: Core.Strapi;
|
|
15
|
+
}) => {
|
|
16
|
+
/**
|
|
17
|
+
* Validate an OAuth access token
|
|
18
|
+
*/
|
|
19
|
+
validateToken(accessToken: string): Promise<TokenValidationResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Revoke all tokens for a client
|
|
22
|
+
*/
|
|
23
|
+
revokeClientTokens(clientId: string): Promise<number>;
|
|
24
|
+
/**
|
|
25
|
+
* Clean up expired tokens and codes
|
|
26
|
+
*/
|
|
27
|
+
cleanupExpired(): Promise<{
|
|
28
|
+
tokens: number;
|
|
29
|
+
codes: number;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
export default oauthService;
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "strapi-oauth-mcp-manager",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Centralized OAuth 2.0 authentication manager for Strapi MCP plugins. Supports ChatGPT, Claude, and custom OAuth clients.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"strapi",
|
|
7
|
+
"plugin",
|
|
8
|
+
"oauth",
|
|
9
|
+
"oauth2",
|
|
10
|
+
"mcp",
|
|
11
|
+
"model-context-protocol",
|
|
12
|
+
"chatgpt",
|
|
13
|
+
"claude",
|
|
14
|
+
"authentication",
|
|
15
|
+
"ai"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Paul Bratslavsky <paul.bratslavsky@strapi.io>",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/PaulBratslavsky/strapi-oauth-mcp-manager"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"type": "commonjs",
|
|
27
|
+
"exports": {
|
|
28
|
+
"./package.json": "./package.json",
|
|
29
|
+
"./strapi-admin": {
|
|
30
|
+
"types": "./dist/admin/src/index.d.ts",
|
|
31
|
+
"source": "./admin/src/index.ts",
|
|
32
|
+
"import": "./dist/admin/index.mjs",
|
|
33
|
+
"require": "./dist/admin/index.js",
|
|
34
|
+
"default": "./dist/admin/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./strapi-server": {
|
|
37
|
+
"types": "./dist/server/src/index.d.ts",
|
|
38
|
+
"source": "./server/src/index.ts",
|
|
39
|
+
"import": "./dist/server/index.mjs",
|
|
40
|
+
"require": "./dist/server/index.js",
|
|
41
|
+
"default": "./dist/server/index.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "strapi-plugin build",
|
|
50
|
+
"watch": "strapi-plugin watch",
|
|
51
|
+
"watch:link": "strapi-plugin watch:link",
|
|
52
|
+
"verify": "strapi-plugin verify",
|
|
53
|
+
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
54
|
+
"test:ts:back": "run -T tsc -p server/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@strapi/design-system": "^2.0.0-rc.30",
|
|
58
|
+
"@strapi/icons": "^2.0.0-rc.30",
|
|
59
|
+
"react-intl": "^8.0.10"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@strapi/strapi": "^5.33.1",
|
|
63
|
+
"@strapi/sdk-plugin": "^5.4.0",
|
|
64
|
+
"prettier": "^3.7.4",
|
|
65
|
+
"react": "^18.3.1",
|
|
66
|
+
"react-dom": "^18.3.1",
|
|
67
|
+
"react-router-dom": "^6.30.2",
|
|
68
|
+
"styled-components": "^6.1.19",
|
|
69
|
+
"@types/react": "^19.2.7",
|
|
70
|
+
"@types/react-dom": "^19.2.3",
|
|
71
|
+
"@strapi/typescript-utils": "^5.33.1",
|
|
72
|
+
"typescript": "^5.9.3"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"@strapi/strapi": "^5.33.1",
|
|
76
|
+
"@strapi/sdk-plugin": "^5.4.0",
|
|
77
|
+
"react": "^18.3.1",
|
|
78
|
+
"react-dom": "^18.3.1",
|
|
79
|
+
"react-router-dom": "^6.30.2",
|
|
80
|
+
"styled-components": "^6.1.19"
|
|
81
|
+
},
|
|
82
|
+
"strapi": {
|
|
83
|
+
"kind": "plugin",
|
|
84
|
+
"name": "strapi-oauth-mcp-manager",
|
|
85
|
+
"displayName": "OAuth MCP Manager",
|
|
86
|
+
"description": "Centralized OAuth 2.0 authentication for Strapi MCP plugins"
|
|
87
|
+
}
|
|
88
|
+
}
|