<I need to consume a REST API. RESTAPI will return an JWT token as a response , by calling REST POST method.
I need to decode and validate the JWT token at my end and then redirect users to certain URL's accordingly based on token expiry time. I have a shared secret code and the Client ID of the service.
If (token is expired)then redirect to login page ,
else
redirect to the web application.
I just need to consume the service. Hence i think , client side coding only will be enough to handle decoding and validation of token.
I am implementing this in SharePoint 2013 , but normal c# code would cater to this too.
Any technical advice on this would be greatly helpful. Looking forward to your response. Thanks all.
What I have tried:
1. I am implementing this in SharePoint 2013. Hence i tried SP designer workflow , to consume the REST HTTP service . However , after receiving the JWT response , i need to decode and validate the JWT token to redirect users based on token expiry time.
Just have a concern if decoding and validating of JWT token part can be handled in SP designer.