Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 

Overview using a bearertoken

Overview using a bearertoken

Jipr311
Member

Hi guys, am developing a snap which is basically a webapp serving some files and getting protected using the jwt... at some point my menu.sidebar looks like this:

"menus": {
  "sidebar": [
    {
      "id": "my-id",
      "title": "Title1",
      "icon": "my-icon",
      "link": "/my-id?token=${bearertoken}",
      "permissions": [...]
}
]...

and so far this is working fine since my link is getting created dynamically replacing the 'bearertoken' place-holder with the 'jwt' but then I decided to add also an "overview" using the same approach but in this case then the link is getting invalid since the replacement is not working, this is how my json looks like:

"overview": [
    {
      "id": "my-id-overview",
      "title": "Title overview",
      "icon": "my-icon",
      "link": "/my-id/token=${bearertoken}",
      "permissions": [...]
},...

this is resulting in an URL like: https://<foo>/<bar>?token=${bearertoken}

am I using the feature incorrectly? or there is another way to do it?

Thanks in advance

Best regards

José

4 REPLIES 4

Sgilk
Frequent Contributor

Hi @Jipr311 ,

Might this just be a typo? It looks like you ommitted the query string seperator.

Try this instead and let me know! 

"overview": [
    {
      "id": "my-id-overview",
      "title": "Title overview",
      "icon": "my-icon",
      "link": "/my-id?token=${bearertoken}",
      "permissions": [...]
},...

Example for reference: sdk-py-webserver

Hi Sgilk,

sorry it was a typo from me trying to obfuscate the json...

I actually tried with following json (including the query ?)

"overview": [ { "id": "my-id-overview", "title": "Title overview", "icon": "my-icon", "link": "/my-id?token=${bearertoken}", "permissions": [...] },...

 with no results 

nickH
Community Moderator
Community Moderator

Hi José

which version of ctrlX OS are you using? 

Best regards, 

Nick

Hi Nick,

this is the info I can provide

Jipr311_0-1729754408458.png

Best Regards,

José

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist