@toa.io/extensions.exposition 1.0.0-alpha.282 → 1.0.0-alpha.284
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/CHANGELOG.md +56 -0
- package/components/exposition.octets/manifest.toa.yaml +11 -0
- package/components/exposition.octets/types/index.d.ts +3 -0
- package/components/exposition.octets/types/toa.d.ts +41 -0
- package/components/identity.bans/operations/transit.js +1 -1
- package/components/identity.bans/tsconfig.json +1 -1
- package/components/identity.bans/tsconfig.tsbuildinfo +1 -1
- package/components/identity.bans/types/index.d.ts +3 -0
- package/components/identity.bans/types/toa.d.ts +34 -0
- package/components/identity.basic/manifest.toa.yaml +13 -2
- package/components/identity.basic/operations/add.js +1 -1
- package/components/identity.basic/operations/authenticate.js +1 -1
- package/components/identity.basic/operations/check.js +1 -1
- package/components/identity.basic/operations/delete.js +1 -1
- package/components/identity.basic/operations/incept.js +18 -2
- package/components/identity.basic/operations/info.js +1 -1
- package/components/identity.basic/operations/lib/credentials.js +1 -1
- package/components/identity.basic/operations/transit.js +3 -2
- package/components/identity.basic/source/add.ts +3 -3
- package/components/identity.basic/source/authenticate.ts +2 -2
- package/components/identity.basic/source/check.ts +1 -1
- package/components/identity.basic/source/delete.ts +2 -2
- package/components/identity.basic/source/incept.ts +31 -3
- package/components/identity.basic/source/info.ts +1 -1
- package/components/identity.basic/source/transit.ts +6 -4
- package/components/identity.basic/tsconfig.json +1 -1
- package/components/identity.basic/tsconfig.tsbuildinfo +1 -1
- package/components/identity.basic/types/index.d.ts +22 -0
- package/components/identity.basic/types/toa.d.ts +121 -0
- package/components/identity.clients/manifest.toa.yaml +243 -0
- package/components/identity.clients/operations/describe.js +44 -0
- package/components/identity.clients/operations/lib/Context.js +2 -0
- package/components/identity.clients/operations/lib/Entity.js +2 -0
- package/components/identity.clients/operations/lib/canonical.js +24 -0
- package/components/identity.clients/operations/lib/cimd.js +86 -0
- package/components/identity.clients/operations/lib/errors.js +5 -0
- package/components/identity.clients/operations/lib/index.js +7 -0
- package/components/identity.clients/operations/lib/redirect.js +32 -0
- package/components/identity.clients/operations/register.js +84 -0
- package/components/identity.clients/source/describe.ts +65 -0
- package/components/identity.clients/source/lib/Context.ts +38 -0
- package/components/identity.clients/source/lib/Entity.ts +31 -0
- package/components/identity.clients/source/lib/canonical.test.ts +43 -0
- package/components/identity.clients/source/lib/canonical.ts +27 -0
- package/components/identity.clients/source/lib/cimd.test.ts +120 -0
- package/components/identity.clients/source/lib/cimd.ts +107 -0
- package/components/identity.clients/source/lib/errors.ts +4 -0
- package/components/identity.clients/source/lib/index.ts +6 -0
- package/components/identity.clients/source/lib/redirect.test.ts +41 -0
- package/components/identity.clients/source/lib/redirect.ts +35 -0
- package/components/identity.clients/source/register.ts +125 -0
- package/components/identity.clients/tsconfig.json +10 -0
- package/components/identity.clients/tsconfig.tsbuildinfo +1 -0
- package/components/identity.clients/types/index.d.ts +3 -0
- package/components/identity.clients/types/toa.d.ts +109 -0
- package/components/identity.credentials/operations/list.js +1 -1
- package/components/identity.credentials/source/list.ts +2 -1
- package/components/identity.credentials/tsconfig.json +4 -2
- package/components/identity.credentials/tsconfig.tsbuildinfo +1 -1
- package/components/identity.credentials/types/index.d.ts +3 -0
- package/components/identity.credentials/types/toa.d.ts +30 -0
- package/components/identity.federation/manifest.toa.yaml +37 -1
- package/components/identity.federation/operations/authenticate.js +7 -3
- package/components/identity.federation/operations/create.js +1 -1
- package/components/identity.federation/operations/decode.js +1 -1
- package/components/identity.federation/operations/delete.js +1 -1
- package/components/identity.federation/operations/incept.js +6 -2
- package/components/identity.federation/operations/lib/Configuration.js +1 -1
- package/components/identity.federation/operations/lib/Ctx.js +1 -1
- package/components/identity.federation/operations/lib/Payload.js +1 -1
- package/components/identity.federation/operations/lib/decode.js +23 -9
- package/components/identity.federation/operations/lib/discovery.js +1 -1
- package/components/identity.federation/operations/lib/errors.js +5 -1
- package/components/identity.federation/operations/lib/exchange.js +12 -7
- package/components/identity.federation/operations/lib/index.js +2 -1
- package/components/identity.federation/operations/lib/jose.js +1 -1
- package/components/identity.federation/operations/lib/principal.js +14 -0
- package/components/identity.federation/operations/lib/resolve.js +1 -1
- package/components/identity.federation/operations/list.js +1 -1
- package/components/identity.federation/operations/types/Scheme.js +1 -1
- package/components/identity.federation/operations/types/configuration.js +1 -1
- package/components/identity.federation/operations/types/context.js +1 -1
- package/components/identity.federation/operations/types/entity.js +1 -1
- package/components/identity.federation/operations/types/index.js +1 -1
- package/components/identity.federation/source/authenticate.ts +9 -3
- package/components/identity.federation/source/incept.ts +7 -1
- package/components/identity.federation/source/lib/Ctx.ts +2 -2
- package/components/identity.federation/source/lib/decode.ts +25 -9
- package/components/identity.federation/source/lib/errors.ts +5 -0
- package/components/identity.federation/source/lib/exchange.ts +11 -7
- package/components/identity.federation/source/lib/index.ts +1 -0
- package/components/identity.federation/source/lib/principal.ts +17 -0
- package/components/identity.federation/source/types/configuration.ts +1 -1
- package/components/identity.federation/source/types/context.ts +6 -2
- package/components/identity.federation/tsconfig.json +4 -2
- package/components/identity.federation/tsconfig.tsbuildinfo +1 -1
- package/components/identity.federation/types/index.d.ts +3 -0
- package/components/identity.federation/types/toa.d.ts +127 -0
- package/components/identity.grants/manifest.toa.yaml +245 -0
- package/components/identity.grants/operations/authorize.js +54 -0
- package/components/identity.grants/operations/exchange.js +89 -0
- package/components/identity.grants/operations/lib/code.js +30 -0
- package/components/identity.grants/operations/lib/identify.js +15 -0
- package/components/identity.grants/operations/lib/index.js +3 -0
- package/components/identity.grants/operations/list.js +18 -0
- package/components/identity.grants/operations/revoke.js +25 -0
- package/components/identity.grants/source/authorize.ts +90 -0
- package/components/identity.grants/source/exchange.ts +130 -0
- package/components/identity.grants/source/lib/code.ts +39 -0
- package/components/identity.grants/source/lib/identify.ts +16 -0
- package/components/identity.grants/source/lib/index.ts +3 -0
- package/components/identity.grants/source/list.ts +28 -0
- package/components/identity.grants/source/revoke.ts +38 -0
- package/components/identity.grants/tsconfig.json +10 -0
- package/components/identity.grants/tsconfig.tsbuildinfo +1 -0
- package/components/identity.grants/types/index.d.ts +60 -0
- package/components/identity.grants/types/toa.d.ts +108 -0
- package/components/identity.keys/manifest.toa.yaml +1 -0
- package/components/identity.keys/operations/create.js +1 -1
- package/components/identity.keys/operations/disable.js +1 -1
- package/components/identity.keys/operations/revoke.js +1 -1
- package/components/identity.keys/source/create.ts +1 -1
- package/components/identity.keys/source/revoke.ts +1 -1
- package/components/identity.keys/tsconfig.json +1 -1
- package/components/identity.keys/tsconfig.tsbuildinfo +1 -1
- package/components/identity.keys/types/index.d.ts +3 -0
- package/components/identity.keys/types/toa.d.ts +47 -0
- package/components/identity.otp/operations/authenticate.js +1 -1
- package/components/identity.otp/operations/issue.js +1 -1
- package/components/identity.otp/operations/lib/Context.js +1 -1
- package/components/identity.otp/operations/lib/Entity.js +1 -1
- package/components/identity.otp/operations/lib/index.js +1 -1
- package/components/identity.otp/source/lib/Context.ts +4 -2
- package/components/identity.otp/tsconfig.json +1 -1
- package/components/identity.otp/tsconfig.tsbuildinfo +1 -1
- package/components/identity.otp/types/index.d.ts +3 -0
- package/components/identity.otp/types/toa.d.ts +56 -0
- package/components/identity.passkeys/manifest.toa.yaml +3 -0
- package/components/identity.passkeys/operations/authenticate.js +1 -1
- package/components/identity.passkeys/operations/challenge.js +1 -1
- package/components/identity.passkeys/operations/create.js +1 -1
- package/components/identity.passkeys/operations/delete.js +1 -1
- package/components/identity.passkeys/operations/lib/const.js +1 -1
- package/components/identity.passkeys/operations/list.js +1 -1
- package/components/identity.passkeys/operations/types/Configuration.js +1 -1
- package/components/identity.passkeys/operations/types/Context.js +1 -1
- package/components/identity.passkeys/operations/types/Passkey.js +1 -1
- package/components/identity.passkeys/operations/types/index.js +1 -1
- package/components/identity.passkeys/operations/use.js +1 -1
- package/components/identity.passkeys/source/authenticate.ts +1 -1
- package/components/identity.passkeys/source/challenge.ts +1 -1
- package/components/identity.passkeys/source/create.ts +1 -1
- package/components/identity.passkeys/source/types/Context.ts +2 -1
- package/components/identity.passkeys/source/use.ts +1 -1
- package/components/identity.passkeys/tsconfig.json +1 -1
- package/components/identity.passkeys/tsconfig.tsbuildinfo +1 -1
- package/components/identity.passkeys/types/index.d.ts +3 -0
- package/components/identity.passkeys/types/toa.d.ts +120 -0
- package/components/identity.roles/operations/grant.js +1 -1
- package/components/identity.roles/operations/lib/Entity.js +1 -1
- package/components/identity.roles/operations/list.js +1 -1
- package/components/identity.roles/operations/principal.js +29 -5
- package/components/identity.roles/source/principal.ts +33 -5
- package/components/identity.roles/tsconfig.json +1 -1
- package/components/identity.roles/tsconfig.tsbuildinfo +1 -1
- package/components/identity.roles/types/index.d.ts +3 -0
- package/components/identity.roles/types/toa.d.ts +43 -0
- package/components/identity.tokens/manifest.toa.yaml +34 -3
- package/components/identity.tokens/operations/authenticate.js +9 -1
- package/components/identity.tokens/operations/decrypt.js +3 -3
- package/components/identity.tokens/operations/encrypt.js +1 -1
- package/components/identity.tokens/operations/issue.js +3 -2
- package/components/identity.tokens/operations/lib/form.js +24 -0
- package/components/identity.tokens/operations/lib/index.js +2 -2
- package/components/identity.tokens/operations/lib/jose.js +1 -1
- package/components/identity.tokens/operations/lib/key.js +1 -1
- package/components/identity.tokens/operations/lib/pad.js +1 -1
- package/components/identity.tokens/operations/revoke.js +1 -1
- package/components/identity.tokens/source/authenticate.test.ts +8 -5
- package/components/identity.tokens/source/authenticate.ts +12 -1
- package/components/identity.tokens/source/decrypt.test.ts +1 -1
- package/components/identity.tokens/source/decrypt.ts +4 -3
- package/components/identity.tokens/source/encrypt.test.ts +1 -1
- package/components/identity.tokens/source/encrypt.ts +2 -1
- package/components/identity.tokens/source/issue.test.ts +71 -0
- package/components/identity.tokens/source/issue.ts +4 -2
- package/components/identity.tokens/source/lib/form.test.ts +25 -0
- package/components/identity.tokens/source/lib/form.ts +31 -0
- package/components/identity.tokens/source/lib/index.ts +2 -1
- package/components/identity.tokens/tsconfig.json +1 -1
- package/components/identity.tokens/tsconfig.tsbuildinfo +1 -1
- package/components/identity.tokens/types/index.d.ts +61 -0
- package/components/identity.tokens/types/toa.d.ts +113 -0
- package/documentation/access.md +13 -0
- package/documentation/cache.md +10 -1
- package/documentation/components.md +3 -0
- package/documentation/consent.md +101 -0
- package/documentation/identity.md +3 -1
- package/documentation/introspection.md +13 -5
- package/documentation/io.md +42 -2
- package/documentation/map.md +8 -0
- package/documentation/mcp.md +180 -0
- package/documentation/oauth.md +180 -0
- package/documentation/protocol.md +4 -0
- package/documentation/rpc.md +140 -0
- package/documentation/tree.md +3 -0
- package/features/auth.bearer.feature +120 -0
- package/features/cache.feature +46 -0
- package/features/identity.basic.feature +44 -0
- package/features/identity.federation.feature +2 -5
- package/features/introspection.feature +333 -0
- package/features/mcp.feature +687 -0
- package/features/oauth.clients.feature +195 -0
- package/features/oauth.discovery.feature +164 -0
- package/features/oauth.grants.feature +299 -0
- package/features/octets.cloudinary.feature +1 -0
- package/features/rpc.feature +429 -0
- package/features/steps/Cloudinary.ts +13 -0
- package/features/steps/Components.ts +0 -4
- package/features/steps/Gateway.ts +23 -2
- package/features/steps/Parameters.ts +22 -7
- package/features/steps/Realtime.ts +3 -0
- package/features/steps/components/echo/manifest.toa.yaml +3 -0
- package/features/steps/components/octets.tester/manifest.toa.yaml +2 -0
- package/features/steps/components/octets.tester/operations/redirect.js +6 -1
- package/features/steps/components/pots/manifest.toa.yaml +2 -0
- package/features/steps/components/users/manifest.toa.yaml +1 -0
- package/package.json +8 -6
- package/readme.md +6 -0
- package/schemas/annotation.cos.yaml +63 -0
- package/schemas/call.cos.yaml +18 -0
- package/source/Annotation.ts +54 -0
- package/source/Directive.test.ts +15 -15
- package/source/Directive.ts +77 -9
- package/source/Endpoint.test.ts +67 -0
- package/source/Endpoint.ts +31 -11
- package/source/Factory.ts +6 -2
- package/source/Gateway.ts +73 -11
- package/source/HTTP/Context.ts +7 -0
- package/source/HTTP/Server.ts +15 -5
- package/source/HTTP/exceptions.ts +2 -2
- package/source/HTTP/formats/form.ts +21 -0
- package/source/HTTP/formats/index.ts +17 -2
- package/source/HTTP/messages.test.ts +25 -1
- package/source/HTTP/messages.ts +20 -4
- package/source/Interception.ts +8 -2
- package/source/Introspection.ts +102 -0
- package/source/MCP/Server.ts +275 -0
- package/source/MCP/discover.ts +52 -0
- package/source/MCP/errors.ts +81 -0
- package/source/MCP/index.ts +1 -0
- package/source/MCP/schema.test.ts +85 -0
- package/source/MCP/schema.ts +87 -0
- package/source/MCP/tools.ts +156 -0
- package/source/MCP/types.ts +81 -0
- package/source/Query.ts +48 -8
- package/source/RPC/Context.ts +78 -0
- package/source/RPC/Dispatcher.ts +130 -0
- package/source/RPC/errors.test.ts +52 -0
- package/source/RPC/errors.ts +83 -0
- package/source/RPC/index.ts +1 -0
- package/source/RPC/names.test.ts +122 -0
- package/source/RPC/names.ts +182 -0
- package/source/RPC/types.ts +34 -0
- package/source/RTD/Directives.ts +52 -2
- package/source/RTD/Endpoint.ts +2 -1
- package/source/RTD/Method.ts +14 -11
- package/source/RTD/Node.ts +38 -7
- package/source/RTD/Route.ts +30 -3
- package/source/RTD/Tree.ts +37 -1
- package/source/RTD/expiration.test.ts +1 -1
- package/source/RTD/walk.test.ts +110 -0
- package/source/const.ts +15 -0
- package/source/deployment.ts +11 -1
- package/source/directives/auth/Anonymous.test.ts +38 -0
- package/source/directives/auth/Anonymous.ts +12 -0
- package/source/directives/auth/Anyone.ts +4 -0
- package/source/directives/auth/Authorization.ts +108 -22
- package/source/directives/auth/Delegate.test.ts +36 -0
- package/source/directives/auth/Delegate.ts +14 -0
- package/source/directives/auth/Echo.ts +5 -0
- package/source/directives/auth/Incept.ts +16 -10
- package/source/directives/auth/Role.ts +13 -0
- package/source/directives/auth/Rule.ts +29 -0
- package/source/directives/auth/Scheme.ts +5 -0
- package/source/directives/auth/schemes.test.ts +8 -4
- package/source/directives/auth/schemes.ts +22 -9
- package/source/directives/auth/types.ts +26 -2
- package/source/directives/cache/Cache.ts +14 -5
- package/source/directives/cache/Control.ts +0 -3
- package/source/directives/dev/Development.ts +1 -1
- package/source/directives/flow/Fetch.ts +1 -1
- package/source/directives/flow/Flow.ts +1 -1
- package/source/directives/index.ts +5 -2
- package/source/directives/io/Directive.ts +1 -1
- package/source/directives/io/IO.ts +34 -3
- package/source/directives/io/Input.ts +3 -2
- package/source/directives/io/Output.ts +10 -4
- package/source/directives/io/Status.test.ts +84 -0
- package/source/directives/io/Status.ts +46 -0
- package/source/directives/io/Throttle.ts +1 -1
- package/source/directives/io/lib/throttle/Quotas.ts +2 -2
- package/source/directives/map/Headers.ts +11 -0
- package/source/directives/map/Map.ts +10 -1
- package/source/directives/map/Mapping.ts +23 -0
- package/source/directives/map/Segments.ts +12 -0
- package/source/directives/mcp/MCP.ts +33 -0
- package/source/directives/mcp/Tool.test.ts +66 -0
- package/source/directives/mcp/Tool.ts +28 -0
- package/source/directives/mcp/index.ts +6 -0
- package/source/directives/oauth/Discovery.ts +70 -0
- package/source/directives/oauth/documents.ts +113 -0
- package/source/directives/oauth/index.ts +3 -0
- package/source/directives/octets/Delete.ts +1 -1
- package/source/directives/octets/Get.ts +1 -1
- package/source/directives/octets/Octets.ts +1 -1
- package/source/directives/octets/Workflow.ts +1 -1
- package/source/directives/octets/workflows/Execution.ts +1 -1
- package/source/directives/require/Directive.ts +1 -1
- package/source/directives/require/Headers.ts +1 -1
- package/source/directives/require/Require.ts +2 -2
- package/source/index.ts +6 -0
- package/source/octets.d.ts +17 -0
- package/source/schemas.ts +2 -0
- package/source/userland.ts +47 -0
- package/transpiled/Annotation.d.ts +41 -0
- package/transpiled/Directive.d.ts +18 -1
- package/transpiled/Directive.js +50 -6
- package/transpiled/Directive.js.map +1 -1
- package/transpiled/Endpoint.d.ts +9 -0
- package/transpiled/Endpoint.js +27 -11
- package/transpiled/Endpoint.js.map +1 -1
- package/transpiled/Factory.js +6 -2
- package/transpiled/Factory.js.map +1 -1
- package/transpiled/Gateway.d.ts +19 -2
- package/transpiled/Gateway.js +51 -9
- package/transpiled/Gateway.js.map +1 -1
- package/transpiled/HTTP/Context.d.ts +6 -0
- package/transpiled/HTTP/Context.js +6 -0
- package/transpiled/HTTP/Context.js.map +1 -1
- package/transpiled/HTTP/Server.d.ts +8 -1
- package/transpiled/HTTP/Server.js +4 -3
- package/transpiled/HTTP/Server.js.map +1 -1
- package/transpiled/HTTP/exceptions.d.ts +1 -1
- package/transpiled/HTTP/exceptions.js +2 -2
- package/transpiled/HTTP/exceptions.js.map +1 -1
- package/transpiled/HTTP/formats/form.d.ts +9 -0
- package/transpiled/HTTP/formats/form.js +18 -0
- package/transpiled/HTTP/formats/form.js.map +1 -0
- package/transpiled/HTTP/formats/index.d.ts +10 -2
- package/transpiled/HTTP/formats/index.js +10 -0
- package/transpiled/HTTP/formats/index.js.map +1 -1
- package/transpiled/HTTP/messages.d.ts +12 -0
- package/transpiled/HTTP/messages.js +12 -4
- package/transpiled/HTTP/messages.js.map +1 -1
- package/transpiled/Interception.d.ts +4 -1
- package/transpiled/Interception.js +4 -2
- package/transpiled/Interception.js.map +1 -1
- package/transpiled/Introspection.d.ts +40 -0
- package/transpiled/Introspection.js +50 -1
- package/transpiled/Introspection.js.map +1 -1
- package/transpiled/MCP/Server.d.ts +41 -0
- package/transpiled/MCP/Server.js +180 -0
- package/transpiled/MCP/Server.js.map +1 -0
- package/transpiled/MCP/discover.d.ts +13 -0
- package/transpiled/MCP/discover.js +29 -0
- package/transpiled/MCP/discover.js.map +1 -0
- package/transpiled/MCP/errors.d.ts +24 -0
- package/transpiled/MCP/errors.js +67 -0
- package/transpiled/MCP/errors.js.map +1 -0
- package/transpiled/MCP/index.d.ts +1 -0
- package/transpiled/MCP/index.js +2 -0
- package/transpiled/MCP/index.js.map +1 -0
- package/transpiled/MCP/schema.d.ts +18 -0
- package/transpiled/MCP/schema.js +64 -0
- package/transpiled/MCP/schema.js.map +1 -0
- package/transpiled/MCP/tools.d.ts +31 -0
- package/transpiled/MCP/tools.js +121 -0
- package/transpiled/MCP/tools.js.map +1 -0
- package/transpiled/MCP/types.d.ts +64 -0
- package/transpiled/MCP/types.js +13 -0
- package/transpiled/MCP/types.js.map +1 -0
- package/transpiled/Query.d.ts +7 -0
- package/transpiled/Query.js +38 -7
- package/transpiled/Query.js.map +1 -1
- package/transpiled/RPC/Context.d.ts +11 -0
- package/transpiled/RPC/Context.js +63 -0
- package/transpiled/RPC/Context.js.map +1 -0
- package/transpiled/RPC/Dispatcher.d.ts +19 -0
- package/transpiled/RPC/Dispatcher.js +100 -0
- package/transpiled/RPC/Dispatcher.js.map +1 -0
- package/transpiled/RPC/errors.d.ts +18 -0
- package/transpiled/RPC/errors.js +67 -0
- package/transpiled/RPC/errors.js.map +1 -0
- package/transpiled/RPC/index.d.ts +1 -0
- package/transpiled/RPC/index.js +2 -0
- package/transpiled/RPC/index.js.map +1 -0
- package/transpiled/RPC/names.d.ts +30 -0
- package/transpiled/RPC/names.js +121 -0
- package/transpiled/RPC/names.js.map +1 -0
- package/transpiled/RPC/types.d.ts +27 -0
- package/transpiled/RPC/types.js +8 -0
- package/transpiled/RPC/types.js.map +1 -0
- package/transpiled/RTD/Directives.d.ts +41 -2
- package/transpiled/RTD/Endpoint.d.ts +2 -1
- package/transpiled/RTD/Method.d.ts +8 -3
- package/transpiled/RTD/Method.js +12 -10
- package/transpiled/RTD/Method.js.map +1 -1
- package/transpiled/RTD/Node.d.ts +20 -2
- package/transpiled/RTD/Node.js +22 -4
- package/transpiled/RTD/Node.js.map +1 -1
- package/transpiled/RTD/Route.d.ts +2 -1
- package/transpiled/RTD/Route.js +27 -2
- package/transpiled/RTD/Route.js.map +1 -1
- package/transpiled/RTD/Tree.d.ts +3 -1
- package/transpiled/RTD/Tree.js +26 -0
- package/transpiled/RTD/Tree.js.map +1 -1
- package/transpiled/const.d.ts +12 -0
- package/transpiled/const.js +12 -0
- package/transpiled/const.js.map +1 -1
- package/transpiled/deployment.js +6 -0
- package/transpiled/deployment.js.map +1 -1
- package/transpiled/directives/auth/Anonymous.d.ts +6 -0
- package/transpiled/directives/auth/Anonymous.js +10 -0
- package/transpiled/directives/auth/Anonymous.js.map +1 -1
- package/transpiled/directives/auth/Anyone.d.ts +1 -0
- package/transpiled/directives/auth/Anyone.js +3 -0
- package/transpiled/directives/auth/Anyone.js.map +1 -1
- package/transpiled/directives/auth/Authorization.d.ts +28 -2
- package/transpiled/directives/auth/Authorization.js +87 -19
- package/transpiled/directives/auth/Authorization.js.map +1 -1
- package/transpiled/directives/auth/Delegate.d.ts +5 -0
- package/transpiled/directives/auth/Delegate.js +10 -0
- package/transpiled/directives/auth/Delegate.js.map +1 -1
- package/transpiled/directives/auth/Echo.d.ts +2 -0
- package/transpiled/directives/auth/Echo.js +4 -0
- package/transpiled/directives/auth/Echo.js.map +1 -1
- package/transpiled/directives/auth/Incept.d.ts +1 -1
- package/transpiled/directives/auth/Incept.js +13 -8
- package/transpiled/directives/auth/Incept.js.map +1 -1
- package/transpiled/directives/auth/Role.d.ts +2 -0
- package/transpiled/directives/auth/Role.js +9 -0
- package/transpiled/directives/auth/Role.js.map +1 -1
- package/transpiled/directives/auth/Rule.d.ts +5 -0
- package/transpiled/directives/auth/Rule.js +20 -0
- package/transpiled/directives/auth/Rule.js.map +1 -1
- package/transpiled/directives/auth/Scheme.d.ts +2 -0
- package/transpiled/directives/auth/Scheme.js +4 -0
- package/transpiled/directives/auth/Scheme.js.map +1 -1
- package/transpiled/directives/auth/schemes.d.ts +16 -4
- package/transpiled/directives/auth/schemes.js +20 -8
- package/transpiled/directives/auth/schemes.js.map +1 -1
- package/transpiled/directives/auth/types.d.ts +20 -2
- package/transpiled/directives/cache/Cache.d.ts +1 -1
- package/transpiled/directives/cache/Cache.js +10 -3
- package/transpiled/directives/cache/Cache.js.map +1 -1
- package/transpiled/directives/cache/Control.js +0 -2
- package/transpiled/directives/cache/Control.js.map +1 -1
- package/transpiled/directives/dev/Development.d.ts +1 -1
- package/transpiled/directives/dev/Development.js +1 -1
- package/transpiled/directives/dev/Development.js.map +1 -1
- package/transpiled/directives/flow/Flow.d.ts +1 -1
- package/transpiled/directives/flow/Flow.js +1 -1
- package/transpiled/directives/flow/Flow.js.map +1 -1
- package/transpiled/directives/index.js +4 -2
- package/transpiled/directives/index.js.map +1 -1
- package/transpiled/directives/io/Directive.d.ts +1 -1
- package/transpiled/directives/io/IO.d.ts +7 -1
- package/transpiled/directives/io/IO.js +25 -3
- package/transpiled/directives/io/IO.js.map +1 -1
- package/transpiled/directives/io/Input.d.ts +3 -2
- package/transpiled/directives/io/Input.js +2 -1
- package/transpiled/directives/io/Input.js.map +1 -1
- package/transpiled/directives/io/Output.d.ts +5 -3
- package/transpiled/directives/io/Output.js +8 -3
- package/transpiled/directives/io/Output.js.map +1 -1
- package/transpiled/directives/io/Status.d.ts +19 -0
- package/transpiled/directives/io/Status.js +34 -0
- package/transpiled/directives/io/Status.js.map +1 -0
- package/transpiled/directives/io/Throttle.d.ts +1 -1
- package/transpiled/directives/io/Throttle.js +1 -1
- package/transpiled/directives/io/Throttle.js.map +1 -1
- package/transpiled/directives/io/lib/throttle/Quotas.d.ts +1 -1
- package/transpiled/directives/io/lib/throttle/Quotas.js +2 -2
- package/transpiled/directives/io/lib/throttle/Quotas.js.map +1 -1
- package/transpiled/directives/map/Headers.d.ts +2 -0
- package/transpiled/directives/map/Headers.js +8 -0
- package/transpiled/directives/map/Headers.js.map +1 -1
- package/transpiled/directives/map/Map.d.ts +3 -1
- package/transpiled/directives/map/Map.js +7 -1
- package/transpiled/directives/map/Map.js.map +1 -1
- package/transpiled/directives/map/Mapping.d.ts +13 -0
- package/transpiled/directives/map/Mapping.js +20 -0
- package/transpiled/directives/map/Mapping.js.map +1 -1
- package/transpiled/directives/map/Segments.d.ts +3 -0
- package/transpiled/directives/map/Segments.js +9 -0
- package/transpiled/directives/map/Segments.js.map +1 -1
- package/transpiled/directives/mcp/MCP.d.ts +15 -0
- package/transpiled/directives/mcp/MCP.js +23 -0
- package/transpiled/directives/mcp/MCP.js.map +1 -0
- package/transpiled/directives/mcp/Tool.d.ts +13 -0
- package/transpiled/directives/mcp/Tool.js +23 -0
- package/transpiled/directives/mcp/Tool.js.map +1 -0
- package/transpiled/directives/mcp/index.d.ts +4 -0
- package/transpiled/directives/mcp/index.js +4 -0
- package/transpiled/directives/mcp/index.js.map +1 -0
- package/transpiled/directives/oauth/Discovery.d.ts +23 -0
- package/transpiled/directives/oauth/Discovery.js +55 -0
- package/transpiled/directives/oauth/Discovery.js.map +1 -0
- package/transpiled/directives/oauth/documents.d.ts +9 -0
- package/transpiled/directives/oauth/documents.js +82 -0
- package/transpiled/directives/oauth/documents.js.map +1 -0
- package/transpiled/directives/oauth/index.d.ts +2 -0
- package/transpiled/directives/oauth/index.js +3 -0
- package/transpiled/directives/oauth/index.js.map +1 -0
- package/transpiled/directives/octets/Octets.d.ts +1 -1
- package/transpiled/directives/octets/Octets.js +1 -1
- package/transpiled/directives/octets/Octets.js.map +1 -1
- package/transpiled/directives/require/Directive.d.ts +1 -1
- package/transpiled/directives/require/Headers.d.ts +1 -1
- package/transpiled/directives/require/Headers.js +1 -1
- package/transpiled/directives/require/Headers.js.map +1 -1
- package/transpiled/directives/require/Require.d.ts +1 -1
- package/transpiled/directives/require/Require.js +2 -2
- package/transpiled/directives/require/Require.js.map +1 -1
- package/transpiled/index.d.ts +2 -0
- package/transpiled/schemas.d.ts +2 -0
- package/transpiled/schemas.js +1 -0
- package/transpiled/schemas.js.map +1 -1
- package/transpiled/userland.d.ts +39 -0
- package/transpiled/userland.js +7 -0
- package/transpiled/userland.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/components/identity.bans/operations/transit.d.ts +0 -14
- package/components/identity.bans/operations/transit.js.map +0 -1
- package/components/identity.basic/operations/add.d.ts +0 -3
- package/components/identity.basic/operations/add.js.map +0 -1
- package/components/identity.basic/operations/authenticate.d.ts +0 -13
- package/components/identity.basic/operations/authenticate.js.map +0 -1
- package/components/identity.basic/operations/check.d.ts +0 -7
- package/components/identity.basic/operations/check.js.map +0 -1
- package/components/identity.basic/operations/delete.d.ts +0 -7
- package/components/identity.basic/operations/delete.js.map +0 -1
- package/components/identity.basic/operations/incept.d.ts +0 -12
- package/components/identity.basic/operations/incept.js.map +0 -1
- package/components/identity.basic/operations/info.d.ts +0 -10
- package/components/identity.basic/operations/info.js.map +0 -1
- package/components/identity.basic/operations/lib/credentials.d.ts +0 -5
- package/components/identity.basic/operations/lib/credentials.js.map +0 -1
- package/components/identity.basic/operations/transit.d.ts +0 -14
- package/components/identity.basic/operations/transit.js.map +0 -1
- package/components/identity.basic/operations/types.d.ts +0 -61
- package/components/identity.basic/operations/types.js +0 -2
- package/components/identity.basic/operations/types.js.map +0 -1
- package/components/identity.basic/source/types.ts +0 -69
- package/components/identity.credentials/operations/list.d.ts +0 -51
- package/components/identity.credentials/operations/list.js.map +0 -1
- package/components/identity.federation/operations/authenticate.d.ts +0 -16
- package/components/identity.federation/operations/authenticate.js.map +0 -1
- package/components/identity.federation/operations/create.d.ts +0 -8
- package/components/identity.federation/operations/create.js.map +0 -1
- package/components/identity.federation/operations/decode.d.ts +0 -3
- package/components/identity.federation/operations/decode.js.map +0 -1
- package/components/identity.federation/operations/delete.d.ts +0 -8
- package/components/identity.federation/operations/delete.js.map +0 -1
- package/components/identity.federation/operations/incept.d.ts +0 -11
- package/components/identity.federation/operations/incept.js.map +0 -1
- package/components/identity.federation/operations/lib/Configuration.d.ts +0 -39
- package/components/identity.federation/operations/lib/Configuration.js.map +0 -1
- package/components/identity.federation/operations/lib/Ctx.d.ts +0 -8
- package/components/identity.federation/operations/lib/Ctx.js.map +0 -1
- package/components/identity.federation/operations/lib/Payload.d.ts +0 -5
- package/components/identity.federation/operations/lib/Payload.js.map +0 -1
- package/components/identity.federation/operations/lib/decode.d.ts +0 -3
- package/components/identity.federation/operations/lib/decode.js.map +0 -1
- package/components/identity.federation/operations/lib/discovery.d.ts +0 -5
- package/components/identity.federation/operations/lib/discovery.js.map +0 -1
- package/components/identity.federation/operations/lib/errors.d.ts +0 -70
- package/components/identity.federation/operations/lib/errors.js.map +0 -1
- package/components/identity.federation/operations/lib/exchange.d.ts +0 -3
- package/components/identity.federation/operations/lib/exchange.js.map +0 -1
- package/components/identity.federation/operations/lib/index.d.ts +0 -4
- package/components/identity.federation/operations/lib/index.js.map +0 -1
- package/components/identity.federation/operations/lib/jose.d.ts +0 -1
- package/components/identity.federation/operations/lib/jose.js.map +0 -1
- package/components/identity.federation/operations/lib/resolve.d.ts +0 -3
- package/components/identity.federation/operations/lib/resolve.js.map +0 -1
- package/components/identity.federation/operations/list.d.ts +0 -7
- package/components/identity.federation/operations/list.js.map +0 -1
- package/components/identity.federation/operations/types/Scheme.d.ts +0 -1
- package/components/identity.federation/operations/types/Scheme.js.map +0 -1
- package/components/identity.federation/operations/types/configuration.d.ts +0 -22
- package/components/identity.federation/operations/types/configuration.js.map +0 -1
- package/components/identity.federation/operations/types/context.d.ts +0 -35
- package/components/identity.federation/operations/types/context.js.map +0 -1
- package/components/identity.federation/operations/types/entity.d.ts +0 -9
- package/components/identity.federation/operations/types/entity.js.map +0 -1
- package/components/identity.federation/operations/types/index.d.ts +0 -4
- package/components/identity.federation/operations/types/index.js.map +0 -1
- package/components/identity.keys/operations/create.d.ts +0 -22
- package/components/identity.keys/operations/create.js.map +0 -1
- package/components/identity.keys/operations/disable.d.ts +0 -5
- package/components/identity.keys/operations/disable.js.map +0 -1
- package/components/identity.keys/operations/revoke.d.ts +0 -15
- package/components/identity.keys/operations/revoke.js.map +0 -1
- package/components/identity.otp/operations/authenticate.d.ts +0 -12
- package/components/identity.otp/operations/authenticate.js.map +0 -1
- package/components/identity.otp/operations/issue.d.ts +0 -12
- package/components/identity.otp/operations/issue.js.map +0 -1
- package/components/identity.otp/operations/lib/Context.d.ts +0 -14
- package/components/identity.otp/operations/lib/Context.js.map +0 -1
- package/components/identity.otp/operations/lib/Entity.d.ts +0 -6
- package/components/identity.otp/operations/lib/Entity.js.map +0 -1
- package/components/identity.otp/operations/lib/index.d.ts +0 -1
- package/components/identity.otp/operations/lib/index.js.map +0 -1
- package/components/identity.passkeys/operations/authenticate.d.ts +0 -16
- package/components/identity.passkeys/operations/authenticate.js.map +0 -1
- package/components/identity.passkeys/operations/challenge.d.ts +0 -35
- package/components/identity.passkeys/operations/challenge.js.map +0 -1
- package/components/identity.passkeys/operations/create.d.ts +0 -19
- package/components/identity.passkeys/operations/create.js.map +0 -1
- package/components/identity.passkeys/operations/delete.d.ts +0 -8
- package/components/identity.passkeys/operations/delete.js.map +0 -1
- package/components/identity.passkeys/operations/lib/const.d.ts +0 -1
- package/components/identity.passkeys/operations/lib/const.js.map +0 -1
- package/components/identity.passkeys/operations/list.d.ts +0 -7
- package/components/identity.passkeys/operations/list.js.map +0 -1
- package/components/identity.passkeys/operations/types/Configuration.d.ts +0 -6
- package/components/identity.passkeys/operations/types/Configuration.js.map +0 -1
- package/components/identity.passkeys/operations/types/Context.d.ts +0 -15
- package/components/identity.passkeys/operations/types/Context.js.map +0 -1
- package/components/identity.passkeys/operations/types/Passkey.d.ts +0 -12
- package/components/identity.passkeys/operations/types/Passkey.js.map +0 -1
- package/components/identity.passkeys/operations/types/index.d.ts +0 -2
- package/components/identity.passkeys/operations/types/index.js.map +0 -1
- package/components/identity.passkeys/operations/use.d.ts +0 -16
- package/components/identity.passkeys/operations/use.js.map +0 -1
- package/components/identity.roles/operations/grant.d.ts +0 -10
- package/components/identity.roles/operations/grant.js.map +0 -1
- package/components/identity.roles/operations/lib/Entity.d.ts +0 -5
- package/components/identity.roles/operations/lib/Entity.js.map +0 -1
- package/components/identity.roles/operations/list.d.ts +0 -2
- package/components/identity.roles/operations/list.js.map +0 -1
- package/components/identity.roles/operations/principal.d.ts +0 -13
- package/components/identity.roles/operations/principal.js.map +0 -1
- package/components/identity.tokens/operations/authenticate.d.ts +0 -9
- package/components/identity.tokens/operations/authenticate.js.map +0 -1
- package/components/identity.tokens/operations/decrypt.d.ts +0 -15
- package/components/identity.tokens/operations/decrypt.js.map +0 -1
- package/components/identity.tokens/operations/encrypt.d.ts +0 -8
- package/components/identity.tokens/operations/encrypt.js.map +0 -1
- package/components/identity.tokens/operations/issue.d.ts +0 -24
- package/components/identity.tokens/operations/issue.js.map +0 -1
- package/components/identity.tokens/operations/lib/index.d.ts +0 -3
- package/components/identity.tokens/operations/lib/index.js.map +0 -1
- package/components/identity.tokens/operations/lib/jose.d.ts +0 -1
- package/components/identity.tokens/operations/lib/jose.js.map +0 -1
- package/components/identity.tokens/operations/lib/key.d.ts +0 -1
- package/components/identity.tokens/operations/lib/key.js.map +0 -1
- package/components/identity.tokens/operations/lib/pad.d.ts +0 -1
- package/components/identity.tokens/operations/lib/pad.js.map +0 -1
- package/components/identity.tokens/operations/lib/types.d.ts +0 -88
- package/components/identity.tokens/operations/lib/types.js +0 -2
- package/components/identity.tokens/operations/lib/types.js.map +0 -1
- package/components/identity.tokens/operations/revoke.d.ts +0 -2
- package/components/identity.tokens/operations/revoke.js.map +0 -1
- package/components/identity.tokens/source/lib/types.ts +0 -102
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Consent
|
|
2
|
+
|
|
3
|
+
The one endpoint of the [authorization server](oauth.md) that needs a person, and so the one this
|
|
4
|
+
extension does not serve. An application serves it at the URL its `exposition.oauth.authorize`
|
|
5
|
+
names.
|
|
6
|
+
|
|
7
|
+
The page is reached by a client opening it in the user's browser. It authenticates the user, shows
|
|
8
|
+
them who is asking, and on their assent redirects back to the client with a code.
|
|
9
|
+
|
|
10
|
+
## What the page receives
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
GET https://app.example.com/oauth/authorize
|
|
14
|
+
?response_type=code
|
|
15
|
+
&client_id=https%3A%2F%2Fclaude.ai%2Foauth%2Fclaude-code-client-metadata
|
|
16
|
+
&redirect_uri=http%3A%2F%2Flocalhost%3A3118%2Fcallback
|
|
17
|
+
&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
|
|
18
|
+
&code_challenge_method=S256
|
|
19
|
+
&state=af0ifjsldkj
|
|
20
|
+
&resource=https%3A%2F%2Fapi.example.com%2Fmcp
|
|
21
|
+
&scope=app:notes
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`state` is the client's and is returned untouched. `code_challenge`, `code_challenge_method`,
|
|
25
|
+
`client_id`, `redirect_uri` and `resource` are passed on as they arrived.
|
|
26
|
+
|
|
27
|
+
## What the page does
|
|
28
|
+
|
|
29
|
+
The user is authenticated by whatever means the application already offers. The page then holds
|
|
30
|
+
that identity's own `Token`, and makes two calls with it.
|
|
31
|
+
|
|
32
|
+
Who is asking:
|
|
33
|
+
|
|
34
|
+
```http
|
|
35
|
+
GET /identity/clients/https%3A%2F%2Fclaude.ai%2Foauth%2Fclaude-code-client-metadata/ HTTP/1.1
|
|
36
|
+
authorization: Token …
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
client_id: https://claude.ai/oauth/claude-code-client-metadata
|
|
41
|
+
client_name: Claude Code
|
|
42
|
+
client_uri: https://claude.ai
|
|
43
|
+
logo_uri: https://claude.ai/logo.png
|
|
44
|
+
redirect_uris: [http://localhost/callback, http://127.0.0.1/callback]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The page displays `client_name`, and **the host of `redirect_uri`**. A loopback redirect is
|
|
48
|
+
indistinguishable from any other local process, so the user is told where the code will be sent.
|
|
49
|
+
|
|
50
|
+
On assent:
|
|
51
|
+
|
|
52
|
+
```http
|
|
53
|
+
POST /identity/grants/:identity/ HTTP/1.1
|
|
54
|
+
authorization: Token …
|
|
55
|
+
content-type: application/json
|
|
56
|
+
|
|
57
|
+
{"client": "…", "redirect": "…", "challenge": "…", "method": "S256",
|
|
58
|
+
"scope": ["app:notes"], "resource": ["https://api.example.com/mcp"]}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```http
|
|
62
|
+
201 Created
|
|
63
|
+
cache-control: no-store
|
|
64
|
+
|
|
65
|
+
{"code": "SplxlOBeZQQYbYS6WxSbIA", "expires_in": 60}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`:identity` is the id of the identity that consents, which is the one the page authenticated.
|
|
69
|
+
|
|
70
|
+
## What the page answers
|
|
71
|
+
|
|
72
|
+
On assent, a redirect carrying the code, the client's `state`, and the issuer:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
302 Found
|
|
76
|
+
location: http://localhost:3118/callback?code=SplxlOBeZQQYbYS6WxSbIA&state=af0ifjsldkj&iss=https%3A%2F%2Fapi.example.com
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
A single-page application does this with `location.assign`; nothing requires a server redirect.
|
|
80
|
+
|
|
81
|
+
`iss` is [RFC 9207](https://www.rfc-editor.org/rfc/rfc9207), and the metadata declares that it is
|
|
82
|
+
sent, so a client rejects a response without it. Its value is the `issuer` of
|
|
83
|
+
`/.well-known/oauth-authorization-server`, which the page may read.
|
|
84
|
+
|
|
85
|
+
On refusal, a redirect saying so, not an error page:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
302 Found
|
|
89
|
+
location: http://localhost:3118/callback?error=access_denied&state=af0ifjsldkj&iss=https%3A%2F%2Fapi.example.com
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Errors
|
|
93
|
+
|
|
94
|
+
`400` with `error` and `error_description` is answered when the client is unknown, when the
|
|
95
|
+
redirect is not one that client may receive a code at, or when the challenge method is not `S256`.
|
|
96
|
+
A redirect that was not registered must not be redirected to; the page states the refusal itself.
|
|
97
|
+
|
|
98
|
+
## Consent is asked every time
|
|
99
|
+
|
|
100
|
+
A grant is recorded, and `GET /identity/grants/:identity/` lists what a user allowed, but it is
|
|
101
|
+
not consulted to skip this page.
|
|
@@ -83,7 +83,9 @@ the request path.
|
|
|
83
83
|
|
|
84
84
|
### Bearer scheme
|
|
85
85
|
|
|
86
|
-
OpenID tokens issued by trusted providers
|
|
86
|
+
OpenID tokens issued by trusted providers, and access tokens issued by
|
|
87
|
+
[this authorization server](oauth.md) to OAuth clients. Both are presented the same way, and each
|
|
88
|
+
provider says which credentials are its own; a credential neither claims is refused.
|
|
87
89
|
For more information, refer
|
|
88
90
|
to [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html),
|
|
89
91
|
[RFC6750](https://datatracker.ietf.org/doc/html/rfc6750).
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
# Resource introspection
|
|
2
2
|
|
|
3
3
|
Any resource can be introspected by sending an `OPTIONS` request to the resource's path.
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
What it answers is what the route's directives leave of what the operation declared, for each
|
|
6
|
+
method the request may reach. A method it may not is not there, nor in `Allow`; a resource whose
|
|
7
|
+
every method it may not reach is `403`.
|
|
5
8
|
|
|
6
9
|
Introspection properties:
|
|
7
10
|
|
|
8
|
-
- `
|
|
11
|
+
- `description` what the route states this method is, from [`mcp:tool`](mcp.md#what-a-tool-is).
|
|
12
|
+
The operation states what it is too, and that is not this: it is written without knowledge of
|
|
13
|
+
any route, and the same operation mounted twice is two methods
|
|
14
|
+
- `route` route parameters, including what `map:segments` names differently
|
|
9
15
|
- `query` query parameters
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
16
|
+
- `headers` properties `map:headers` reads from a request header, and which header
|
|
17
|
+
- `input` input schema, restricted by `io:input`, without what the gateway fills itself
|
|
18
|
+
- `output` output schema, restricted by `io:output`; absent where the reply is not sent at all
|
|
12
19
|
- `errors` error codes
|
|
13
20
|
|
|
14
21
|
```http
|
|
@@ -18,9 +25,10 @@ accept: application/yaml
|
|
|
18
25
|
|
|
19
26
|
```http
|
|
20
27
|
200 OK
|
|
21
|
-
Allow: GET, POST
|
|
28
|
+
Allow: GET, POST
|
|
22
29
|
|
|
23
30
|
GET:
|
|
31
|
+
description: Every pot there is, newest first.
|
|
24
32
|
route:
|
|
25
33
|
id:
|
|
26
34
|
type: string
|
package/documentation/io.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# I/O restrictions
|
|
2
2
|
|
|
3
3
|
The Exposition comes with `io` directives to control access to the operation's input and output
|
|
4
|
-
properties.
|
|
4
|
+
properties, and to let an operation state the status of its reply.
|
|
5
5
|
|
|
6
6
|
## Input
|
|
7
7
|
|
|
@@ -53,7 +53,41 @@ GET:
|
|
|
53
53
|
io:output: false
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Output restrictions are not applied to stream responses
|
|
56
|
+
Output restrictions are not applied to stream responses, nor to a reply the gateway built out of an
|
|
57
|
+
exception — an operation that returns an error is answered with a code and a message of the
|
|
58
|
+
gateway's own, and a list of permitted properties has nothing to say about those. A reply the
|
|
59
|
+
operation returned is restricted whatever status it carries, see [Status](#status).
|
|
60
|
+
|
|
61
|
+
## Status
|
|
62
|
+
|
|
63
|
+
The `io:status` optional directive names a property of the reply that carries the status of the
|
|
64
|
+
response. The property is removed from the body.
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
POST:
|
|
68
|
+
endpoint: register
|
|
69
|
+
io:status: status
|
|
70
|
+
io:output: [client_id, client_name, error, error_description]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```javascript
|
|
74
|
+
return { status: 400, error: 'invalid_redirect_uri' }
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```http
|
|
78
|
+
400 Bad Request
|
|
79
|
+
|
|
80
|
+
error: invalid_redirect_uri
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
A reply that does not carry the property is answered with the status it would have been. A property
|
|
84
|
+
that is not a number is an error.
|
|
85
|
+
|
|
86
|
+
This is for an outcome the operation knows and the transport does not — a protocol that states its
|
|
87
|
+
error as a body rather than as a status of its own, or a request that created where it might have
|
|
88
|
+
updated. Such an operation returns no error: both replies are its output, and `io:output` permits
|
|
89
|
+
the properties of both. An operation that does return an error is unaffected — that reply is the
|
|
90
|
+
gateway's, and is not restricted.
|
|
57
91
|
|
|
58
92
|
## Throttling
|
|
59
93
|
|
|
@@ -125,3 +159,9 @@ io:throttle:
|
|
|
125
159
|
|
|
126
160
|
An address may probe for twenty missing paths at once, and thereafter for one every thirty seconds.
|
|
127
161
|
Requests that find something are served and never counted against it.
|
|
162
|
+
|
|
163
|
+
## Introspection
|
|
164
|
+
|
|
165
|
+
What these admit is what [`OPTIONS`](introspection.md) states: `io:input` restricts the input
|
|
166
|
+
schema, `io:output` the output schema, and a method declaring no `io:output` states no output at
|
|
167
|
+
all — nothing of the reply is sent.
|
package/documentation/map.md
CHANGED
|
@@ -113,3 +113,11 @@ the names of the claims.
|
|
|
113
113
|
|
|
114
114
|
If the claim is not present in the token or the request is not authenticated using
|
|
115
115
|
the [`Bearer` scheme](identity.md#bearer-scheme), the input properties are not set.
|
|
116
|
+
|
|
117
|
+
## Introspection
|
|
118
|
+
|
|
119
|
+
A property a mapping fills is not the caller's to send, so [`OPTIONS`](introspection.md) takes it
|
|
120
|
+
out of the input. `map:headers` states it under `headers`, naming the header it is read from, and
|
|
121
|
+
`map:segments` under `route`, named as the property rather than as the segment. The rest —
|
|
122
|
+
`map:claims`, `map:authority`, `map:language`, `map:buffer` — come from the request itself, and a
|
|
123
|
+
caller has nowhere to put one.
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Model Context Protocol
|
|
2
|
+
|
|
3
|
+
An application annotates it, and the methods it names as tools are what a model may call.
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
exposition:
|
|
7
|
+
mcp:
|
|
8
|
+
name: Teapots
|
|
9
|
+
instructions: A pot is read by its id. A pot that is brewing cannot be emptied.
|
|
10
|
+
origins: [https://claude.ai]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
<dl>
|
|
14
|
+
<dt><code>name</code></dt>
|
|
15
|
+
<dd>Required. What the server calls itself, which a client shows a user.</dd>
|
|
16
|
+
<dt><code>instructions</code></dt>
|
|
17
|
+
<dd>What a model is told before it calls anything here.</dd>
|
|
18
|
+
<dt><code>origins</code></dt>
|
|
19
|
+
<dd>Browser origins the endpoint answers. A request carrying an <code>Origin</code> that is not
|
|
20
|
+
listed is <code>403</code>, and an empty list admits none; a request carrying none is unaffected.</dd>
|
|
21
|
+
<dt><code>anonymous</code></dt>
|
|
22
|
+
<dd>Whether the endpoint answers without a credential. It does not unless it says so.</dd>
|
|
23
|
+
</dl>
|
|
24
|
+
|
|
25
|
+
Without the annotation `/.mcp` is a path like any other, and nothing answers there. The path is
|
|
26
|
+
fixed: one an application could choose is one it could collide with a route of its own.
|
|
27
|
+
|
|
28
|
+
## What a tool is
|
|
29
|
+
|
|
30
|
+
A tool is an RTD method that says it is one, named as the [procedure](rpc.md#the-name) it is:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
/pots:
|
|
34
|
+
GET:
|
|
35
|
+
mcp:tool: Every pot there is, newest first.
|
|
36
|
+
endpoint: enumerate
|
|
37
|
+
/hot:
|
|
38
|
+
GET:
|
|
39
|
+
query: { criteria: temperature=gt=80 }
|
|
40
|
+
mcp:tool: The pots that are too hot to pour.
|
|
41
|
+
endpoint: enumerate
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
A default denies, and a tree holds everything an application serves — its identity endpoints, its
|
|
45
|
+
uploads, the machinery of the authorization flow the model already came through. Publishing all of
|
|
46
|
+
it would spend a model's context on what it has no business calling.
|
|
47
|
+
|
|
48
|
+
The value is what the tool is, and stating it is what publishes it — there is no way to publish one
|
|
49
|
+
that says nothing, because a tool a model cannot read the purpose of is one it cannot choose.
|
|
50
|
+
|
|
51
|
+
An operation [states what it is](/documentation/component/declaration.md) as well, and that is not
|
|
52
|
+
this: it is written without knowledge of any route, and a tool is an operation and a route together.
|
|
53
|
+
The two routes above are one operation and two tools, and one sentence is not true of both. The
|
|
54
|
+
operation's own is the Introspection's to read, and the gateway does not use it.
|
|
55
|
+
|
|
56
|
+
A declaration is inherited by everything below it, as every directive is, and the nearer one wins.
|
|
57
|
+
Since what it carries is what one method is, it belongs on a method: a node stating one would say
|
|
58
|
+
the same thing of everything under it.
|
|
59
|
+
|
|
60
|
+
A route whose name a client [cannot spell](rpc.md#what-has-a-name) is refused where the directive
|
|
61
|
+
is built, rather than served as a tool that is quietly never listed.
|
|
62
|
+
|
|
63
|
+
`tools/list` answers every published method this caller may reach — a method whose directives refuse
|
|
64
|
+
them is not listed, and a route with [no name](rpc.md#what-has-a-name) is not either. `tools/call`
|
|
65
|
+
answers `404` to a name that is not published, whether or not a route would have taken it: what an
|
|
66
|
+
application did not publish is not reachable by guessing what it would have been called.
|
|
67
|
+
|
|
68
|
+
`annotations` are read from the verb: `GET` and `HEAD` are `readOnlyHint`, `DELETE` is
|
|
69
|
+
`destructiveHint`, `PUT` and `DELETE` are `idempotentHint`.
|
|
70
|
+
|
|
71
|
+
## What a tool takes
|
|
72
|
+
|
|
73
|
+
`inputSchema` is the procedure's `params`, which is what the method
|
|
74
|
+
[says of itself](introspection.md): a route variable by the name the template gives it, the
|
|
75
|
+
querystring under `query`, and what is left is the body. `io:input` restricts it, and a property
|
|
76
|
+
`map` fills is not there — a call carries no headers of its own.
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
type: object
|
|
80
|
+
properties:
|
|
81
|
+
id: { type: string, pattern: ^[a-fA-F0-9]{32}$ }
|
|
82
|
+
query:
|
|
83
|
+
type: object
|
|
84
|
+
properties:
|
|
85
|
+
criteria: { type: string }
|
|
86
|
+
sort: { type: string }
|
|
87
|
+
limit: { type: integer, minimum: 1, maximum: 100, default: 10 }
|
|
88
|
+
omit: { type: integer, minimum: 0, maximum: 1000, default: 0 }
|
|
89
|
+
required: [id]
|
|
90
|
+
additionalProperties: false
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## What a tool answers
|
|
94
|
+
|
|
95
|
+
`content` carries one `text` block holding the reply's JSON, and `structuredContent` the reply
|
|
96
|
+
itself. A reply of nothing is an empty `content`.
|
|
97
|
+
|
|
98
|
+
`outputSchema` is what the operation declares, restricted by `io:output`. An operation's `output` is
|
|
99
|
+
optional and normalizes to `{}`, which describes nothing, and none is stated for it — an
|
|
100
|
+
application that wants the schema declares the operation's `output`.
|
|
101
|
+
|
|
102
|
+
An operation that refuses answers a result with `isError: true` carrying its message, not an error
|
|
103
|
+
of the protocol: it is something a model reads and may correct itself by.
|
|
104
|
+
|
|
105
|
+
## Two revisions
|
|
106
|
+
|
|
107
|
+
Both are answered from one endpoint that remembers nothing between requests.
|
|
108
|
+
[`2026-07-28`](https://modelcontextprotocol.io/specification/2026-07-28) carries the version and
|
|
109
|
+
the client's capabilities in every request; `2025-11-25` opens with `initialize`. Which one a
|
|
110
|
+
request is, is read from `MCP-Protocol-Version`, or from
|
|
111
|
+
`_meta['io.modelcontextprotocol/protocolVersion']` where the header is absent; `initialize` is one
|
|
112
|
+
by itself, and a request naming no version is of a revision that sent none.
|
|
113
|
+
|
|
114
|
+
| method | |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `server/discover` | what is served, and who serves it |
|
|
117
|
+
| `tools/list` | every tool this caller may reach, in a stable order |
|
|
118
|
+
| `tools/call` | the call the tool is |
|
|
119
|
+
| `initialize` | the same as `server/discover`, in the shape a client of `2025-11-25` reads |
|
|
120
|
+
| `notifications/initialized` | `202`, and nothing done |
|
|
121
|
+
| `ping` | `{}` |
|
|
122
|
+
|
|
123
|
+
`POST` only, one message per request; `GET` and `DELETE` are `405`. An `Mcp-Session-Id` is ignored
|
|
124
|
+
and none is minted, a `Last-Event-ID` is ignored, and `accept` is negotiated as everywhere else.
|
|
125
|
+
|
|
126
|
+
Of the modern revision, `MCP-Protocol-Version` and `Mcp-Method` are required, and `Mcp-Name` for a
|
|
127
|
+
`tools/call`; each must say what the body says. `_meta` states the protocol version and the client's
|
|
128
|
+
capabilities. Every result carries `resultType` and names the server in its own `_meta`, and a
|
|
129
|
+
`server/discover` or a `tools/list` carries how long it may be held: half an hour, `public` for the
|
|
130
|
+
first and `private` for the second, which is filtered by the identity that asked.
|
|
131
|
+
|
|
132
|
+
Neither `listChanged` nor a subscription is declared: both are a stream held open, and this endpoint
|
|
133
|
+
holds none.
|
|
134
|
+
|
|
135
|
+
## Authorization
|
|
136
|
+
|
|
137
|
+
The endpoint is a protected resource, and an application advertises it as one:
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
exposition:
|
|
141
|
+
oauth:
|
|
142
|
+
authorize: https://app.example.com/oauth/authorize
|
|
143
|
+
resources: ['/.mcp']
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Its RFC 9728 document is then read at `/.well-known/oauth-protected-resource/.mcp`, and the
|
|
147
|
+
canonical URI of the resource is `https://api.example.com/.mcp`. See [OAuth](oauth.md).
|
|
148
|
+
|
|
149
|
+
A request without a credential is `401`, carrying the challenge that names that document — which is
|
|
150
|
+
where the flow starts. A call the identity is not authorized to make is `403` with
|
|
151
|
+
`error="insufficient_scope"`. Each tool is authorized as the resource it is, against the path and
|
|
152
|
+
the verb its name states.
|
|
153
|
+
|
|
154
|
+
A route that is [`anonymous`](access.md#anonymous) is reached here whatever the client presented:
|
|
155
|
+
the rule that refuses a credentialed request is about a cacheable reply, and what a tool answers is
|
|
156
|
+
not one. So a resource that is public over HTTP is a public tool, and nothing in a manifest has to
|
|
157
|
+
say it twice.
|
|
158
|
+
|
|
159
|
+
## What refuses
|
|
160
|
+
|
|
161
|
+
| | |
|
|
162
|
+
| --- | --- |
|
|
163
|
+
| `-32700` | the body is not readable |
|
|
164
|
+
| `-32600` | the body is not one JSON-RPC message |
|
|
165
|
+
| `-32601` | no method of that name, at `404` |
|
|
166
|
+
| `-32602` | the arguments do not fit, or `_meta` states too little |
|
|
167
|
+
| `-32603` | anything the gateway did not mean to answer |
|
|
168
|
+
| `-32020` | a header says one thing and the body another |
|
|
169
|
+
| `-32022` | a revision neither served, naming both |
|
|
170
|
+
|
|
171
|
+
The codes MCP reserves for itself are `-32020` to `-32099`, and it has an implementation use none of
|
|
172
|
+
`-32000` to `-32019` — which is where [JSON-RPC](rpc.md#what-refuses) has this gateway's own, so none
|
|
173
|
+
of those is answered here.
|
|
174
|
+
|
|
175
|
+
## References
|
|
176
|
+
|
|
177
|
+
- [The specification](https://modelcontextprotocol.io/specification/2026-07-28)
|
|
178
|
+
- [JSON-RPC](rpc.md), where a procedure gets its name
|
|
179
|
+
- [Introspection](introspection.md), which is what a tool's schemas are
|
|
180
|
+
- [Features](../features/mcp.feature)
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# OAuth 2.1 Authorization Server
|
|
2
|
+
|
|
3
|
+
An application exposes an authorization server by annotating one, and none without it. A client
|
|
4
|
+
authorized this way holds a token of the identity that consented, and presents it as `Bearer`.
|
|
5
|
+
|
|
6
|
+
## Annotation
|
|
7
|
+
|
|
8
|
+
```yaml
|
|
9
|
+
exposition:
|
|
10
|
+
authorities:
|
|
11
|
+
local: api.example.com
|
|
12
|
+
oauth:
|
|
13
|
+
authorize: https://app.example.com/oauth/authorize
|
|
14
|
+
resources: ['/.mcp']
|
|
15
|
+
scopes: [app:notes, app:notes:read]
|
|
16
|
+
registration: closed
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
<dl>
|
|
20
|
+
<dt><code>authorize</code></dt>
|
|
21
|
+
<dd>Required. The absolute URL of the consent page. The application serves it; see
|
|
22
|
+
<a href="consent.md">Consent</a>.</dd>
|
|
23
|
+
<dt><code>resources</code></dt>
|
|
24
|
+
<dd>Paths advertised as protected resources, each with a document of its own and named by the
|
|
25
|
+
challenge a request to it is refused with. <code>/.mcp</code> is where
|
|
26
|
+
<a href="mcp.md">MCP</a> is served. A token is not yet bound to one, see
|
|
27
|
+
<a href="#audience">Audience</a>.</dd>
|
|
28
|
+
<dt><code>scopes</code></dt>
|
|
29
|
+
<dd>Advertised as what a client may ask for. Each is a <a href="access.md#roles">role</a>, or a
|
|
30
|
+
scope within one.</dd>
|
|
31
|
+
<dt><code>registration</code></dt>
|
|
32
|
+
<dd><code>open</code> advertises the registration endpoint, <code>closed</code> does not.
|
|
33
|
+
Defaults to <code>closed</code>.</dd>
|
|
34
|
+
</dl>
|
|
35
|
+
|
|
36
|
+
The issuer is the authority's configured host, over `https` unless the host is a loopback one.
|
|
37
|
+
|
|
38
|
+
## Discovery
|
|
39
|
+
|
|
40
|
+
Two documents are served, at the paths their specifications fix, to anyone.
|
|
41
|
+
|
|
42
|
+
`/.well-known/oauth-authorization-server` is
|
|
43
|
+
[RFC 8414](https://www.rfc-editor.org/rfc/rfc8414) metadata:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
issuer: https://api.example.com
|
|
47
|
+
authorization_endpoint: https://app.example.com/oauth/authorize
|
|
48
|
+
token_endpoint: https://api.example.com/identity/grants/
|
|
49
|
+
registration_endpoint: https://api.example.com/identity/clients/
|
|
50
|
+
response_types_supported: [code]
|
|
51
|
+
grant_types_supported: [authorization_code]
|
|
52
|
+
code_challenge_methods_supported: [S256]
|
|
53
|
+
token_endpoint_auth_methods_supported: [none]
|
|
54
|
+
client_id_metadata_document_supported: true
|
|
55
|
+
authorization_response_iss_parameter_supported: true
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`/.well-known/oauth-protected-resource` is
|
|
59
|
+
[RFC 9728](https://www.rfc-editor.org/rfc/rfc9728) metadata. Each configured resource has one of
|
|
60
|
+
its own, at the path the well-known segment is followed by: `/.mcp` is read at
|
|
61
|
+
`/.well-known/oauth-protected-resource/.mcp`.
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
resource: https://api.example.com/.mcp
|
|
65
|
+
authorization_servers: [https://api.example.com]
|
|
66
|
+
bearer_methods_supported: [header]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
`/.well-known/openid-configuration` answers with the authorization server metadata, for a client
|
|
70
|
+
that reads only that.
|
|
71
|
+
|
|
72
|
+
A reply of `401` carries the challenge that names the document:
|
|
73
|
+
|
|
74
|
+
```http
|
|
75
|
+
401 Unauthorized
|
|
76
|
+
www-authenticate: Bearer resource_metadata="https://api.example.com/.well-known/oauth-protected-resource/.mcp", scope="app:notes"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Clients
|
|
80
|
+
|
|
81
|
+
A `client_id` that is an `https` URL is a
|
|
82
|
+
[Client ID Metadata Document](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-client-id-metadata-document-00):
|
|
83
|
+
the client publishes what it is at that URL, and the document is read from there. Only origins
|
|
84
|
+
`identity.clients` is configured to trust are read, and an empty list reads none:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
configuration:
|
|
88
|
+
identity.clients:
|
|
89
|
+
trust:
|
|
90
|
+
- https://claude.ai
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Anything else was registered through
|
|
94
|
+
[RFC 7591](https://www.rfc-editor.org/rfc/rfc7591), which `registration: open` advertises:
|
|
95
|
+
|
|
96
|
+
```http
|
|
97
|
+
POST /identity/clients/ HTTP/1.1
|
|
98
|
+
content-type: application/json
|
|
99
|
+
|
|
100
|
+
{"client_name": "Claude", "redirect_uris": ["https://claude.ai/api/mcp/auth_callback"]}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
```http
|
|
104
|
+
201 Created
|
|
105
|
+
|
|
106
|
+
{"client_id": "c8f3a1e4d8c9b2f6a0e5d7c3b1a9f8e2", "client_name": "Claude", …}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
A registration is addressed by a hash of what it says, so the same metadata is one client however
|
|
110
|
+
many times it arrives. A registration cannot be changed: a revision is a different client.
|
|
111
|
+
|
|
112
|
+
Only public clients are supported. `token_endpoint_auth_method` other than `none` is refused.
|
|
113
|
+
|
|
114
|
+
`redirect_uris` are matched exactly, except for a loopback address, where the port is ignored
|
|
115
|
+
([RFC 8252 §7.3](https://datatracker.ietf.org/doc/html/rfc8252#section-7.3)).
|
|
116
|
+
|
|
117
|
+
`GET /identity/clients/:id/` returns a client to any authenticated identity, which is what the
|
|
118
|
+
consent page reads.
|
|
119
|
+
|
|
120
|
+
## Token endpoint
|
|
121
|
+
|
|
122
|
+
`POST /identity/grants/`, anonymous, `application/x-www-form-urlencoded`.
|
|
123
|
+
|
|
124
|
+
```http
|
|
125
|
+
POST /identity/grants/ HTTP/1.1
|
|
126
|
+
content-type: application/x-www-form-urlencoded
|
|
127
|
+
|
|
128
|
+
grant_type=authorization_code&code=SplxlO&code_verifier=dBjftJeZ&redirect_uri=…&client_id=…
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```http
|
|
132
|
+
200 OK
|
|
133
|
+
cache-control: no-store
|
|
134
|
+
|
|
135
|
+
{"access_token": "…", "token_type": "Bearer", "expires_in": 2592000}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`code_verifier` is required: the code was issued against its `S256` hash
|
|
139
|
+
([RFC 7636](https://www.rfc-editor.org/rfc/rfc7636)). A code may be redeemed once, and is spent
|
|
140
|
+
whether or not the verifier matches. Every refusal is `invalid_grant`.
|
|
141
|
+
|
|
142
|
+
A code is valid for `identity.grants.lifetime` seconds, 60 by default. A token is valid for
|
|
143
|
+
`identity.grants.token` seconds, 30 days by default; `0` is until it is revoked.
|
|
144
|
+
|
|
145
|
+
## Grants
|
|
146
|
+
|
|
147
|
+
A grant is what a user allowed a client. One is held per identity per client.
|
|
148
|
+
|
|
149
|
+
`GET /identity/grants/:identity/` lists them. `DELETE /identity/grants/:identity/:id/` revokes one,
|
|
150
|
+
which disables the key its token was issued under: the token stops being one within
|
|
151
|
+
`identity.tokens.cache.ttl`.
|
|
152
|
+
|
|
153
|
+
## Tokens
|
|
154
|
+
|
|
155
|
+
An access token is a token of the identity that consented, carrying the
|
|
156
|
+
[roles](access.md#roles) that identity holds, or the subset the client asked for as `scope`. It is
|
|
157
|
+
presented as `Bearer`, which `identity.federation` also answers to — see
|
|
158
|
+
[Bearer scheme](identity.md#bearer-scheme).
|
|
159
|
+
|
|
160
|
+
A `scope` a client asks for is not checked against `scopes_supported`: it is granted if the
|
|
161
|
+
consenting identity holds it, and refused as `invalid_scope` otherwise. What is advertised says
|
|
162
|
+
what an application means to offer, not what the server will refuse.
|
|
163
|
+
|
|
164
|
+
## Audience
|
|
165
|
+
|
|
166
|
+
`resource` ([RFC 8707](https://www.rfc-editor.org/rfc/rfc8707)) is accepted at both endpoints and
|
|
167
|
+
recorded on the grant. **It does not yet restrict the token.** An access token carries the rights
|
|
168
|
+
of the identity that consented, over every path that identity may reach, whichever resource it was
|
|
169
|
+
asked for.
|
|
170
|
+
|
|
171
|
+
Restricting it is a `permissions` argument at the `identity.tokens.issue` call in
|
|
172
|
+
`identity.grants.exchange` — `{'/.mcp': ['*']}` for a resource at `/.mcp` — enforced by
|
|
173
|
+
`permits()`, which is already what reads a token's permissions on every request. It waits on the
|
|
174
|
+
resource that will check the audience itself.
|
|
175
|
+
|
|
176
|
+
## References
|
|
177
|
+
|
|
178
|
+
- [OAuth 2.1](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1)
|
|
179
|
+
- [Consent](consent.md), the page an application serves
|
|
180
|
+
- [Features](../features/oauth.grants.feature)
|
|
@@ -9,6 +9,10 @@ The following media types are supported for both requests and responses:
|
|
|
9
9
|
- `application/msgpack` using [msgpackr](https://github.com/kriszyp/msgpackr)
|
|
10
10
|
- `text/plain`
|
|
11
11
|
|
|
12
|
+
A request may also be sent as `application/x-www-form-urlencoded`. A form is read and never
|
|
13
|
+
written, so it is not a format a response is negotiated to. A name repeated in a form is read as
|
|
14
|
+
the list it is.
|
|
15
|
+
|
|
12
16
|
The response format is determined by content negotiation
|
|
13
17
|
using [negotiator](https://github.com/jshttp/negotiator).
|
|
14
18
|
|