I used a jwt token that I have retrieved from cognito after my user logs in. I want that only valid user with valid jwt can access this. I tried many things but none worked.
I would really appreciate if someone would describe in detail the steps that i need to follow to verify my jwt.
Please provide the code if possible.
@CrossOrigin
@RequestMapping(value= "/login", method=RequestMethod.POST,consumes="application/json")
@ResponseBody
public String authenticate(@RequestBody SignInDTO signInDetails)
{
//boolean isAuthenticated=false;
CognitoHelper cognitoHelper=new CognitoHelper();
String authResult=cognitoHelper.ValidateUser(signInDetails.getEmailId(), signInDetails.getPassword());
.....
.....
.....
authResult is the jwt that i get from cognito. After this I am completely clueless about what needs to be done.