I am trying to use the JWT-Module for creating a JSON web token. The token is needed for requiring an access token in MindSphere (Siemens). This is an example for the needed payload: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ { "iss": "d9341cbff41144abaf690b22e16b87d2", "sub": "d9341cbff41144abaf690b22e16b87d2", "aud": [ "southgate" ], "iat": 1532690970, "nbf": 1532690970, "exp": 1533295770, "jti": "ed35d144e2742f93", "schemas": [ "urn:siemens:mindsphere:v1" ], "ten": "connint1" } +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I could easily create a JWT object with this claims, but without the array types. Instead of the array types I just used string types (there is only one string in the array). When I use the generated token I get a response 400 with error “invalid_grant”. I am not sure about this, but the missing arrays could be the reason? I also tried to use Modul “JSON Web Tokens”. At the beginning it looked very promising, because the type array for claims is existing. But then I have run into big problems because of the used package “sun.misc” (I am using Mendix Studio Pro 8). Is there a chance to create claims of type array in the JWT-Module?
asked
Ludwig Philipp
2 answers
1
Hi Philipp,
Do you know the "Build a MindSphere app with Mendix" in the mendix academy