I'm writing a web application where I'm getting an authorization code with which I'm able to get an access token. But this token expires in an hour's time. So how do I get a refresh token from the authorization code and use the same refresh token to get a new access token each time the old one expires?
I'm working with Java and Jsp.