@carlonicora/nestjs-neo4jsonapi 1.111.0 → 1.112.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/dist/agents/graph/tools/describe-entity.tool.d.ts +1 -1
- package/dist/agents/graph/tools/describe-entity.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/describe-entity.tool.js +2 -1
- package/dist/agents/graph/tools/describe-entity.tool.js.map +1 -1
- package/dist/agents/graph/tools/read-entity.tool.d.ts +1 -1
- package/dist/agents/graph/tools/read-entity.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/read-entity.tool.js +2 -1
- package/dist/agents/graph/tools/read-entity.tool.js.map +1 -1
- package/dist/agents/graph/tools/resolve-entity.tool.d.ts +1 -1
- package/dist/agents/graph/tools/resolve-entity.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/resolve-entity.tool.js +2 -1
- package/dist/agents/graph/tools/resolve-entity.tool.js.map +1 -1
- package/dist/agents/graph/tools/search-entities.tool.d.ts +1 -1
- package/dist/agents/graph/tools/search-entities.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/search-entities.tool.js +2 -1
- package/dist/agents/graph/tools/search-entities.tool.js.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.d.ts +1 -1
- package/dist/agents/graph/tools/traverse.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.js +2 -1
- package/dist/agents/graph/tools/traverse.tool.js.map +1 -1
- package/dist/agents/operator/tools/search-documents.tool.d.ts +1 -1
- package/dist/agents/operator/tools/search-documents.tool.d.ts.map +1 -1
- package/dist/agents/operator/tools/search-documents.tool.js +2 -1
- package/dist/agents/operator/tools/search-documents.tool.js.map +1 -1
- package/dist/bootstrap/app.module.factory.d.ts.map +1 -1
- package/dist/bootstrap/app.module.factory.js +3 -0
- package/dist/bootstrap/app.module.factory.js.map +1 -1
- package/dist/bootstrap/bootstrap.options.d.ts +2 -0
- package/dist/bootstrap/bootstrap.options.d.ts.map +1 -1
- package/dist/config/base.config.d.ts.map +1 -1
- package/dist/config/base.config.js +9 -0
- package/dist/config/base.config.js.map +1 -1
- package/dist/config/interfaces/base.config.interface.d.ts +2 -0
- package/dist/config/interfaces/base.config.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.mcp.interface.d.ts +34 -0
- package/dist/config/interfaces/config.mcp.interface.d.ts.map +1 -0
- package/dist/config/interfaces/config.mcp.interface.js +3 -0
- package/dist/config/interfaces/config.mcp.interface.js.map +1 -0
- package/dist/config/interfaces/index.d.ts +1 -0
- package/dist/config/interfaces/index.d.ts.map +1 -1
- package/dist/config/interfaces/index.js +1 -0
- package/dist/config/interfaces/index.js.map +1 -1
- package/dist/foundations/oauth/constants/oauth.scopes.d.ts +2 -0
- package/dist/foundations/oauth/constants/oauth.scopes.d.ts.map +1 -1
- package/dist/foundations/oauth/constants/oauth.scopes.js +4 -0
- package/dist/foundations/oauth/constants/oauth.scopes.js.map +1 -1
- package/dist/foundations/oauth/controllers/index.d.ts +2 -0
- package/dist/foundations/oauth/controllers/index.d.ts.map +1 -1
- package/dist/foundations/oauth/controllers/index.js +2 -0
- package/dist/foundations/oauth/controllers/index.js.map +1 -1
- package/dist/foundations/oauth/controllers/oauth.discovery.controller.d.ts +46 -0
- package/dist/foundations/oauth/controllers/oauth.discovery.controller.d.ts.map +1 -0
- package/dist/foundations/oauth/controllers/oauth.discovery.controller.js +102 -0
- package/dist/foundations/oauth/controllers/oauth.discovery.controller.js.map +1 -0
- package/dist/foundations/oauth/controllers/oauth.registration.controller.d.ts +36 -0
- package/dist/foundations/oauth/controllers/oauth.registration.controller.d.ts.map +1 -0
- package/dist/foundations/oauth/controllers/oauth.registration.controller.js +81 -0
- package/dist/foundations/oauth/controllers/oauth.registration.controller.js.map +1 -0
- package/dist/foundations/oauth/dtos/index.d.ts +1 -0
- package/dist/foundations/oauth/dtos/index.d.ts.map +1 -1
- package/dist/foundations/oauth/dtos/index.js +1 -0
- package/dist/foundations/oauth/dtos/index.js.map +1 -1
- package/dist/foundations/oauth/dtos/oauth.register.dto.d.ts +14 -0
- package/dist/foundations/oauth/dtos/oauth.register.dto.d.ts.map +1 -0
- package/dist/foundations/oauth/dtos/oauth.register.dto.js +49 -0
- package/dist/foundations/oauth/dtos/oauth.register.dto.js.map +1 -0
- package/dist/foundations/oauth/index.d.ts +1 -0
- package/dist/foundations/oauth/index.d.ts.map +1 -1
- package/dist/foundations/oauth/index.js +3 -1
- package/dist/foundations/oauth/index.js.map +1 -1
- package/dist/foundations/oauth/oauth.module.d.ts +3 -1
- package/dist/foundations/oauth/oauth.module.d.ts.map +1 -1
- package/dist/foundations/oauth/oauth.module.js +12 -2
- package/dist/foundations/oauth/oauth.module.js.map +1 -1
- package/dist/foundations/oauth/repositories/oauth.repository.d.ts +2 -1
- package/dist/foundations/oauth/repositories/oauth.repository.d.ts.map +1 -1
- package/dist/foundations/oauth/repositories/oauth.repository.js +16 -34
- package/dist/foundations/oauth/repositories/oauth.repository.js.map +1 -1
- package/dist/foundations/oauth/services/oauth.client.service.d.ts +2 -1
- package/dist/foundations/oauth/services/oauth.client.service.d.ts.map +1 -1
- package/dist/foundations/oauth/services/oauth.client.service.js.map +1 -1
- package/dist/foundations/rbac/index.d.ts +4 -0
- package/dist/foundations/rbac/index.d.ts.map +1 -1
- package/dist/foundations/rbac/index.js +7 -1
- package/dist/foundations/rbac/index.js.map +1 -1
- package/dist/foundations/rbac/rbac-permission.module.d.ts +14 -0
- package/dist/foundations/rbac/rbac-permission.module.d.ts.map +1 -0
- package/dist/foundations/rbac/rbac-permission.module.js +33 -0
- package/dist/foundations/rbac/rbac-permission.module.js.map +1 -0
- package/dist/foundations/rbac/repositories/rbac-permission.repository.d.ts +31 -0
- package/dist/foundations/rbac/repositories/rbac-permission.repository.d.ts.map +1 -0
- package/dist/foundations/rbac/repositories/rbac-permission.repository.js +80 -0
- package/dist/foundations/rbac/repositories/rbac-permission.repository.js.map +1 -0
- package/dist/foundations/rbac/services/rbac-permission.service.d.ts +31 -0
- package/dist/foundations/rbac/services/rbac-permission.service.d.ts.map +1 -0
- package/dist/foundations/rbac/services/rbac-permission.service.js +41 -0
- package/dist/foundations/rbac/services/rbac-permission.service.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/controllers/mcp.controller.d.ts +34 -0
- package/dist/mcp/controllers/mcp.controller.d.ts.map +1 -0
- package/dist/mcp/controllers/mcp.controller.js +108 -0
- package/dist/mcp/controllers/mcp.controller.js.map +1 -0
- package/dist/mcp/filters/mcp.auth.filter.d.ts +21 -0
- package/dist/mcp/filters/mcp.auth.filter.d.ts.map +1 -0
- package/dist/mcp/filters/mcp.auth.filter.js +52 -0
- package/dist/mcp/filters/mcp.auth.filter.js.map +1 -0
- package/dist/mcp/index.d.ts +4 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +11 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/interfaces/mcp.tool.interface.d.ts +37 -0
- package/dist/mcp/interfaces/mcp.tool.interface.d.ts.map +1 -0
- package/dist/mcp/interfaces/mcp.tool.interface.js +6 -0
- package/dist/mcp/interfaces/mcp.tool.interface.js.map +1 -0
- package/dist/mcp/mcp.module.d.ts +23 -0
- package/dist/mcp/mcp.module.d.ts.map +1 -0
- package/dist/mcp/mcp.module.js +59 -0
- package/dist/mcp/mcp.module.js.map +1 -0
- package/dist/mcp/services/mcp.entity.write.service.d.ts +79 -0
- package/dist/mcp/services/mcp.entity.write.service.d.ts.map +1 -0
- package/dist/mcp/services/mcp.entity.write.service.js +270 -0
- package/dist/mcp/services/mcp.entity.write.service.js.map +1 -0
- package/dist/mcp/services/mcp.errors.d.ts +24 -0
- package/dist/mcp/services/mcp.errors.d.ts.map +1 -0
- package/dist/mcp/services/mcp.errors.js +50 -0
- package/dist/mcp/services/mcp.errors.js.map +1 -0
- package/dist/mcp/services/mcp.generic.tools.service.d.ts +26 -0
- package/dist/mcp/services/mcp.generic.tools.service.d.ts.map +1 -0
- package/dist/mcp/services/mcp.generic.tools.service.js +108 -0
- package/dist/mcp/services/mcp.generic.tools.service.js.map +1 -0
- package/dist/mcp/services/mcp.promoted.tools.factory.d.ts +58 -0
- package/dist/mcp/services/mcp.promoted.tools.factory.d.ts.map +1 -0
- package/dist/mcp/services/mcp.promoted.tools.factory.js +260 -0
- package/dist/mcp/services/mcp.promoted.tools.factory.js.map +1 -0
- package/dist/mcp/services/mcp.server.factory.d.ts +24 -0
- package/dist/mcp/services/mcp.server.factory.d.ts.map +1 -0
- package/dist/mcp/services/mcp.server.factory.js +60 -0
- package/dist/mcp/services/mcp.server.factory.js.map +1 -0
- package/dist/mcp/services/mcp.tool.registry.d.ts +21 -0
- package/dist/mcp/services/mcp.tool.registry.d.ts.map +1 -0
- package/dist/mcp/services/mcp.tool.registry.js +72 -0
- package/dist/mcp/services/mcp.tool.registry.js.map +1 -0
- package/package.json +17 -12
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP (Model Context Protocol) Server Configuration Interface
|
|
3
|
+
*
|
|
4
|
+
* Controls the MCP server exposed at POST /mcp, which lets external AI agents
|
|
5
|
+
* (claude.ai connectors, Claude Desktop, ChatGPT) interact with the application
|
|
6
|
+
* through OAuth-authenticated, RBAC-gated tools.
|
|
7
|
+
*
|
|
8
|
+
* @see https://modelcontextprotocol.io - Model Context Protocol specification
|
|
9
|
+
*/
|
|
10
|
+
export interface ConfigMcpInterface {
|
|
11
|
+
/**
|
|
12
|
+
* Master switch to enable/disable the MCP server.
|
|
13
|
+
* When false, the MCP endpoint is not served.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Server name advertised to MCP clients during initialization.
|
|
19
|
+
* @default "neural-erp"
|
|
20
|
+
*/
|
|
21
|
+
serverName: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optional instructions string advertised to MCP clients,
|
|
24
|
+
* describing how to best use this server's tools.
|
|
25
|
+
*/
|
|
26
|
+
instructions?: string;
|
|
27
|
+
/**
|
|
28
|
+
* JSON:API types promoted to dedicated per-entity MCP tools,
|
|
29
|
+
* parsed from a comma-separated environment variable.
|
|
30
|
+
* @default []
|
|
31
|
+
*/
|
|
32
|
+
promotedEntities: string[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=config.mcp.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.mcp.interface.d.ts","sourceRoot":"","sources":["../../../src/config/interfaces/config.mcp.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.mcp.interface.js","sourceRoot":"","sources":["../../../src/config/interfaces/config.mcp.interface.ts"],"names":[],"mappings":""}
|
|
@@ -21,6 +21,7 @@ export * from "./config.interface";
|
|
|
21
21
|
export * from "./config.job.names.interface";
|
|
22
22
|
export * from "./config.jwt.interface";
|
|
23
23
|
export * from "./config.logging.interface";
|
|
24
|
+
export * from "./config.mcp.interface";
|
|
24
25
|
export * from "./config.neo4j.interface";
|
|
25
26
|
export * from "./config.oauth.interface";
|
|
26
27
|
export * from "./config.operator.interface";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/interfaces/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;A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,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC"}
|
|
@@ -37,6 +37,7 @@ __exportStar(require("./config.interface"), exports);
|
|
|
37
37
|
__exportStar(require("./config.job.names.interface"), exports);
|
|
38
38
|
__exportStar(require("./config.jwt.interface"), exports);
|
|
39
39
|
__exportStar(require("./config.logging.interface"), exports);
|
|
40
|
+
__exportStar(require("./config.mcp.interface"), exports);
|
|
40
41
|
__exportStar(require("./config.neo4j.interface"), exports);
|
|
41
42
|
__exportStar(require("./config.oauth.interface"), exports);
|
|
42
43
|
__exportStar(require("./config.operator.interface"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/interfaces/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0DAAwC;AACxC,wDAAsC;AACtC,yDAAuC;AACvC,yDAAuC;AACvC,0DAAwC;AACxC,2DAAyC;AACzC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,0DAAwC;AACxC,6DAA2C;AAC3C,uEAAqD;AACrD,4DAA0C;AAC1C,2DAAyC;AACzC,gEAA8C;AAC9C,iEAA+C;AAC/C,qDAAmC;AACnC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,2DAAyC;AACzC,2DAAyC;AACzC,8DAA4C;AAC5C,6DAA2C;AAC3C,+DAA6C;AAC7C,2DAAyC;AACzC,wDAAsC;AACtC,4DAA0C;AAC1C,2DAAyC;AACzC,gEAA8C;AAC9C,2DAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/interfaces/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0DAAwC;AACxC,wDAAsC;AACtC,yDAAuC;AACvC,yDAAuC;AACvC,0DAAwC;AACxC,2DAAyC;AACzC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,0DAAwC;AACxC,6DAA2C;AAC3C,uEAAqD;AACrD,4DAA0C;AAC1C,2DAAyC;AACzC,gEAA8C;AAC9C,iEAA+C;AAC/C,qDAAmC;AACnC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,yDAAuC;AACvC,2DAAyC;AACzC,2DAAyC;AACzC,8DAA4C;AAC5C,6DAA2C;AAC3C,+DAA6C;AAC7C,2DAAyC;AACzC,wDAAsC;AACtC,4DAA0C;AAC1C,2DAAyC;AACzC,gEAA8C;AAC9C,2DAAyC"}
|
|
@@ -21,6 +21,8 @@ export declare const OAuth2Scopes: {
|
|
|
21
21
|
readonly ROLLS_WRITE: "rolls:write";
|
|
22
22
|
/** Access to user profile information (name, email) */
|
|
23
23
|
readonly PROFILE: "profile";
|
|
24
|
+
/** Access to the MCP (Model Context Protocol) server */
|
|
25
|
+
readonly MCP: "mcp";
|
|
24
26
|
/** Administrative access - restricted to platform admins */
|
|
25
27
|
readonly ADMIN: "admin";
|
|
26
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.scopes.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/constants/oauth.scopes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAA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AAE,CAEzD;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,cAAc,GAAG,OAAO,CAEjF"}
|
|
@@ -27,6 +27,8 @@ exports.OAuth2Scopes = {
|
|
|
27
27
|
ROLLS_WRITE: "rolls:write",
|
|
28
28
|
/** Access to user profile information (name, email) */
|
|
29
29
|
PROFILE: "profile",
|
|
30
|
+
/** Access to the MCP (Model Context Protocol) server */
|
|
31
|
+
MCP: "mcp",
|
|
30
32
|
/** Administrative access - restricted to platform admins */
|
|
31
33
|
ADMIN: "admin",
|
|
32
34
|
};
|
|
@@ -44,6 +46,7 @@ exports.OAuthScopeNames = {
|
|
|
44
46
|
[exports.OAuth2Scopes.ROLLS_READ]: "View Rolls",
|
|
45
47
|
[exports.OAuth2Scopes.ROLLS_WRITE]: "Manage Rolls",
|
|
46
48
|
[exports.OAuth2Scopes.PROFILE]: "View Profile",
|
|
49
|
+
[exports.OAuth2Scopes.MCP]: "MCP Server Access",
|
|
47
50
|
[exports.OAuth2Scopes.ADMIN]: "Administrative Access",
|
|
48
51
|
};
|
|
49
52
|
/**
|
|
@@ -58,6 +61,7 @@ exports.OAuthScopeDescriptions = {
|
|
|
58
61
|
[exports.OAuth2Scopes.ROLLS_READ]: "View your rolls and albums",
|
|
59
62
|
[exports.OAuth2Scopes.ROLLS_WRITE]: "Create and modify rolls and albums",
|
|
60
63
|
[exports.OAuth2Scopes.PROFILE]: "View your profile information (name, email)",
|
|
64
|
+
[exports.OAuth2Scopes.MCP]: "Let an AI assistant read and act on your data through the MCP server",
|
|
61
65
|
[exports.OAuth2Scopes.ADMIN]: "Administrative access to the platform",
|
|
62
66
|
};
|
|
63
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.scopes.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/constants/oauth.scopes.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"oauth.sc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C,oBAAY,CAAC,KAAK,CAAC,EAAE,2BAA2B;IACjD,CAAC,oBAAY,CAAC,gBAAgB,CAAC,EAAE,uBAAuB;IACxD,CAAC,oBAAY,CAAC,iBAAiB,CAAC,EAAE,oCAAoC;IACtE,CAAC,oBAAY,CAAC,UAAU,CAAC,EAAE,4BAA4B;IACvD,CAAC,oBAAY,CAAC,WAAW,CAAC,EAAE,oCAAoC;IAChE,CAAC,oBAAY,CAAC,OAAO,CAAC,EAAE,6CAA6C;IACrE,CAAC,oBAAY,CAAC,GAAG,CAAC,EAAE,sEAAsE;IAC1F,CAAC,oBAAY,CAAC,KAAK,CAAC,EAAE,uCAAuC;CAC9D,CAAC;AAEF;;;;GAIG;AACH,SAAgB,cAAc,CAAC,MAAyB;IACtD,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACtF,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,0BAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACzE,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,WAAmB;IAC7C,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAAgB,EAAE,aAA6B;IACtE,OAAO,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./oauth.authorize.controller";
|
|
2
2
|
export * from "./oauth.token.controller";
|
|
3
3
|
export * from "./oauth.management.controller";
|
|
4
|
+
export * from "./oauth.registration.controller";
|
|
5
|
+
export * from "./oauth.discovery.controller";
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC"}
|
|
@@ -17,4 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./oauth.authorize.controller"), exports);
|
|
18
18
|
__exportStar(require("./oauth.token.controller"), exports);
|
|
19
19
|
__exportStar(require("./oauth.management.controller"), exports);
|
|
20
|
+
__exportStar(require("./oauth.registration.controller"), exports);
|
|
21
|
+
__exportStar(require("./oauth.discovery.controller"), exports);
|
|
20
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,2DAAyC;AACzC,gEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,2DAAyC;AACzC,gEAA8C;AAC9C,kEAAgD;AAChD,+DAA6C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ConfigService } from "@nestjs/config";
|
|
2
|
+
/**
|
|
3
|
+
* OAuth Discovery Controller
|
|
4
|
+
*
|
|
5
|
+
* Serves the well-known metadata documents MCP clients use to
|
|
6
|
+
* discover the authorization server and protected resource:
|
|
7
|
+
* - RFC 8414 Authorization Server Metadata
|
|
8
|
+
* - RFC 9728 Protected Resource Metadata
|
|
9
|
+
*
|
|
10
|
+
* Both endpoints are public (no guard) per their RFCs and return
|
|
11
|
+
* plain JSON (not JSON:API) — the RFCs mandate their own wire format.
|
|
12
|
+
*/
|
|
13
|
+
export declare class OAuthDiscoveryController {
|
|
14
|
+
private readonly configService;
|
|
15
|
+
constructor(configService: ConfigService);
|
|
16
|
+
/**
|
|
17
|
+
* Authorization Server Metadata (RFC 8414)
|
|
18
|
+
*
|
|
19
|
+
* GET /.well-known/oauth-authorization-server
|
|
20
|
+
*
|
|
21
|
+
* Endpoint paths mirror the actual routes registered by
|
|
22
|
+
* OAuthTokenController and OAuthRegistrationController.
|
|
23
|
+
*
|
|
24
|
+
* `authorization_endpoint` deliberately points at the WEB app's consent
|
|
25
|
+
* page (app.url), not the API's Bearer-guarded /oauth/authorize route: a
|
|
26
|
+
* browser navigation carries no Authorization header, so the API route can
|
|
27
|
+
* never authenticate it. The web page handles login, then calls the API's
|
|
28
|
+
* authorize/approve endpoint with the user's JWT and redirects back to the
|
|
29
|
+
* client with the authorization code.
|
|
30
|
+
*/
|
|
31
|
+
authorizationServer(): Record<string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Protected Resource Metadata (RFC 9728)
|
|
34
|
+
*
|
|
35
|
+
* GET /.well-known/oauth-protected-resource
|
|
36
|
+
*
|
|
37
|
+
* Consumed by MCP clients to locate the authorization server
|
|
38
|
+
* protecting the /mcp resource.
|
|
39
|
+
*/
|
|
40
|
+
protectedResource(): Record<string, unknown>;
|
|
41
|
+
/** API base URL without trailing slash (api.url is normalized to end with one). */
|
|
42
|
+
private baseUrl;
|
|
43
|
+
/** Web-app base URL without trailing slash — hosts the browser-facing consent page. */
|
|
44
|
+
private appBaseUrl;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=oauth.discovery.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.discovery.controller.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/oauth.discovery.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,qBACa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAEzD;;;;;;;;;;;;;;OAcG;IAEH,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAiB9C;;;;;;;OAOG;IAEH,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ5C,mFAAmF;IACnF,OAAO,CAAC,OAAO;IAIf,uFAAuF;IACvF,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OAuthDiscoveryController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
15
|
+
/**
|
|
16
|
+
* OAuth Discovery Controller
|
|
17
|
+
*
|
|
18
|
+
* Serves the well-known metadata documents MCP clients use to
|
|
19
|
+
* discover the authorization server and protected resource:
|
|
20
|
+
* - RFC 8414 Authorization Server Metadata
|
|
21
|
+
* - RFC 9728 Protected Resource Metadata
|
|
22
|
+
*
|
|
23
|
+
* Both endpoints are public (no guard) per their RFCs and return
|
|
24
|
+
* plain JSON (not JSON:API) — the RFCs mandate their own wire format.
|
|
25
|
+
*/
|
|
26
|
+
let OAuthDiscoveryController = class OAuthDiscoveryController {
|
|
27
|
+
constructor(configService) {
|
|
28
|
+
this.configService = configService;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Authorization Server Metadata (RFC 8414)
|
|
32
|
+
*
|
|
33
|
+
* GET /.well-known/oauth-authorization-server
|
|
34
|
+
*
|
|
35
|
+
* Endpoint paths mirror the actual routes registered by
|
|
36
|
+
* OAuthTokenController and OAuthRegistrationController.
|
|
37
|
+
*
|
|
38
|
+
* `authorization_endpoint` deliberately points at the WEB app's consent
|
|
39
|
+
* page (app.url), not the API's Bearer-guarded /oauth/authorize route: a
|
|
40
|
+
* browser navigation carries no Authorization header, so the API route can
|
|
41
|
+
* never authenticate it. The web page handles login, then calls the API's
|
|
42
|
+
* authorize/approve endpoint with the user's JWT and redirects back to the
|
|
43
|
+
* client with the authorization code.
|
|
44
|
+
*/
|
|
45
|
+
authorizationServer() {
|
|
46
|
+
const base = this.baseUrl();
|
|
47
|
+
return {
|
|
48
|
+
issuer: base,
|
|
49
|
+
authorization_endpoint: `${this.appBaseUrl()}/oauth/authorize`,
|
|
50
|
+
token_endpoint: `${base}/oauth/token`,
|
|
51
|
+
registration_endpoint: `${base}/oauth/register`,
|
|
52
|
+
revocation_endpoint: `${base}/oauth/revoke`,
|
|
53
|
+
introspection_endpoint: `${base}/oauth/introspect`,
|
|
54
|
+
response_types_supported: ["code"],
|
|
55
|
+
grant_types_supported: ["authorization_code", "refresh_token"],
|
|
56
|
+
code_challenge_methods_supported: ["S256"],
|
|
57
|
+
token_endpoint_auth_methods_supported: ["none", "client_secret_basic", "client_secret_post"],
|
|
58
|
+
scopes_supported: ["mcp"],
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Protected Resource Metadata (RFC 9728)
|
|
63
|
+
*
|
|
64
|
+
* GET /.well-known/oauth-protected-resource
|
|
65
|
+
*
|
|
66
|
+
* Consumed by MCP clients to locate the authorization server
|
|
67
|
+
* protecting the /mcp resource.
|
|
68
|
+
*/
|
|
69
|
+
protectedResource() {
|
|
70
|
+
const base = this.baseUrl();
|
|
71
|
+
return {
|
|
72
|
+
resource: `${base}/mcp`,
|
|
73
|
+
authorization_servers: [base],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** API base URL without trailing slash (api.url is normalized to end with one). */
|
|
77
|
+
baseUrl() {
|
|
78
|
+
return this.configService.get("api").url.replace(/\/$/, "");
|
|
79
|
+
}
|
|
80
|
+
/** Web-app base URL without trailing slash — hosts the browser-facing consent page. */
|
|
81
|
+
appBaseUrl() {
|
|
82
|
+
return this.configService.get("app").url.replace(/\/$/, "");
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
exports.OAuthDiscoveryController = OAuthDiscoveryController;
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, common_1.Get)("oauth-authorization-server"),
|
|
88
|
+
__metadata("design:type", Function),
|
|
89
|
+
__metadata("design:paramtypes", []),
|
|
90
|
+
__metadata("design:returntype", Object)
|
|
91
|
+
], OAuthDiscoveryController.prototype, "authorizationServer", null);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, common_1.Get)("oauth-protected-resource"),
|
|
94
|
+
__metadata("design:type", Function),
|
|
95
|
+
__metadata("design:paramtypes", []),
|
|
96
|
+
__metadata("design:returntype", Object)
|
|
97
|
+
], OAuthDiscoveryController.prototype, "protectedResource", null);
|
|
98
|
+
exports.OAuthDiscoveryController = OAuthDiscoveryController = __decorate([
|
|
99
|
+
(0, common_1.Controller)(".well-known"),
|
|
100
|
+
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
101
|
+
], OAuthDiscoveryController);
|
|
102
|
+
//# sourceMappingURL=oauth.discovery.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.discovery.controller.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/oauth.discovery.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,2CAA+C;AAE/C;;;;;;;;;;GAUG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACnC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D;;;;;;;;;;;;;;OAcG;IAEH,mBAAmB;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,sBAAsB,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE,kBAAkB;YAC9D,cAAc,EAAE,GAAG,IAAI,cAAc;YACrC,qBAAqB,EAAE,GAAG,IAAI,iBAAiB;YAC/C,mBAAmB,EAAE,GAAG,IAAI,eAAe;YAC3C,sBAAsB,EAAE,GAAG,IAAI,mBAAmB;YAClD,wBAAwB,EAAE,CAAC,MAAM,CAAC;YAClC,qBAAqB,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;YAC9D,gCAAgC,EAAE,CAAC,MAAM,CAAC;YAC1C,qCAAqC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,oBAAoB,CAAC;YAC5F,gBAAgB,EAAE,CAAC,KAAK,CAAC;SAC1B,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IAEH,iBAAiB;QACf,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,OAAO;YACL,QAAQ,EAAE,GAAG,IAAI,MAAM;YACvB,qBAAqB,EAAE,CAAC,IAAI,CAAC;SAC9B,CAAC;IACJ,CAAC;IAED,mFAAmF;IAC3E,OAAO;QACb,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAkB,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,uFAAuF;IAC/E,UAAU;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAkB,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF,CAAA;AA9DY,4DAAwB;AAmBnC;IADC,IAAA,YAAG,EAAC,4BAA4B,CAAC;;;;mEAgBjC;AAWD;IADC,IAAA,YAAG,EAAC,0BAA0B,CAAC;;;;iEAO/B;mCAnDU,wBAAwB;IADpC,IAAA,mBAAU,EAAC,aAAa,CAAC;qCAEoB,sBAAa;GAD9C,wBAAwB,CA8DpC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ConfigService } from "@nestjs/config";
|
|
2
|
+
import { OAuthRegisterDto } from "../dtos/oauth.register.dto";
|
|
3
|
+
import { OAuthClientService } from "../services/oauth.client.service";
|
|
4
|
+
/**
|
|
5
|
+
* OAuth Dynamic Client Registration Controller
|
|
6
|
+
*
|
|
7
|
+
* Implements RFC 7591 Dynamic Client Registration.
|
|
8
|
+
* Allows MCP clients (claude.ai connectors, Claude Desktop, ChatGPT)
|
|
9
|
+
* to self-register before starting the authorization code flow.
|
|
10
|
+
*
|
|
11
|
+
* The response is the RFC 7591 client information wire format
|
|
12
|
+
* (plain JSON, not JSON:API) — same convention as /oauth/token.
|
|
13
|
+
*/
|
|
14
|
+
export declare class OAuthRegistrationController {
|
|
15
|
+
private readonly clientService;
|
|
16
|
+
private readonly configService;
|
|
17
|
+
constructor(clientService: OAuthClientService, configService: ConfigService);
|
|
18
|
+
/**
|
|
19
|
+
* Client Registration Endpoint (RFC 7591 Section 3)
|
|
20
|
+
*
|
|
21
|
+
* POST /oauth/register
|
|
22
|
+
*
|
|
23
|
+
* Public endpoint (no guard) — required by MCP clients, which
|
|
24
|
+
* register before any user credentials exist.
|
|
25
|
+
*/
|
|
26
|
+
register(dto: OAuthRegisterDto): Promise<{
|
|
27
|
+
client_id: string;
|
|
28
|
+
client_secret?: string;
|
|
29
|
+
client_id_issued_at: number;
|
|
30
|
+
redirect_uris: string[];
|
|
31
|
+
grant_types: string[];
|
|
32
|
+
token_endpoint_auth_method: string;
|
|
33
|
+
client_name: string;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=oauth.registration.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.registration.controller.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/oauth.registration.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE;;;;;;;;;GASG;AACH,qBACa,2BAA2B;IAEpC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,aAAa,EAAE,kBAAkB,EACjC,aAAa,EAAE,aAAa;IAG/C;;;;;;;OAOG;IAGG,QAAQ,CAAS,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC;QACrD,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,mBAAmB,EAAE,MAAM,CAAC;QAC5B,aAAa,EAAE,MAAM,EAAE,CAAC;QACxB,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,0BAA0B,EAAE,MAAM,CAAC;QACnC,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CA0BH"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.OAuthRegistrationController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const config_1 = require("@nestjs/config");
|
|
18
|
+
const oauth_register_dto_1 = require("../dtos/oauth.register.dto");
|
|
19
|
+
const oauth_client_service_1 = require("../services/oauth.client.service");
|
|
20
|
+
/**
|
|
21
|
+
* OAuth Dynamic Client Registration Controller
|
|
22
|
+
*
|
|
23
|
+
* Implements RFC 7591 Dynamic Client Registration.
|
|
24
|
+
* Allows MCP clients (claude.ai connectors, Claude Desktop, ChatGPT)
|
|
25
|
+
* to self-register before starting the authorization code flow.
|
|
26
|
+
*
|
|
27
|
+
* The response is the RFC 7591 client information wire format
|
|
28
|
+
* (plain JSON, not JSON:API) — same convention as /oauth/token.
|
|
29
|
+
*/
|
|
30
|
+
let OAuthRegistrationController = class OAuthRegistrationController {
|
|
31
|
+
constructor(clientService, configService) {
|
|
32
|
+
this.clientService = clientService;
|
|
33
|
+
this.configService = configService;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Client Registration Endpoint (RFC 7591 Section 3)
|
|
37
|
+
*
|
|
38
|
+
* POST /oauth/register
|
|
39
|
+
*
|
|
40
|
+
* Public endpoint (no guard) — required by MCP clients, which
|
|
41
|
+
* register before any user credentials exist.
|
|
42
|
+
*/
|
|
43
|
+
async register(dto) {
|
|
44
|
+
const oauth = this.configService.get("oauth");
|
|
45
|
+
if (!oauth?.enabled) {
|
|
46
|
+
throw new common_1.HttpException("OAuth is not enabled", 404);
|
|
47
|
+
}
|
|
48
|
+
const isConfidential = dto.token_endpoint_auth_method !== undefined && dto.token_endpoint_auth_method !== "none";
|
|
49
|
+
const { client, clientSecret } = await this.clientService.createClient({
|
|
50
|
+
name: dto.client_name ?? "Dynamically registered client",
|
|
51
|
+
redirectUris: dto.redirect_uris,
|
|
52
|
+
allowedScopes: dto.scope ? dto.scope.split(" ").filter(Boolean) : ["mcp"],
|
|
53
|
+
allowedGrantTypes: dto.grant_types ?? ["authorization_code", "refresh_token"],
|
|
54
|
+
isConfidential,
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
client_id: client.clientId,
|
|
58
|
+
...(clientSecret ? { client_secret: clientSecret } : {}),
|
|
59
|
+
client_id_issued_at: Math.floor(Date.now() / 1000),
|
|
60
|
+
redirect_uris: client.redirectUris,
|
|
61
|
+
grant_types: client.allowedGrantTypes,
|
|
62
|
+
token_endpoint_auth_method: isConfidential ? dto.token_endpoint_auth_method : "none",
|
|
63
|
+
client_name: client.name,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.OAuthRegistrationController = OAuthRegistrationController;
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, common_1.Post)("register"),
|
|
70
|
+
(0, common_1.HttpCode)(201),
|
|
71
|
+
__param(0, (0, common_1.Body)()),
|
|
72
|
+
__metadata("design:type", Function),
|
|
73
|
+
__metadata("design:paramtypes", [oauth_register_dto_1.OAuthRegisterDto]),
|
|
74
|
+
__metadata("design:returntype", Promise)
|
|
75
|
+
], OAuthRegistrationController.prototype, "register", null);
|
|
76
|
+
exports.OAuthRegistrationController = OAuthRegistrationController = __decorate([
|
|
77
|
+
(0, common_1.Controller)("oauth"),
|
|
78
|
+
__metadata("design:paramtypes", [oauth_client_service_1.OAuthClientService,
|
|
79
|
+
config_1.ConfigService])
|
|
80
|
+
], OAuthRegistrationController);
|
|
81
|
+
//# sourceMappingURL=oauth.registration.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.registration.controller.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/controllers/oauth.registration.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiF;AACjF,2CAA+C;AAE/C,mEAA8D;AAC9D,2EAAsE;AAEtE;;;;;;;;;GASG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACtC,YACmB,aAAiC,EACjC,aAA4B;QAD5B,kBAAa,GAAb,aAAa,CAAoB;QACjC,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAEJ;;;;;;;OAOG;IAGG,AAAN,KAAK,CAAC,QAAQ,CAAS,GAAqB;QAS1C,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAuB,OAAO,CAAC,CAAC;QACpE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,sBAAa,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,cAAc,GAAG,GAAG,CAAC,0BAA0B,KAAK,SAAS,IAAI,GAAG,CAAC,0BAA0B,KAAK,MAAM,CAAC;QAEjH,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;YACrE,IAAI,EAAE,GAAG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dto";
|
|
4
5
|
export * from "./oauth.revoke.dto";
|
|
5
6
|
export * from "./oauth.token.dto";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/dtos/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/dtos/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./oauth.authorize.dto"), exports);
|
|
18
18
|
__exportStar(require("./oauth.client.dto"), exports);
|
|
19
19
|
__exportStar(require("./oauth.introspect.dto"), exports);
|
|
20
|
+
__exportStar(require("./oauth.register.dto"), exports);
|
|
20
21
|
__exportStar(require("./oauth.revoke.dto"), exports);
|
|
21
22
|
__exportStar(require("./oauth.token.dto"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,qDAAmC;AACnC,yDAAuC;AACvC,qDAAmC;AACnC,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,qDAAmC;AACnC,yDAAuC;AACvC,uDAAqC;AACrC,qDAAmC;AACnC,oDAAkC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth Dynamic Client Registration Request (RFC 7591 Section 2)
|
|
3
|
+
*
|
|
4
|
+
* Used for POST /oauth/register. Field names follow the RFC 7591
|
|
5
|
+
* client metadata wire format (snake_case).
|
|
6
|
+
*/
|
|
7
|
+
export declare class OAuthRegisterDto {
|
|
8
|
+
redirect_uris: string[];
|
|
9
|
+
client_name?: string;
|
|
10
|
+
grant_types?: string[];
|
|
11
|
+
token_endpoint_auth_method?: string;
|
|
12
|
+
scope?: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=oauth.register.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.register.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/oauth/dtos/oauth.register.dto.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,qBAAa,gBAAgB;IAG3B,aAAa,EAAE,MAAM,EAAE,CAAC;IAIxB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAIvB,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAIpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OAuthRegisterDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/**
|
|
15
|
+
* OAuth Dynamic Client Registration Request (RFC 7591 Section 2)
|
|
16
|
+
*
|
|
17
|
+
* Used for POST /oauth/register. Field names follow the RFC 7591
|
|
18
|
+
* client metadata wire format (snake_case).
|
|
19
|
+
*/
|
|
20
|
+
class OAuthRegisterDto {
|
|
21
|
+
}
|
|
22
|
+
exports.OAuthRegisterDto = OAuthRegisterDto;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsArray)(),
|
|
25
|
+
(0, class_validator_1.IsUrl)({ require_tld: false }, { each: true }),
|
|
26
|
+
__metadata("design:type", Array)
|
|
27
|
+
], OAuthRegisterDto.prototype, "redirect_uris", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], OAuthRegisterDto.prototype, "client_name", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsArray)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.IsIn)(["authorization_code", "refresh_token"], { each: true }),
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], OAuthRegisterDto.prototype, "grant_types", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsIn)(["none", "client_secret_basic", "client_secret_post"]),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], OAuthRegisterDto.prototype, "token_endpoint_auth_method", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], OAuthRegisterDto.prototype, "scope", void 0);
|
|
49
|
+
//# sourceMappingURL=oauth.register.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.register.dto.js","sourceRoot":"","sources":["../../../../src/foundations/oauth/dtos/oauth.register.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6E;AAE7E;;;;;GAKG;AACH,MAAa,gBAAgB;CAqB5B;AArBD,4CAqBC;AAlBC;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,uBAAK,EAAC,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uDACtB;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACQ;AAKrB;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;IACZ,IAAA,sBAAI,EAAC,CAAC,oBAAoB,EAAE,eAAe,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;qDACvC;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,sBAAI,EAAC,CAAC,MAAM,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;;oEACxB;AAIpC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACE"}
|
|
@@ -28,6 +28,7 @@ export { OAuthTokenRequestDto, OAuthTokenResponseDto } from "./dtos/oauth.token.
|
|
|
28
28
|
export { OAuthRevokeRequestDto } from "./dtos/oauth.revoke.dto";
|
|
29
29
|
export { OAuthIntrospectRequestDto, OAuthIntrospectResponseDto } from "./dtos/oauth.introspect.dto";
|
|
30
30
|
export { OAuthClientCreateDto, OAuthClientUpdateDto } from "./dtos/oauth.client.dto";
|
|
31
|
+
export { OAuthRegisterDto } from "./dtos/oauth.register.dto";
|
|
31
32
|
export { OAuthClientSerialiser } from "./serialisers/oauth.client.serialiser";
|
|
32
33
|
export { OAuthTokenSerialiser } from "./serialisers/oauth.token.serialiser";
|
|
33
34
|
export type { CreateClientParams, UpdateClientParams } from "./services/oauth.client.service";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/oauth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG7D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,YAAY,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,YAAY,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,qBAAqB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
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.OAuthTokenSerialiser = exports.OAuthClientSerialiser = exports.OAuthClientUpdateDto = exports.OAuthClientCreateDto = exports.OAuthIntrospectResponseDto = exports.OAuthIntrospectRequestDto = exports.OAuthRevokeRequestDto = exports.OAuthTokenResponseDto = exports.OAuthTokenRequestDto = exports.OAuthAuthorizeQueryDto = exports.OAuthRefreshTokenModel = exports.OAuthAccessTokenModel = exports.OAuthClientModel = exports.oauthRefreshTokenMeta = exports.oauthAccessTokenMeta = exports.oauthClientMeta = exports.createOAuthError = exports.OAuthErrorCodes = exports.VALID_OAUTH_SCOPES = exports.OAuth2Scopes = exports.OAuthTokenGuard = exports.OAuthPkceService = exports.OAuthTokenService = exports.OAuthClientService = exports.OAuthService = exports.OAuthModule = void 0;
|
|
9
|
+
exports.OAuthTokenSerialiser = exports.OAuthClientSerialiser = exports.OAuthRegisterDto = exports.OAuthClientUpdateDto = exports.OAuthClientCreateDto = exports.OAuthIntrospectResponseDto = exports.OAuthIntrospectRequestDto = exports.OAuthRevokeRequestDto = exports.OAuthTokenResponseDto = exports.OAuthTokenRequestDto = exports.OAuthAuthorizeQueryDto = exports.OAuthRefreshTokenModel = exports.OAuthAccessTokenModel = exports.OAuthClientModel = exports.oauthRefreshTokenMeta = exports.oauthAccessTokenMeta = exports.oauthClientMeta = exports.createOAuthError = exports.OAuthErrorCodes = exports.VALID_OAUTH_SCOPES = exports.OAuth2Scopes = exports.OAuthTokenGuard = exports.OAuthPkceService = exports.OAuthTokenService = exports.OAuthClientService = exports.OAuthService = exports.OAuthModule = void 0;
|
|
10
10
|
// Module
|
|
11
11
|
var oauth_module_1 = require("./oauth.module");
|
|
12
12
|
Object.defineProperty(exports, "OAuthModule", { enumerable: true, get: function () { return oauth_module_1.OAuthModule; } });
|
|
@@ -56,6 +56,8 @@ Object.defineProperty(exports, "OAuthIntrospectResponseDto", { enumerable: true,
|
|
|
56
56
|
var oauth_client_dto_1 = require("./dtos/oauth.client.dto");
|
|
57
57
|
Object.defineProperty(exports, "OAuthClientCreateDto", { enumerable: true, get: function () { return oauth_client_dto_1.OAuthClientCreateDto; } });
|
|
58
58
|
Object.defineProperty(exports, "OAuthClientUpdateDto", { enumerable: true, get: function () { return oauth_client_dto_1.OAuthClientUpdateDto; } });
|
|
59
|
+
var oauth_register_dto_1 = require("./dtos/oauth.register.dto");
|
|
60
|
+
Object.defineProperty(exports, "OAuthRegisterDto", { enumerable: true, get: function () { return oauth_register_dto_1.OAuthRegisterDto; } });
|
|
59
61
|
// Serializers
|
|
60
62
|
var oauth_client_serialiser_1 = require("./serialisers/oauth.client.serialiser");
|
|
61
63
|
Object.defineProperty(exports, "OAuthClientSerialiser", { enumerable: true, get: function () { return oauth_client_serialiser_1.OAuthClientSerialiser; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/oauth/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,SAAS;AACT,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AAEpB,WAAW;AACX,0DAAwD;AAA/C,6GAAA,YAAY,OAAA;AACrB,wEAAqE;AAA5D,0HAAA,kBAAkB,OAAA;AAC3B,sEAAmE;AAA1D,wHAAA,iBAAiB,OAAA;AAC1B,oEAAiE;AAAxD,sHAAA,gBAAgB,OAAA;AAEzB,SAAS;AACT,gEAA6D;AAApD,oHAAA,eAAe,OAAA;AAExB,YAAY;AACZ,yDAA4E;AAAnE,4GAAA,YAAY,OAAA;AAAE,kHAAA,kBAAkB,OAAA;AAEzC,yDAA6E;AAApE,+GAAA,eAAe,OAAA;AAAE,gHAAA,gBAAgB,OAAA;AAK1C,kEAA+D;AAAtD,oHAAA,eAAe,OAAA;AAExB,kFAA4E;AAAnE,iIAAA,oBAAoB,OAAA;AAE7B,oFAA8E;AAArE,mIAAA,qBAAqB,OAAA;AAE9B,SAAS;AACT,oEAAiE;AAAxD,sH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E/B,OAAO;AACP,kEAAoE;AAA3D,6HAAA,sBAAsB,OAAA;AAC/B,0DAAqF;AAA5E,uHAAA,oBAAoB,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AACpD,4DAAgE;AAAvD,yHAAA,qBAAqB,OAAA;AAC9B,oEAAoG;AAA3F,iIAAA,yBAAyB,OAAA;AAAE,kIAAA,0BAA0B,OAAA;AAC9D,4DAAqF;AAA5E,wHAAA,oBAAoB,OAAA;AAAE,wHAAA,oBAAoB,OAAA;AACnD,gEAA6D;AAApD,sHAAA,gBAAgB,OAAA;AAEzB,cAAc;AACd,iFAA8E;AAArE,gIAAA,qBAAqB,OAAA;AAC9B,+EAA4E;AAAnE,8HAAA,oBAAoB,OAAA"}
|
|
@@ -4,7 +4,9 @@ import { OnModuleInit } from "@nestjs/common";
|
|
|
4
4
|
*
|
|
5
5
|
* Provides OAuth2 Authorization Server functionality.
|
|
6
6
|
* Implements RFC 6749 (OAuth 2.0), RFC 7636 (PKCE),
|
|
7
|
-
* RFC 7009 (Token Revocation),
|
|
7
|
+
* RFC 7009 (Token Revocation), RFC 7662 (Token Introspection),
|
|
8
|
+
* RFC 7591 (Dynamic Client Registration), RFC 8414 (Authorization
|
|
9
|
+
* Server Metadata), and RFC 9728 (Protected Resource Metadata).
|
|
8
10
|
*
|
|
9
11
|
* @example
|
|
10
12
|
* // In your app module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/oauth/oauth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"oauth.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/oauth/oauth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAgCtD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAmCa,WAAY,YAAW,YAAY;IAC9C;;;OAGG;IACH,YAAY;CAKb"}
|