Created
January 5, 2016 02:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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