@@ -0,0 +1,2077 @@
+package org.waag.ah.spring.controller;%0A%0Aimport java.util.TreeMap;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.security.oauth.provider.ConsumerDetails;%0Aimport org.springframework.security.oauth.provider.ConsumerDetailsService;%0Aimport org.springframework.security.oauth.provider.token.OAuthProviderToken;%0Aimport org.springframework.security.oauth.provider.token.OAuthProviderTokenServices;%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.servlet.ModelAndView;%0A%0A@Controller%0Apublic class OAuthController %7B%0A//%09private static final Logger logger = LoggerFactory.getLogger(OAuthController.class);%0A%09%0A%09@Autowired%0A%09private OAuthProviderTokenServices tokenServices;%0A%09%0A%09@Autowired%0A%09private ConsumerDetailsService consumerDetailsService;%0A%0A%09@RequestMapping(%22/oauth/confirm_access%22)%0A%09public ModelAndView getAccessConfirmation(HttpServletRequest request, HttpServletResponse response)%0A%09%09%09throws Exception %7B%0A%09%09String token = request.getParameter(%22oauth_token%22);%0A%09%09if (token == null) %7B%0A%09%09%09throw new IllegalArgumentException(%22A request token to authorize must be provided.%22);%0A%09%09%7D%0A%0A%09%09OAuthProviderToken providerToken = tokenServices.getToken(token);%0A%09%09ConsumerDetails consumer = consumerDetailsService%0A%09%09%09%09.loadConsumerByConsumerKey(providerToken.getConsumerKey());%0A%0A%09%09String callback = request.getParameter(%22oauth_callback%22);%0A%09%09TreeMap%3CString, Object%3E model = new TreeMap%3CString, Object%3E();%0A%09%09model.put(%22oauth_token%22, token);%0A%09%09if (callback != null) %7B%0A%09%09%09model.put(%22oauth_callback%22, callback);%0A%09%09%7D%0A%09%09model.put(%22consumer%22, consumer);%0A%09%09return new ModelAndView(%22access_confirmation%22, model);%0A%09%7D%0A%0A%09public void setTokenServices(OAuthProviderTokenServices tokenServices) %7B%0A%09%09this.tokenServices = tokenServices;%0A%09%7D%0A%0A%09public void setConsumerDetailsService(ConsumerDetailsService consumerDetailsService) %7B%0A%09%09this.consumerDetailsService = consumerDetailsService;%0A%09%7D%0A%7D%0A

Renamed OAuthAccessConfirmationController.java to OAuthController.java