Hi all,
I'm developing a solution in FileMaker which I want to connect to my box account. I've been doing this following "OAuth 2.0 with JWT (Server Authentication)" as I want the app to connect with Box, not the users. My objective is for the app to pull down tags and other information about files which have been uploaded to the Box. As this is being done in Filemaker, I've been following the instructions here - https://developer.box.com/v2.0/docs/construct-jwt-claim-manually - to try and construct the JWT manually to authenticate with the box.
I'm using the public/private key generated by the box so went straight to section 3 of this page and authorised the application. Moving on to section 4, I have created the header and claims and done the base64 encoding. However there is no guidance for creating the signature. I have found this site - https://jwt.io/introduction/ - which explains how to do a signature as a combination of the header and payload (claims):
HMACSHA256(base64UrlEncode(header) + "." + base64UrlEncode(payload), secret)
However I'm struggling to get past this point. I've tried setting the 'secret' to be the client secret as per the App Configuration and I've also tried to set this to be the private key too. But when I try to move on to step 7 on the instructions I've set up the header options but when I try to post this nothing happens. I've tried to post using the command line on my Mac and it comes back with an error saying "OpenSSL unable to verify data...".
At the top of the article it mentions that you have to sign the JWT with an RSA Key so I presume this error is a result of me not doing this, but unless I'm missing something obvious from this article I'm not sure how this step should be done.
If anyone can provide any help or assistance it would be greatly appreciated as it does not feel like the instructions for manually constructing the JWT are complete!
Thanks all in advance for your time and support,
Rob