Skip to content

Commit c5a3c0d

Browse files
committed
feat: Allow APIs with raw input
Some APIs might need non-JSON/form input, this allows this possibility. In the future we probably want a more generic solution, but for now this at least allows the possibility.
1 parent a076b70 commit c5a3c0d

1 file changed

Lines changed: 34 additions & 20 deletions

File tree

packages/uma/config/default.json

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,41 @@
8888
"@id": "urm:uma:default:JsonHttpErrorHandler",
8989
"@type": "JsonHttpErrorHandler",
9090
"handler": {
91-
"@id": "urm:uma:default:JsonFormHttpHandler",
92-
"@type": "JsonFormHttpHandler",
93-
"handler": {
94-
"@id": "urn:uma:default:RoutedHttpRequestHandler",
95-
"@type": "RoutedHttpRequestHandler",
96-
"routes": [
97-
{ "@id": "urn:uma:default:UmaConfigRoute" },
98-
{ "@id": "urn:uma:default:JwksRoute" },
99-
{ "@id": "urn:uma:default:TokenRoute" },
100-
{ "@id": "urn:uma:default:PermissionRegistrationRoute" },
101-
{ "@id": "urn:uma:default:ResourceRegistrationRoute" },
102-
{ "@id": "urn:uma:default:ResourceRegistrationOpsRoute" },
103-
{ "@id": "urn:uma:default:IntrospectionRoute" },
104-
{ "@id": "urn:uma:default:LogRoute" },
105-
{ "@id": "urn:uma:default:VCRoute" },
106-
{ "@id": "urn:uma:default:ContractRoute" }
107-
],
108-
"defaultHandler": {
109-
"@type": "DefaultRequestHandler"
91+
"@id": "urm:uma:default:RouteHandler",
92+
"@type": "WaterfallHandler",
93+
"handlers": [
94+
{
95+
"comment": "Handles all JSON and form encoded input/output.",
96+
"@id": "urm:uma:default:JsonFormHttpHandler",
97+
"@type": "JsonFormHttpHandler",
98+
"handler": {
99+
"@id": "urn:uma:default:JsonRoutedHttpRequestHandler",
100+
"@type": "RoutedHttpRequestHandler",
101+
"routes": [
102+
{ "@id": "urn:uma:default:UmaConfigRoute" },
103+
{ "@id": "urn:uma:default:JwksRoute" },
104+
{ "@id": "urn:uma:default:TokenRoute" },
105+
{ "@id": "urn:uma:default:PermissionRegistrationRoute" },
106+
{ "@id": "urn:uma:default:ResourceRegistrationRoute" },
107+
{ "@id": "urn:uma:default:ResourceRegistrationOpsRoute" },
108+
{ "@id": "urn:uma:default:IntrospectionRoute" }
109+
],
110+
"defaultHandler": {
111+
"@type": "DefaultRequestHandler"
112+
}
113+
}
114+
},
115+
{
116+
"comment": "Handles all remaining output. These handlers have to handle input/output parsing themselves. TODO: At some point we want more generic conneg.",
117+
"@id": "urn:uma:default:RawRoutedHttpRequestHandler",
118+
"@type": "RoutedHttpRequestHandler",
119+
"routes": [
120+
{ "@id": "urn:uma:default:ContractRoute" },
121+
{ "@id": "urn:uma:default:LogRoute" },
122+
{ "@id": "urn:uma:default:VCRoute" }
123+
]
110124
}
111-
}
125+
]
112126
}
113127
}
114128
},

0 commit comments

Comments
 (0)