// This example supports both non-signed AuthSub and signed oAuth authorization methods. To
// switch between both authroization methods simply replace retrieving a GoogleDataManager
// instance with the getOauthManager method for the getAuthSubManager method. This can be
// done by uncommenting the code below. There is a similar change that must occur in the
// AuthorizationServlet class.
GoogleDataManager googleDataManager = GoogleDataManagerFactory.getAuthSubManager(
APPLICATION_NAME,
request.getParameter("ids"));
/*
GoogleDataManager googleDataManager = GoogleDataManagerFactory.getOauthManager(
APPLICATION_NAME,
request.getParameter("ids"));
*/
GoogleData googleData = googleDataManager.getGoogleData();
// First, users must login to use the application.
nextUrl = LOGIN_VIEW_URL;
if (googleData.isLoggedIn()) {