I'm trying to connect WORKFRONT using JWT way with PYTHON, I followed below guide but no luck, please help me out. Many thanks!!!
Using JWT flow for custom OAuth 2 applications | Adobe Workfront
Below is my code:
I don't see anything wrong but workfront returns below error:
'{"statusCode":400,"error":true,"type":"invalid_request","message":"JWT token is invalid."}'
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @HewittLi
We did similar implementation only using Workfront modules and I can see that you are missing crucial step, signing the payload with your private key.
Per official documentation that you also provided
The JWT must be signed and base-64 encoded for inclusion in the access request. The JWT libraries provide functions to perform these tasks.
The token must be signed using the private key for a digital signing certificate. If you do so, you can use the private key of any associated certificate to sign your JWT.
Please let me know if you have any additional question. Good luck with implementation.
Best regards,
Ivan
Hi @HewittLi
We did similar implementation only using Workfront modules and I can see that you are missing crucial step, signing the payload with your private key.
Per official documentation that you also provided
The JWT must be signed and base-64 encoded for inclusion in the access request. The JWT libraries provide functions to perform these tasks.
The token must be signed using the private key for a digital signing certificate. If you do so, you can use the private key of any associated certificate to sign your JWT.
Please let me know if you have any additional question. Good luck with implementation.
Best regards,
Ivan
Thanks a lot for your reply, I think I have signed payload by using
jwt.encode(loginPayload, self.SKEY, algorithm="HS256")
If this is not what you mean, do you mind to provide more guidance? Thanks a lot!
Views
Replies
Total Likes
Hi @HewittLi ,
You are just signing the payload with the secret and not actually with private key, please check the System setup OAuth2 Applications section, there you can either upload your own or generate one by the system, if you generate you get a zip which you can download from where you can take the private key needed for signing the payload.
Hopefully this explains it, also if you do not really need python but can also use Workfront fusion there is readily available JWT module which you can use to generate jwt. Good luck.
Best regards,
Ivan
Ivan, Thanks a lot !
Views
Replies
Total Likes