Raj

Raj

  • NA
  • 95
  • 25k

JWT Token - Consume REST POST API at client side

Jul 31 2017 12:38 AM
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 loginpage ,
else
redirect to the webapplication.
 
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. Lloking forward to your response. Thanks all. 

Answers (1)