08-11-2016 10:10 AM
I need to implement JWT authentication with labview, how can it be done?
Solved! Go to Solution.
08-12-2016 11:15 AM
I guess you can try to play with this procedure.
http://digital.ni.com/public.nsf/allkb/DF41D5DA8EEB4840862577D90058C208
Any specific reason you want to use JSON?
08-14-2016 12:02 AM
My Labview applivation need to get data from another Oracle based application (Not Labview).
The data is available in a web service with JWT authentication, I also need to deliver data in the same way (web service with JWT).
I didn't find any labview based tool or (activeX, .net) tool I can use for encryption decryption JWT.
08-15-2016 03:26 PM
You will have to use the Import Web Service Wizard for authentication.
https://zone.ni.com/reference/en-XX/help/371361M-01/lvdialog/import_web_service_wizard/
08-18-2016 01:28 PM
I am not aware of an existing JWT library for LabVIEW. You can see from the JWT site that to creating and parsing JWT requires:
JSON encoder / decoder
base64 encode / decode
and a signature / encryption method (commonly HMACSHA256 built this depends on the Oracle application)
JSON encoding and decoding is available since LabVIEW 2013: https://zone.ni.com/reference/en-XX/help/371361K-01/glang/flat_unflat_string/
The other two are not available from NI, but have implementations in the LabVIEW community:
Base64:
https://decibel.ni.com/content/docs/DOC-5544
https://decibel.ni.com/content/docs/DOC-23233
Signature:
https://lavag.org/files/file/198-encryption/
https://decibel.ni.com/content/docs/DOC-22585
So unfortunately JWT support is not provided by default, but all the pieces needed to implement it should be there.
08-28-2016 06:53 AM
Thank you for the detailed answer, It seems like this is the best way to implement it.
Dor
09-01-2016 04:30 PM
I think JKI JSON is best fit for JSON serialization and deserialization needs with web services.
09-01-2016 04:38 PM
Hi Tomi,
Just to clarify we were discussing JSON Web Tokens which is used as a component of some authentication / authorization systems.
My understanding is the JKI JSON package just handles JSON parsing. It does not implement JWT / RFC 7519 correct?
If that's the case the JKI JSON package could be used for the JSON parsing, but there were more components being discussed in this thread.
09-01-2016 11:13 PM
Milan, sorry for confusion. I was proposing using JKI JSON as part of the toolchain in creation of JWT implementation for LabVIEW. LabVIEW native JSON is not very useful in libraries as it is strongly typed and usually you don't know the type of the data at edit time when writing general purpose libraries (such as JWT library).
02-28-2019 05:36 AM - edited 02-28-2019 05:37 AM
Hi dor-s!
How did you solve the signature issue?
Did you use HMACSHA256 encryption method or RSA Signature with SHA-256 encryption method?
HMACSHA256 is easy to do with the libraries in https://lavag.org/files/file/198-encryption/ but I'm having problems with RSA Signature with SHA-256. Is there any library or VI for this?
Thanks in advance