Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    [feature] Include sessionId in rr_connect response

    Scheduled Pinned Locked Moved
    Firmware wishlist
    3
    3
    206
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • timschneiderundefined
      timschneider
      last edited by

      Align /rr_connect response from DSF with RRF and make the sessionKey available to be able to use session based authentication with the emulated http endpoints.

      https://github.com/Duet3D/DuetSoftwareFramework/blob/037b6c05acac37f44134d9eb72ba885065de6c1f/src/DuetWebServer/Controllers/RepRapFirmwareController.cs#L135-L142

                          return Content(JsonSerializer.Serialize(new
                          {
                              apiLevel = 1,
                              err = 0,
                              isEmulated = true,
                              sessionTimeout = 8000,
                              boardType = boardString
                          }, JsonHelper.DefaultJsonOptions), "application/json");
      

      https://github.com/Duet3D/RepRapFirmware/wiki/HTTP-requests#get-rr_connect

      {
          "err": 0,
          "sessionTimeout": 8000,
          "boardType": "duetwifi102",
          "sessionKey": 123456
      }
      
      T3P3Tonyundefined chrishammundefined 2 Replies Last reply Reply Quote 0
      • T3P3Tonyundefined T3P3Tony moved this topic from DSF Development
      • T3P3Tonyundefined
        T3P3Tony administrators @timschneider
        last edited by

        @timschneider I have moved this to the firmware wishlist as @chrishamm tells me that if we do this it would be in RRF and then in the DSF compatibility layer.

        www.duet3d.com

        1 Reply Last reply Reply Quote 1
        • chrishammundefined
          chrishamm administrators @timschneider
          last edited by

          @timschneider I've logged this here: https://github.com/Duet3D/RepRapFirmware/issues/1074 But since you need to poll rr_reply for certain codes anyway, that solution probably isn't really applicable as a fix for your other problem.

          chrishamm created this issue in Duet3D/RepRapFirmware

          open [FeatureRequest]: Add option to rr_connect request to prevent G-code replies from queuing up #1074

          Duet software engineer

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA