Skip to content

Instantly share code, notes, and snippets.

@Bo-Ye
Created January 5, 2016 02:17
public class Watchlist extends HttpServlet {
private static final long serialVersionUID = 1L;
//watchlist callback
private static final String CALLBACK_URL = "http://localhost:8080/trademe-api-oauth/watchlist-callback";
private final TrademeTemplate trademeTemplate = TrademeTemplate.getInstance();
/**
* Step 1: a user accesses the client
* Step 4: redirect to the authorization page.
* Step 5: the user grants permission.
*
* @param request
* @param response
* @throws java.io.IOException
*/
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.sendRedirect(trademeTemplate.getAuthorizationURL(CALLBACK_URL)); // trade me login page
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment