• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    [SOLVED] "Failed to create authentication token: Bad Request"

    Mango feedback
    2
    3
    1.4k
    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.
    • A
      adamlevy
      last edited by adamlevy

      Running the latest version of Mango with all modules up to date. When I go to generate a JWT token for any user I get the error message "Failed to create authentication token: Bad Request"

      Here is the corresponding error output from the logs: https://pastebin.com/XF3CbaLM

      The first line is:

      ERROR 2018-01-29T13:26:50,292 (com.serotonin.m2m2.web.mvc.rest.v1.exception.RestExceptionHandler.handleExceptionInternal:74) - Cannot deserialize value of type `java.util.Date` from String "2018-02-05T22:26:48.933Z": not a valid representation (error: Failed to parse Date value '2018-02-05T22:26:48.933Z': Unparseable date: "2018-02-05T22:26:48.933Z")
      

      We are running this version of java:

      $ java -version
      java version "1.8.0_131"
      Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
      

      Please let me know what additional information I can provide.

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        @adamlevy Looks like we haven't specified the defaults correctly for the date format, add this to your env.properties file and you should be fine.

        rest.customDateOutputFormat=yyyy-MM-dd'T'HH:mm:ss.SSSXXX
        rest.customDateInputFormat=yyyy-MM-dd'T'HH:mm:ss.SSSXXX
        

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • A
          adamlevy
          last edited by adamlevy

          This worked for me. Thank you!

          BTW we had rest.customDateOutputFormat already specified in our env. properties file, it was just the wrong format. So the hard coded defaults are probably fine.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post