I’m submitting a…
- Regression (a behavior that stopped working in a new release)
- Bug report
- Performance issue
- Documentation issue or request
Current behavior
According the documentation https://docs.squidex.io/02-documentation/developer-guides/scripting there is a function for to fetch content from the CMS by ID or IDs.
There is also a function getJSON/postJSON for fetch data from external API.
I have no bearer access_token on user in context [ctx] (like I have in the sidebar/editor plugin) which would give me the ability to make an authenticated call to the CMS for to fetch data by custom filters (like in Postman or from sidebar/editor HTML)
Expected behavior
Description of how to call the CMS with provided context information.
-or-
Function or extension of getReferences for to fetch content with custom filter
Minimal reproduction of the problem
Actual content of the provided context [ctx] in the update script:
(AppName, E-Mail and Host changed)
{
"data": { ... },
"dataOld": { ... },
"oldData": { ... },
"oldStatus": "Published",
"operation": "Update",
"status": "Published",
"statusOld": "Unknown",
"appId": "85ca01a5-01c5-4c10-b6a4-65760bfa045c",
"appName": "...live",
"contentId": "d546d720-7650-4597-acad-3d44a1ed0956",
"schemaId": "15b9e1cf-f423-41f5-8c05-737f0d486d2e",
"schemaName": "page",
"user": {
"id": "6511928064157693fb049329",
"email": "...info@...ch",
"isClient": false,
"isUser": true,
"name": null,
"claims": {
"sub": [
"6511928064157693fb049329"
],
"name": [
"...info@...ch"
],
"emailaddress": [
"...info@...ch"
],
"permissions": [
"squidex.admin.*",
"squidex.apps....live.*"
],
"email": [
"...info@...ch"
],
"oi_prst": [
"squidex-frontend"
],
"iss": [
"https://...cloudapp.azure.com/"
],
"oi_au_id": [
"f88b7faa-78e8-431c-b576-c910a65b6ed4"
],
"client_id": [
"squidex-frontend"
],
"oi_tkn_id": [
"d55c2911-0244-4ec3-bcdd-b39f8f4965d1"
],
"aud": [
"scp:squidex-api"
],
"scope": [
"squidex-api openid profile email permissions"
],
"jti": [
"a06eda7d-9da1-4319-a65b-d95108f9e2b5"
],
"exp": [
"1702645950"
],
"iat": [
"1700053950"
],
"oi_tkn_typ": [
"access_token"
],
"oi_crt_dt": [
"Wed, 15 Nov 2023 13:12:30 GMT"
],
"oi_exp_dt": [
"Fri, 15 Dec 2023 13:12:30 GMT"
],
"oi_aud": [
"scp:squidex-api"
],
"oi_scp": [
"squidex-api",
"openid",
"profile",
"email",
"permissions"
],
"role": [
"Owner"
]
}
}
}
Environment
App Name: …live
- Self hosted with docker
- Self hosted with IIS
- Self hosted with other version
- Cloud version
Version: 7.8.2
Browser:
- Chrome (desktop)
- Chrome (Android)
- Chrome (iOS)
- Firefox
- Safari (desktop)
- Safari (iOS)
- IE
- Edge
Others:
The length of a bearer token which I receive in Postman is 854 and looks like a base64 encoded string - nothing like that found in the update script context.