You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for sudo and mu-auth-scope for queries
This is an extension to how the query and update functions work. It
brings these functions a bit more in line with current use and could
ease the path to using scopes instead of sudo where it's possible.
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -202,8 +202,8 @@ mu.app.get('/', function( req, res ) {
202
202
```
203
203
204
204
The following helper functions are provided by the template
205
-
- `query(query) =>Promise`: Function for sending queries to the triplestore
206
-
- `update(query) =>Promise`: Function for sending updates to the triplestore
205
+
- `query(query, options) =>Promise`: Function for sending queries to the triplestore. Options is an object which may include `sudo` and `scope` keys.
206
+
- `update(query, options) =>Promise`: Function for sending updates to the triplestore. Options is an object which may include `sudo` and `scope` keys.
207
207
- `uuid() => string`: Generates a random UUID (e.g. to construct new resource URIs)
208
208
209
209
The following SPARQL escape helpers are provided to construct safe SPARQL query strings
@@ -254,6 +254,8 @@ The following environment variables can be configured:
254
254
- `MAX_BODY_SIZE` (default: `100kb`): max size of the request body. See [ExpressJS documentation](https://expressjs.com/en/resources/middleware/body-parser.html#limit).
255
255
- `HOST` (default: `0.0.0.0`): The hostname you want the service to bind to.
256
256
- `PORT` (default: `80`): The port you want the service to bind to.
257
+
- `ALLOW_MU_AUTH_SUDO`: Allow sudo queries when the service requests it.
258
+
- `DEFAULT_MU_AUTH_SCOPE`: Default mu-auth-scope to use for calls.
0 commit comments